I'm attempting to evenly space and center 3 buttons at the bottom of an HTML page. It's a form that takes input and passes it to a php page. That part works great. The problem I'm having is the seemingly haphazard spacing of the submit, update & delete buttons. I'll include the code below, with the hope that one of you HTML gurus can spot my beginners mistake. The button coding is at the end of the rather lengthy page. (BTW, if you notice anything in the code that can be coded better, please let me know, as I'm just learning this stuff!) Thanks!
Code:
<?php
// leads_switch.PHP - Updated: Wednesday, June 17, 2009 - 7:40 PM
//COUNT(leadsTable.company) AS NUM
include('dbconnect.php');
//
$record_key=$_POST['record_key'];
//
$query = "SELECT * FROM leadsTable where company_name = '$record_key'";
//
$result = mysql_query($query);
//
$rows=mysql_affected_rows(); // will return the number of rows produced by the query.
if (!$result) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $query;
die($message);
} else {
while ($newArray = mysql_fetch_array($result, MYSQL_ASSOC)) {
$id = $newArray['id'];
$company = $newArray['company_name'];
$contact = $newArray['contact'];
$phone = $newArray['phone'];
$fax = $newArray['fax'];
$street = $newArray['street'];
$city = $newArray['city'];
$state = $newArray['state'];
$zip = $newArray['zip'];
$job_type = $newArray['job_type'];
$license_class = $newArray['license_class'];
$experience = $newArray['experience'];
$date_found = $newArray['date_found'];
$date_of_contact = $newArray['date_of_contact'];
$notes = $newArray['notes'];
}
?>
<html>
<!-- UPDATE_LEADS_RECORD.HTML - Updated: Friday, June 12, 2009 - 12:58 PM -->
<head>
<title>Leads Process Page</title>
</head>
<body>
<!--align="center" will center the form -->
<table align="center" width="300" border="4" cellpadding="0" cellspacing="1"
bordercolor="#ccccff" bgcolor="blue">
<tr>
<form name="form1" method="post" action="leads_process_page.php">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFCC">
<tr>
<td colspan="4"><strong>
Update Lead</strong></td>
</tr>
<tr>
<td width="78">Company</td>
<td width="20">:</td>
<td width="294"><input type="text" name="company" value="<?php echo $company; ?>"></td>
<td> Date Found : </td>
<td width="294"><input type="text" name="date_found" value="<?php echo $date_found; ?>"></td>
</tr>
<tr>
<td width="78">Contact</td>
<td width="20">:</td>
<td width="294"><input type="text" name="contact" value="<?php echo $contact; ?>"></td>
<td> Contact Date : </td>
<td width="294"><input type="text" name="date_of_contact" value="<?php echo $date_of_contact; ?>"></td>
</tr>
<tr>
<td>Phone #</td>
<td>:</td>
<td width="294"><input type="text" name="phone" value="<?php echo $phone; ?>"></td>
</tr>
<tr>
<td>Fax #</td>
<td>:</td>
<td width="294"><input type="text" name="fax" value="<?php echo $fax; ?>"></td>
</tr>
<tr>
<td>Street</td>
<td>:</td>
<td width="294"><input type="text" name="street" value="<?php echo $street; ?>"></td>
</tr>
<tr>
<td>City</td>
<td>:</td>
<td width="294"><input type="text" name="city" value="<?php echo $city; ?>"></td>
</tr>
<tr>
<td>State</td>
<td>:</td>
<td width="294"><input type="state" name="state" size="2" maxlength="2" value="<?php echo $state; ?>"></td>
</tr>
<tr>
<td>Zip</td>
<td>:</td>
<td width="294"><input type="text" name="zip" size="5" maxlength="5" value="<?php echo $zip; ?>"></td>
</tr>
<tr>
<td>Job Type</td>
<td>:</td>
<td width="294"><input type="text" name="job_type" size="5" maxlength="5" value="<?php echo $job_type; ?>"></td>
</tr>
<tr>
<td>License Class</td>
<td>:</td>
<td width="294"><input type="text" name="license_class" size="1" maxlength="1" value="<?php echo $license_class; ?>"></td>
</tr>
<tr>
<td>Experience</td>
<td>:</td>
<td width="294"><input type="text" name="experience" size="10" maxlength="10" value="<?php echo $experience; ?>"></td>
</tr>
<tr>
<td>Notes/Results</td>
<td>:</td>
<td><textarea name="notes" cols="20" rows="3" value="<?php echo $notes; ?>"></textarea></td>
</tr>
<tr><td><br /></td></tr>
[b][COLOR=red]<tr>
<td><input type="submit" name="formoption" value="Add"></td>
<td><input type="submit" name="formoption" value="Update"></td>
<td><input type="submit" name="formoption" value="Delete"></td>
</tr>[/color][/b]
</table>
</td>
</form>
</table>
</body>
</html>
<?php } ?>