Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Html Tags


benmal

Recommended Posts

Can anyone see whats wrong with this create account form.

It seems to display 12 fields but not the rest.

Any ideas, I think it could be something to do with the tags?

 

 

<?php

require('includes/application_top.php');

 

// Show an error in a red font

function fieldError($fieldName, $errors)

{

if (isset($errors[$fieldName]))

echo "<font color=\"red\">" .

$errors[$fieldName] .

"</font><br>";

}

 

// Connect to a session

session_start();

 

 

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title> Create Account </title>

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<?php require(DIR_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td width="100%" valign="top">

<form name="formLogin" method="post" action="validate_account.php">

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo "Create Account"; ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="smallText"><?php echo "Please fill in the details below to sign up. Fields shown in <font color=\"red\"><b>red</b></font> must be completed.";?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

 

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" cellspacing="2" cellpadding="2">

 

<tr>

<td class="main"><?php echo "<font color=\"red\"><b>*Title:</b></font> "; ?></td>

<td><select name="title">

<option <?if ($formVars["title"]=="Mr") echo "selected";?>>Mr

<option <?if ($formVars["title"]=="Mrs") echo "selected";?>>Mrs

<option <?if ($formVars["title"]=="Ms") echo "selected";?>>Ms

</select><br></td>

</tr>

 

<tr>

<td class="main"><?php echo "<font color=\"red\"><b>*First Name:</b></font> "; ?></td>

<td><? echo fieldError("firstName", $errors); ?>

<input type="text" name="firstName"

value="<? echo $formVars["firstName"]; ?>" size=30></td>

</tr>

 

<tr>

<td class="main"><?php echo "<font color=\"red\"><b>*Surname Name:</b></font> "; ?></td>

<td><? echo fieldError("surname", $errors); ?>

<input type="text" name="surname"

value="<? echo $formVars["surname"]; ?>" size=30></td>

</tr>

 

<tr>

<td class="main"><?php echo "Initial:"; ?></td>

<td><? echo fieldError("initial", $errors); ?>

<input type="text" name="initial"

value="<? echo $formVars["initial"]; ?>" size=1></td>

</tr>

 

<tr>

<td class="main"><?php echo "<font color=\"red\"><b>*Address:</b></font> "; ?></td>

<td><? echo fieldError("address", $errors); ?>

<? echo fieldError("address1", $errors); ?>

<input type="text" name="address1"

value="<? echo $formVars["address1"]; ?>" size=30></td>

</tr>

 

<tr>

<td></td>

<td><? echo fieldError("address2", $errors); ?>

<input type="text" name="address2"

value="<? echo $formVars["address2"]; ?>" size=30></td>

</tr>

 

<tr>

<td></td>

<td><? echo fieldError("address3", $errors); ?>

<input type="text" name="address3"

value="<? echo $formVars["address3"]; ?>" size=30></td>

</tr>

 

<tr>

<td class="main"><?php echo "<font color=\"red\"><b>*City:</b></font> "; ?></td>

<td><? echo fieldError("city", $errors); ?>

<input type="text" name="city"

value="<? echo $formVars["city"]; ?>" size=30></td>

</tr>

 

<tr>

<td class="main"><?php echo "County:"; ?></td>

<td><? echo fieldError("county", $errors); ?>

<input type="text" name="county"

value="<? echo $formVars["county"]; ?>" size=30></td>

</tr>

 

<tr>

<td class="main"><?php echo "<font color=\"red\"><b>*Postcode:</b></font> "; ?></td>

<td><? echo fieldError("postcode", $errors); ?>

<input type="text" name="postcode"

value="<? echo $formVars["postcode"]; ?>" size=10></td>

</tr>

 

 

 

<tr>

<td class="main"><?php echo "<font color=\"red\"><b>*Date of Birth (dd/mm/yyyy):</b></font> "; ?></td>

<td><? echo fieldError("dob", $errors); ?>

<input type="text" name="dob"

value="<? echo $formVars["dob"]; ?>" size=10></td>

</tr>

<!--

<tr>

<td class="main"><?php echo "Telephone:"; ?></td>

<td><? echo fieldError("phone", $errors); ?>

<input type="text" name="phone"

value="<? echo $formVars["phone"]; ?>" size=15></td>

</tr>

 

-->

 

</table></td>

</tr>

</table></td>

</tr>

 

 

 

</table></form></td>

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

<?php require(DIR_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

Link to comment
Share on other sites

You have commented the 13th field out.

 

Remove <!-- and --> (blue texts shown below)

 

<!--<tr>

<td class="main"><?php echo "Telephone:"; ?></td>

<td><? echo fieldError("phone", $errors); ?>

<input type="text" name="phone"

value="<? echo $formVars["phone"]; ?>" size=15></td>

</tr>

 

-->

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...