andrewaiello
asked on
Create Profile Script
Hi,
I am creating a form where a user can enter their profile info. Once entered the info is put into a db and they can later login using their username and password. Below is the code i have so far and now i am stuck...
I get the following errors when the code is executed:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /usr/www/users/profile_new .php:4) in /usr/www/profile_new.php on line 95
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /usr/wwwu/sers/profile_new .php:4) in /usr/www/profile_new.php on line 95
Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/profile_new .php:4) in /usr/www/users/profile_new .php on line 133
This is the first time i have used Session variables and im not sure what the problem is...
<html>
<!-- profile_new.php - the form page for creatign a new profile -->
<head><title>Welcome</titl e></head>
<?php
$host = "xxxx";
$user = "xxxx";
$password ="xxxx";
$db_name = "xxxx";
// initializing a blank error message
// this will be used to accumulate the input errors
// in order to feed them back to the user
$error_message = "";
// checking to make sure the form has actually been submitted
if ($submit_new_profile != "")
{
// if it has been submitted
// each of the form entries will be examined
// to see which have been omitted
if ($_REQUEST['txt_email'] == "")
{
$error_message = "$error_message<br>You have omitted your email address.";
}
else
{
$link = mysql_connect($host, $user, $password) or die (mysql_error());
Mysql_select_db("dmotion_h andles") or die(mysql_error());
$query_string = "SELECT * FROM profile WHERE (email = '$txt_email')";
$result_set = mysql_db_query($db_name, $query_string, $link);
while ($row = mysql_fetch_array($result_ set))
{
$error_message = "$error_message<br><br>Thi s email address is already in use.<br>";
}
mysql_close($link);
}
if ($_REQUEST['txt_password'] == "")
{
$error_message = "$error_message<br>You have omitted your password.";
}
if ($_REQUEST['txt_bill_first _name'] == "")
{
$error_message = "$error_message<br>You have omitted your first name.";
}
if ($_REQUEST['txt_bill_last_ name'] == "")
{
$error_message = "$error_message<br>You have omitted your last name.";
}
if ($_REQUEST['txt_member_num ber'] == "")
{
$error_message = "$error_message<br>You have omitted the your member number.";
}
if ($error_message != "")
{
echo ("<br><center><font color=ff0000 size=4> $error_message </font></center>");
}
else
{
// user session
session_start();
$_SESSION["active_profile" ] = "active";
$_SESSION["email_original" ] = $txt_email;
$_SESSION["password_origin al"] = $txt_password;
$_SESSION["bill_first_name "] = $txt_bill_first_name;
$_SESSION["bill_last_name" ] = $txt_bill_last_name;
$_SESSION["member_number"] = $txt_member_number;
$_SESSION["bill_address"] = $txt_bill_address;
$_SESSION["bill_city"] = $txt_bill_city;
$_SESSION["bill_state"] = $sel_bill_state;
$_SESSION["bill_zip"] = $txt_bill_zip;
$_SESSION["bill_phone"] = $txt_bill_phone;
$_SESSION["bill_company"] = $txt_company;
$link = mysql_connect($host, $user, $password) or die (mysql_error());
Mysql_select_db("xxxx") or die(mysql_error());
// query string
$query_string = "INSERT INTO profile
VALUES ('0',
'$txt_email',
'$txt_password',
'$txt_bill_first_name',
'$txt_bill_last_name',
'$txt_member_number',
'$txt_bill_address',
'$txt_bill_city',
'$sel_bill_state',
'$txt_bill_zip',
'$txt_bill_phone',
'$txt_company',
Now( ))";
// executing the SQL statement
mysql_db_query($db_name, $query_string, $link);
mysql_close($link);
header("location:profile_a dded.php") ;
}
}
?>
<br><br>
<div align="center">
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<table border="0" cellpadding="6" cellspacing="0" width="600" id="table1">
<tr>
<td colspan = 2 align=center><b><font size="4">*</font> denotes a required entry</b></td>
</tr>
<tr>
<td width="576" align="right"> </td>
<td width="576"> </td>
</tr>
<tr>
<td width="576" align="right"><font size="2">*First Name:</font></td>
<td width="576">
<font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_bill_first_name" size="15" value = "<?php if (isset($_REQUEST['txt_bill _first_nam e'])) echo $_REQUEST['txt_bill_first_ name']; ?>">
</font></td>
</tr>
<tr>
<td align="right"><font size="2">*Last Name:</font></td>
<td><font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_bill_last_name" size="20" value = "<?php if (isset($_REQUEST['txt_bill _last_name '])) echo $_REQUEST['txt_bill_last_n ame']; ?>">
</font></td>
</tr>
<tr>
<td align="right"><font size="2">*Member Number :</font></td>
<td><font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_member_number" size="12" value = "<?php if (isset($txt_member_number) ) echo $txt_member_number; ?>">
</font></td>
</tr>
<tr>
<td align="right"><font size="2">Phone Number:</font></td>
<td><font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_bill_phone" size="12" value = "<?php if (isset($txt_bill_phone)) echo $txt_bill_phone; ?>">
</font></td>
</tr>
<tr>
<td width="576" align="right"><font size="2"> Address:</font></td>
<td width="576">
<font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_bill_address" size="40" value = "<?php if (isset($_REQUEST['txt_bill _address'] )) echo $_REQUEST['txt_bill_addres s']; ?>">
</font></td>
</tr>
<tr>
<td width="576" align="right"><font size="2">City:</font></td>
<td width="576">
<font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_bill_city" size="20" value = "<?php if (isset($_REQUEST['txt_bill _city'])) echo $_REQUEST['txt_bill_city'] ; ?>">
</font></td>
</tr>
<tr>
<td width="576" align="right"><font size="2">State:</font></td >
<td width="576">
<font size="2" face="Arial, Helvetica, sans-serif">
<select size="1" name="sel_bill_state">
<option value = "no_select" <?php if (($_REQUEST['sel_bill_stat e']) == 'no_select') echo 'selected'; ?>>Please Select</option>
<option value = "Alabama" <?php if (($_REQUEST['sel_bill_stat e']) == 'Alabama') echo 'selected'; ?>>Alabama</option>
<option value = "Alaska" <?php if (($_REQUEST['sel_bill_stat e']) == 'Alaska') echo 'selected'; ?>>Alaska</option>
<option value = "Arizona" <?php if (($_REQUEST['sel_bill_stat e']) == 'Arizona') echo 'selected'; ?>>Arizona</option>
<option value = "Arkansas" <?php if (($_REQUEST['sel_bill_stat e']) == 'Arkansas') echo 'selected'; ?>>Arkansas</option>
<option value = "California" <?php if (($_REQUEST['sel_bill_stat e']) == 'California') echo 'selected'; ?>>California</option>
<option value = "Colorado" <?php if (($_REQUEST['sel_bill_stat e']) == 'Colorado') echo 'selected'; ?>>Colorado</option>
<option value = "Connecticut" <?php if (($_REQUEST['sel_bill_stat e']) == 'Connecticut') echo 'selected'; ?>>Connecticut</option>
<option value = "Delaware" <?php if (($_REQUEST['sel_bill_stat e']) == 'Delaware') echo 'selected'; ?>>Delaware</option>
<option value = "Florida" <?php if (($_REQUEST['sel_bill_stat e']) == 'Florida') echo 'selected'; ?>>Florida</option>
<option value = "Georgia" <?php if (($_REQUEST['sel_bill_stat e']) == 'Georgia') echo 'selected'; ?>>Georgia</option>
<option value = "Hawaii" <?php if (($_REQUEST['sel_bill_stat e']) == 'Hawaii') echo 'selected'; ?>>Hawaii</option>
<option value = "Idaho" <?php if (($_REQUEST['sel_bill_stat e']) == 'Idaho') echo 'selected'; ?>>Idaho</option>
<option value = "Illinois" <?php if (($_REQUEST['sel_bill_stat e']) == 'Illinois') echo 'selected'; ?>>Illinois</option>
<option value = "Indiana" <?php if (($_REQUEST['sel_bill_stat e']) == 'Indiana') echo 'selected'; ?>>Indiana</option>
<option value = "Iowa" <?php if (($_REQUEST['sel_bill_stat e']) == 'Iowa') echo 'selected'; ?>>Iowa</option>
<option value = "Kansas" <?php if (($_REQUEST['sel_bill_stat e']) == 'Kansas') echo 'selected'; ?>>Kansas</option>
<option value = "Kentucky" <?php if (($_REQUEST['sel_bill_stat e']) == 'Kentucky') echo 'selected'; ?>>Kentucky</option>
<option value = "Louisiana" <?php if (($_REQUEST['sel_bill_stat e']) == 'Louisiana') echo 'selected'; ?>>Lousiiana</option>
<option value = "Maine" <?php if (($_REQUEST['sel_bill_stat e']) == 'Maine') echo 'selected'; ?>>Maine</option>
<option value = "Maryland" <?php if (($_REQUEST['sel_bill_stat e']) == 'Maryland') echo 'selected'; ?>>Maryland</option>
<option value = "Massachusetts" <?php if (($_REQUEST['sel_bill_stat e']) == 'Massachusetts') echo 'selected'; ?>>Massachusetts</option>
<option value = "Michigan" <?php if (($_REQUEST['sel_bill_stat e']) == 'Michigan') echo 'selected'; ?>>Michigan</option>
<option value = "Minnesota" <?php if (($_REQUEST['sel_bill_stat e']) == 'Minnesota') echo 'selected'; ?>>Minnesota</option>
<option value = "Mississippi" <?php if (($_REQUEST['sel_bill_stat e']) == 'Mississippi') echo 'selected'; ?>>Mississippi</option>
<option value = "Missouri" <?php if (($_REQUEST['sel_bill_stat e']) == 'Missouri') echo 'selected'; ?>>Missouri</option>
<option value = "Montana" <?php if (($_REQUEST['sel_bill_stat e']) == 'Montana') echo 'selected'; ?>>Montana</option>
<option value = "Nebraska" <?php if (($_REQUEST['sel_bill_stat e']) == 'Nebraska') echo 'selected'; ?>>Nebraska</option>
<option value = "Nevada" <?php if (($_REQUEST['sel_bill_stat e']) == 'Nevada') echo 'selected'; ?>>Nevada</option>
<option value = "NewHampshire" <?php if (($_REQUEST['sel_bill_stat e']) == 'NewHampshire') echo 'selected'; ?>>New Hampshire</option>
<option value = "NewJersey" <?php if (($_REQUEST['sel_bill_stat e']) == 'NewJersey') echo 'selected'; ?>>New Jersey</option>
<option value = "NewMexico" <?php if (($_REQUEST['sel_bill_stat e']) == 'NewMexico') echo 'selected'; ?>>New Mexico</option>
<option value = "NewYork" <?php if (($_REQUEST['sel_bill_stat e']) == 'NewYork') echo 'selected'; ?>>New York</option>
<option value = "NorthCarolina" <?php if (($_REQUEST['sel_bill_stat e']) == 'NorthCarolina') echo 'selected'; ?>>North Carolina</option>
<option value = "NorthDakota" <?php if (($_REQUEST['sel_bill_stat e']) == 'NorthDakota') echo 'selected'; ?>>North Dakota</option>
<option value = "Ohio" <?php if (($_REQUEST['sel_bill_stat e']) == 'Ohio') echo 'selected'; ?>>Ohio</option>
<option value = "Oklahoma" <?php if (($_REQUEST['sel_bill_stat e']) == 'Oklahoma') echo 'selected'; ?>>Oklahoma</option>
<option value = "Oregon" <?php if (($_REQUEST['sel_bill_stat e']) == 'Oregon') echo 'selected'; ?>>Oregon</option>
<option value = "Pennsylvania" <?php if (($_REQUEST['sel_bill_stat e']) == 'Pennsylvania') echo 'selected'; ?>>Pennsylvania</option>
<option value = "RhodeIsland" <?php if (($_REQUEST['sel_bill_stat e']) == 'RhodeIsland') echo 'selected'; ?>>Rhode Island</option>
<option value = "SouthCarolina" <?php if (($_REQUEST['sel_bill_stat e']) == 'SouthCarolina') echo 'selected'; ?>>South Carolina</option>
<option value = "SouthDakota" <?php if (($_REQUEST['sel_bill_stat e']) == 'SouthDakota') echo 'selected'; ?>>South Dakota</option>
<option value = "Tennessee" <?php if (($_REQUEST['sel_bill_stat e']) == 'Tennessee') echo 'selected'; ?>>Tennessee</option>
<option value = "Texas" <?php if (($_REQUEST['sel_bill_stat e']) == 'Texas') echo 'selected'; ?>>Texas</option>
<option value = "Utah" <?php if (($_REQUEST['sel_bill_stat e']) == 'Utah') echo 'selected'; ?>>Utah</option>
<option value = "Vermont" <?php if (($_REQUEST['sel_bill_stat e']) == 'Vermont') echo 'selected'; ?>>Vermont</option>
<option value = "Virginia" <?php if (($_REQUEST['sel_bill_stat e']) == 'Virginia') echo 'selected'; ?>>Virginia</option>
<option value = "Washington" <?php if (($_REQUEST['sel_bill_stat e']) == 'Washington') echo 'selected'; ?>>Washington</option>
<option value = "WestVirginia" <?php if (($_REQUEST['sel_bill_stat e']) == 'WestVirginia') echo 'selected'; ?>>West Virginia</option>
<option value = "Wisconsin" <?php if (($_REQUEST['sel_bill_stat e']) == 'Wisconsin') echo 'selected'; ?>>Wisconsin</option>
<option value = "Wyoming" <?php if (($_REQUEST['sel_bill_stat e']) == 'Wyoming') echo 'selected'; ?>>Wyoming</option>
</select>
</font></td>
</tr>
<tr>
<td width="576" align="right"><font size="2">Zip:</font></td>
<td width="576">
<font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_bill_zip" size="10" value = "<?php if (isset($_REQUEST['txt_bill _zip'])) echo $_REQUEST['txt_bill_zip']; ?>">
</font></td>
</tr>
<tr>
<td width="576" align="right"><font size="2">Company:</font></ td>
<td width="576">
<font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_company" id="txt_company" value = "<?php if (isset($txt_company)) echo $txt_company; ?>" size="12">
</font></td>
</tr>
<tr>
<td align="right"><font size="2">*E-Mail Address:</font></td>
<td><font size="2" face="Arial, Helvetica, sans-serif">
<input type="text" name="txt_email" size="30" value = "<?php if (isset($_REQUEST['txt_emai l'])) echo $_REQUEST['txt_email']; ?>">
</font></td>
</tr>
<tr>
<td align="right"><font size="2">*Create Password:</font></td>
<td><font size="2" face="Arial, Helvetica, sans-serif">
<input type="password" name="txt_password" size="12" value = "<?php if (isset($_REQUEST['txt_pass word'])) echo $_REQUEST['txt_password']; ?>">
</font></td>
</tr>
<tr>
<td width="576" align="right"> </td>
<td width="576"> </td>
</tr>
<tr>
<td width="576" align="center" colspan="2">
<input type="submit" value="Submit" name="submit_new_profile" style="font-size: 14pt; font-weight: bold"></td>
</tr>
</table>
<p> </p>
</form>
</div>
</body>
</html>
I am creating a form where a user can enter their profile info. Once entered the info is put into a db and they can later login using their username and password. Below is the code i have so far and now i am stuck...
I get the following errors when the code is executed:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /usr/www/users/profile_new
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /usr/wwwu/sers/profile_new
Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/profile_new
This is the first time i have used Session variables and im not sure what the problem is...
<html>
<!-- profile_new.php - the form page for creatign a new profile -->
<head><title>Welcome</titl
<?php
$host = "xxxx";
$user = "xxxx";
$password ="xxxx";
$db_name = "xxxx";
// initializing a blank error message
// this will be used to accumulate the input errors
// in order to feed them back to the user
$error_message = "";
// checking to make sure the form has actually been submitted
if ($submit_new_profile != "")
{
// if it has been submitted
// each of the form entries will be examined
// to see which have been omitted
if ($_REQUEST['txt_email'] == "")
{
$error_message = "$error_message<br>You have omitted your email address.";
}
else
{
$link = mysql_connect($host, $user, $password) or die (mysql_error());
Mysql_select_db("dmotion_h
$query_string = "SELECT * FROM profile WHERE (email = '$txt_email')";
$result_set = mysql_db_query($db_name, $query_string, $link);
while ($row = mysql_fetch_array($result_
{
$error_message = "$error_message<br><br>Thi
}
mysql_close($link);
}
if ($_REQUEST['txt_password']
{
$error_message = "$error_message<br>You have omitted your password.";
}
if ($_REQUEST['txt_bill_first
{
$error_message = "$error_message<br>You have omitted your first name.";
}
if ($_REQUEST['txt_bill_last_
{
$error_message = "$error_message<br>You have omitted your last name.";
}
if ($_REQUEST['txt_member_num
{
$error_message = "$error_message<br>You have omitted the your member number.";
}
if ($error_message != "")
{
echo ("<br><center><font color=ff0000 size=4> $error_message </font></center>");
}
else
{
// user session
session_start();
$_SESSION["active_profile"
$_SESSION["email_original"
$_SESSION["password_origin
$_SESSION["bill_first_name
$_SESSION["bill_last_name"
$_SESSION["member_number"]
$_SESSION["bill_address"] = $txt_bill_address;
$_SESSION["bill_city"] = $txt_bill_city;
$_SESSION["bill_state"] = $sel_bill_state;
$_SESSION["bill_zip"] = $txt_bill_zip;
$_SESSION["bill_phone"] = $txt_bill_phone;
$_SESSION["bill_company"] = $txt_company;
$link = mysql_connect($host, $user, $password) or die (mysql_error());
Mysql_select_db("xxxx") or die(mysql_error());
// query string
$query_string = "INSERT INTO profile
VALUES ('0',
'$txt_email',
'$txt_password',
'$txt_bill_first_name',
'$txt_bill_last_name',
'$txt_member_number',
'$txt_bill_address',
'$txt_bill_city',
'$sel_bill_state',
'$txt_bill_zip',
'$txt_bill_phone',
'$txt_company',
Now( ))";
// executing the SQL statement
mysql_db_query($db_name, $query_string, $link);
mysql_close($link);
header("location:profile_a
}
}
?>
<br><br>
<div align="center">
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<table border="0" cellpadding="6" cellspacing="0" width="600" id="table1">
<tr>
<td colspan = 2 align=center><b><font size="4">*</font> denotes a required entry</b></td>
</tr>
<tr>
<td width="576" align="right"> </td>
<td width="576"> </td>
</tr>
<tr>
<td width="576" align="right"><font size="2">*First Name:</font></td>
<td width="576">
<font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_bill_first_name"
</font></td>
</tr>
<tr>
<td align="right"><font size="2">*Last Name:</font></td>
<td><font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_bill_last_name" size="20" value = "<?php if (isset($_REQUEST['txt_bill
</font></td>
</tr>
<tr>
<td align="right"><font size="2">*Member Number :</font></td>
<td><font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_member_number" size="12" value = "<?php if (isset($txt_member_number)
</font></td>
</tr>
<tr>
<td align="right"><font size="2">Phone Number:</font></td>
<td><font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_bill_phone" size="12" value = "<?php if (isset($txt_bill_phone)) echo $txt_bill_phone; ?>">
</font></td>
</tr>
<tr>
<td width="576" align="right"><font size="2"> Address:</font></td>
<td width="576">
<font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_bill_address" size="40" value = "<?php if (isset($_REQUEST['txt_bill
</font></td>
</tr>
<tr>
<td width="576" align="right"><font size="2">City:</font></td>
<td width="576">
<font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_bill_city" size="20" value = "<?php if (isset($_REQUEST['txt_bill
</font></td>
</tr>
<tr>
<td width="576" align="right"><font size="2">State:</font></td
<td width="576">
<font size="2" face="Arial, Helvetica, sans-serif">
<select size="1" name="sel_bill_state">
<option value = "no_select" <?php if (($_REQUEST['sel_bill_stat
<option value = "Alabama" <?php if (($_REQUEST['sel_bill_stat
<option value = "Alaska" <?php if (($_REQUEST['sel_bill_stat
<option value = "Arizona" <?php if (($_REQUEST['sel_bill_stat
<option value = "Arkansas" <?php if (($_REQUEST['sel_bill_stat
<option value = "California" <?php if (($_REQUEST['sel_bill_stat
<option value = "Colorado" <?php if (($_REQUEST['sel_bill_stat
<option value = "Connecticut" <?php if (($_REQUEST['sel_bill_stat
<option value = "Delaware" <?php if (($_REQUEST['sel_bill_stat
<option value = "Florida" <?php if (($_REQUEST['sel_bill_stat
<option value = "Georgia" <?php if (($_REQUEST['sel_bill_stat
<option value = "Hawaii" <?php if (($_REQUEST['sel_bill_stat
<option value = "Idaho" <?php if (($_REQUEST['sel_bill_stat
<option value = "Illinois" <?php if (($_REQUEST['sel_bill_stat
<option value = "Indiana" <?php if (($_REQUEST['sel_bill_stat
<option value = "Iowa" <?php if (($_REQUEST['sel_bill_stat
<option value = "Kansas" <?php if (($_REQUEST['sel_bill_stat
<option value = "Kentucky" <?php if (($_REQUEST['sel_bill_stat
<option value = "Louisiana" <?php if (($_REQUEST['sel_bill_stat
<option value = "Maine" <?php if (($_REQUEST['sel_bill_stat
<option value = "Maryland" <?php if (($_REQUEST['sel_bill_stat
<option value = "Massachusetts" <?php if (($_REQUEST['sel_bill_stat
<option value = "Michigan" <?php if (($_REQUEST['sel_bill_stat
<option value = "Minnesota" <?php if (($_REQUEST['sel_bill_stat
<option value = "Mississippi" <?php if (($_REQUEST['sel_bill_stat
<option value = "Missouri" <?php if (($_REQUEST['sel_bill_stat
<option value = "Montana" <?php if (($_REQUEST['sel_bill_stat
<option value = "Nebraska" <?php if (($_REQUEST['sel_bill_stat
<option value = "Nevada" <?php if (($_REQUEST['sel_bill_stat
<option value = "NewHampshire" <?php if (($_REQUEST['sel_bill_stat
<option value = "NewJersey" <?php if (($_REQUEST['sel_bill_stat
<option value = "NewMexico" <?php if (($_REQUEST['sel_bill_stat
<option value = "NewYork" <?php if (($_REQUEST['sel_bill_stat
<option value = "NorthCarolina" <?php if (($_REQUEST['sel_bill_stat
<option value = "NorthDakota" <?php if (($_REQUEST['sel_bill_stat
<option value = "Ohio" <?php if (($_REQUEST['sel_bill_stat
<option value = "Oklahoma" <?php if (($_REQUEST['sel_bill_stat
<option value = "Oregon" <?php if (($_REQUEST['sel_bill_stat
<option value = "Pennsylvania" <?php if (($_REQUEST['sel_bill_stat
<option value = "RhodeIsland" <?php if (($_REQUEST['sel_bill_stat
<option value = "SouthCarolina" <?php if (($_REQUEST['sel_bill_stat
<option value = "SouthDakota" <?php if (($_REQUEST['sel_bill_stat
<option value = "Tennessee" <?php if (($_REQUEST['sel_bill_stat
<option value = "Texas" <?php if (($_REQUEST['sel_bill_stat
<option value = "Utah" <?php if (($_REQUEST['sel_bill_stat
<option value = "Vermont" <?php if (($_REQUEST['sel_bill_stat
<option value = "Virginia" <?php if (($_REQUEST['sel_bill_stat
<option value = "Washington" <?php if (($_REQUEST['sel_bill_stat
<option value = "WestVirginia" <?php if (($_REQUEST['sel_bill_stat
<option value = "Wisconsin" <?php if (($_REQUEST['sel_bill_stat
<option value = "Wyoming" <?php if (($_REQUEST['sel_bill_stat
</select>
</font></td>
</tr>
<tr>
<td width="576" align="right"><font size="2">Zip:</font></td>
<td width="576">
<font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_bill_zip" size="10" value = "<?php if (isset($_REQUEST['txt_bill
</font></td>
</tr>
<tr>
<td width="576" align="right"><font size="2">Company:</font></
<td width="576">
<font size="2" face="Arial, Helvetica, sans-serif">
<input name="txt_company" id="txt_company" value = "<?php if (isset($txt_company)) echo $txt_company; ?>" size="12">
</font></td>
</tr>
<tr>
<td align="right"><font size="2">*E-Mail Address:</font></td>
<td><font size="2" face="Arial, Helvetica, sans-serif">
<input type="text" name="txt_email" size="30" value = "<?php if (isset($_REQUEST['txt_emai
</font></td>
</tr>
<tr>
<td align="right"><font size="2">*Create Password:</font></td>
<td><font size="2" face="Arial, Helvetica, sans-serif">
<input type="password" name="txt_password" size="12" value = "<?php if (isset($_REQUEST['txt_pass
</font></td>
</tr>
<tr>
<td width="576" align="right"> </td>
<td width="576"> </td>
</tr>
<tr>
<td width="576" align="center" colspan="2">
<input type="submit" value="Submit" name="submit_new_profile" style="font-size: 14pt; font-weight: bold"></td>
</tr>
</table>
<p> </p>
</form>
</div>
</body>
</html>
ASKER
I just deleted the html tags and it works now...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
From the code, I can't determine how much information you are trying to store in the cookie.
Could the problem be related to too much information being stored in the cookie?
Have you considered storing the information in your server database, and only saving a minimal amount of information on the client side?
You state "I get the following errors when the code is executed" Is this true the very first time you execute the code? Or only after information is saved in a cookie?
You might want to search google for +javascript +cookies.
Good luck