0

I'm having a little trouble understanding saving state data properly.
What I have is 3 forms, which go into a summary, and then the user can click on register and register for the seminars. The data is then submitted to a database.

Each form has a next and back button. Along with a Start over button which brings them back to the start of the registration and clears the session.

Where my problem lies is when I press the back button on each form, I get invalid index errors from the previous session. If I don't press the back button everything works correctly. So something is wrong with my back button code, and or I'm not saving the state data correctly.

Here are my forms.

Form 1:

<?php
	session_start();
	$_SESSION = array();
	session_destroy();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Conference</title>
<meta http-equiv="content-type"
	content="txt/html; charset=iso-8859-1" />
</head>
<body>
<h2>Professional Conference</h2>
<h2>Personal Information</h2>
<form action="Conference_Company.php" method="post">
<p>First Name:<input type="text" name="first_name" /> Last Name:<input type="text" name="last_name" /></p>
<p>Address:<input type="text" name="address" /> City:<input type="text" name="city" /></p>
<p>State:<input type="text" name="state" /> Zip:<input type="text" name="zip" /></p>
<p>Phone Number:<input type="text" name="phone_num" /></p>
<p>E-mail:<input type="text" name="e_mail" /></p>
<hr>
<p><input type="submit" value="Next" /></p>
</form>

<form action="Conference_Start.php" method="get">
<p><input type="submit" value="Start Over" /></p>
</form>
</body>
</html>

Form 2:

<?php
session_start();
$_SESSION['first_name'] = $_POST['first_name'];	
$_SESSION['last_name'] = $_POST['last_name'];	
$_SESSION['address'] = $_POST['address'];	
$_SESSION['city'] = $_POST['city'];	
$_SESSION['state'] = $_POST['state'];	
$_SESSION['zip'] = $_POST['zip'];	
$_SESSION['phone_num'] = $_POST['phone_num'];
$_SESSION['e_mail'] = $_POST['e_mail'];	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Conference</title>
<meta http-equiv="content-type"
	content="txt/html; charset=iso-8859-1" />
</head>
<body>
<form action="Conference_Seminars.php" method="post">
<h2>Professional Conference</h2>
<h2>Company Information</h2>
<p>Company Name:<input type="text" name="company_name" /></p>
<p>Address:<input type="text" name="com_address"  />City:<input type="text" name="com_city" /></p>
<p>State:<input type="text" name="com_state" />Zip:<input type="text" name="com_zip" /></p>
<p>Phone Number:<input type="text" name="com_phone" /></p>
<hr>
<p><input type="submit" value="Next" /></p>
</form>

<form action="Conference_Start.php" method="get">
<p><input type="submit" value="Back" /></p>
</form>

<form action="Conference_Start.php" method="get">
<p><input type="submit" value="Start Over" /></p>
</form>
</body>
</html>

Form 3:

<?php
session_start();
$_SESSION['company_name'] = $_POST['company_name'];	
$_SESSION['com_address'] = $_POST['com_address'];	
$_SESSION['com_city'] = $_POST['com_city'];	
$_SESSION['com_state'] = $_POST['com_state'];	
$_SESSION['com_zip'] = $_POST['com_zip'];	
$_SESSION['com_phone'] = $_POST['com_phone'];	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Conference</title>
<meta http-equiv="content-type"
	content="txt/html; charset=iso-8859-1" />
</head>
<body>
<h2>Professional Conference</h2>
<h2>Seminars</h2>
<form action="Conference_Summary.php" method="post">
<table border="3" cellpadding="3">
<tr>
<td><p><strong>Java Script:</strong></td>
<td><input type="radio" value="Yes" name="Java" />Yes<input type="radio" value="No" name="Java" />No</td></p>
</tr>

<tr>
<td><p><strong>PHP:</strong></td>
<td><input type="radio" value="Yes" name="PHP" />Yes<input type="radio" value="No" name="PHP" />No</td></p>
</tr>

<tr>
<td><p><strong>MySQL:</strong></td>
<td><input type="radio" value="Yes" name="MYSQL">Yes<input type="radio" value="No" name="MYSQL" />No</td></p>
</tr>

<tr>
<td><p><strong>Apache:</strong>
<td><input type="radio" value="Yes" name="Apache">Yes<input type="radio" value="No" name="Apache" />No</td></p>
</tr>

<tr>
<td><p><strong>Web Services:</strong></td>
<td><input type="radio" value="Yes" name="WebServ">Yes<input type="radio" value="No" name="WebServ" />No</td></p>
</tr></table>
<hr>
<p><input type="submit" name="next" value="Next" /></p>
</form>

<form action="Conference_Company.php" method="get">
<p><input type="submit" value="Back" /></p>
</form>

<form action="Conference_Start.php" method="get">
<p><input type="submit" value="Start Over" /></p>
</form>
</body>
</html>

Any help is much appreciated. Thanks.

Edited by SMHouston: n/a

2
Contributors
8
Replies
12
Views
7 Years
Discussion Span
Last Post by SMHouston
0

If you are pressing the back button, is it that the page is trying to load POST data (after the session_start), but that no post data exists 'coz you didn't arrive at the page via a form?

0

Yeah, it's trying to load the previous sessions post data basically, is there a way of stopping that or will that always happen?

Or, do I need to set each $_POST data to a variable say $FirstName = $_SESSION instead of $_SESSION = $_POST...not sure what to do there.

I also haven't played around with hidden submissions, Is that something I need to do instead with the the next button, is save each variable into a hidden variable through each form?

Edited by SMHouston: n/a

0

I think that you need to have a

if(isset($_POST[...]){
...
}

to check for form submission (normal form advance). If the particular $_POST var is not set, then you've arrived at the page via back button or direct entry of the url into the address bar. This is me guessing here.

0

Ok, think I'm missing something. Gonna go back from the beginning.

I have the forms. If i go right through the entire form and don't press back everything works correctly. On the pages if I press back I get invalid index errors because its trying to read $_POST data that isn't there, but here is my question...shouldn't it still be there because it is in the session? I have tried if (isset) on the current page and next page of each form for the variables and I'm still getting the errors whenever I press the back button. I deleted the code out to get it back to "working" condition the way I had it to start with.21

Secondly, I'm having trouble setting up the register page to check if the user is already registered via their email, if they are die if they aren't stick them in the table. So I guess my question is, can I do it in the register code or do I need to have a seperate script for that, because when I put an if..else statement in the register page it always goes to "You have already registered" even if i use mysqli_fetch_rows and enter a new email it still does it. Ahh confusion setting in....

Here is my entire program:

Conference_Start.php

<?php
	session_start();
	$_SESSION = array();
	session_destroy();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Conference</title>
<meta http-equiv="content-type"
	content="txt/html; charset=iso-8859-1" />
</head>
<body>
<h2>Professional Conference</h2>
<h2>Personal Information</h2>
<form action="Conference_Company.php" method="post">
<p>First Name:<input type="text" name="first_name" /> Last Name:<input type="text" name="last_name" /></p>
<p>Address:<input type="text" name="address" /> City:<input type="text" name="city" /></p>
<p>State:<input type="text" name="state" /> Zip:<input type="text" name="zip" /></p>
<p>Phone Number:<input type="text" name="phone_num" /></p>
<p>E-mail:<input type="text" name="e_mail" /></p>
<hr>
<p><input type="submit" value="Next" /></p>
</form>

<form action="Conference_Start.php" method="get">
<p><input type="submit" value="Start Over" /></p>
</form>
</body>
</html>

Conference_Company.php

<?php
session_start();
$_SESSION['first_name'] = $_POST['first_name'];	
$_SESSION['last_name'] = $_POST['last_name'];	
$_SESSION['address'] = $_POST['address'];	
$_SESSION['city'] = $_POST['city'];	
$_SESSION['state'] = $_POST['state'];	
$_SESSION['zip'] = $_POST['zip'];	
$_SESSION['phone_num'] = $_POST['phone_num'];
$_SESSION['e_mail'] = $_POST['e_mail'];	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Conference</title>
<meta http-equiv="content-type"
	content="txt/html; charset=iso-8859-1" />
</head>
<body>
<form action="Conference_Seminars.php" method="post">
<h2>Professional Conference</h2>
<h2>Company Information</h2>
<p>Company Name:<input type="text" name="company_name" /></p>
<p>Address:<input type="text" name="com_address"  />City:<input type="text" name="com_city" /></p>
<p>State:<input type="text" name="com_state" />Zip:<input type="text" name="com_zip" /></p>
<p>Phone Number:<input type="text" name="com_phone" /></p>
<hr>
<p><input type="submit" value="Next" /></p>
</form>

<form action="Conference_Start.php" method="get">
<p><input type="submit" value="Back" /></p>
</form>

<form action="Conference_Start.php" method="get">
<p><input type="submit" value="Start Over" /></p>
</form>
</body>
</html>

Conference_Seminars.php

<?php
session_start();
$_SESSION['company_name'] = $_POST['company_name'];	
$_SESSION['com_address'] = $_POST['com_address'];	
$_SESSION['com_city'] = $_POST['com_city'];	
$_SESSION['com_state'] = $_POST['com_state'];	
$_SESSION['com_zip'] = $_POST['com_zip'];	
$_SESSION['com_phone'] = $_POST['com_phone'];	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Conference</title>
<meta http-equiv="content-type"
	content="txt/html; charset=iso-8859-1" />
</head>
<body>
<h2>Professional Conference</h2>
<h2>Seminars</h2>
<form action="Conference_Summary.php" method="post">
<table border="3" cellpadding="3">
<tr>
<td><p><strong>Java Script:</strong></td>
<td><input type="radio" value="Yes" name="Java" />Yes<input type="radio" value="No" name="Java" />No</td></p>
</tr>

<tr>
<td><p><strong>PHP:</strong></td>
<td><input type="radio" value="Yes" name="PHP" />Yes<input type="radio" value="No" name="PHP" />No</td></p>
</tr>

<tr>
<td><p><strong>MySQL:</strong></td>
<td><input type="radio" value="Yes" name="MYSQL">Yes<input type="radio" value="No" name="MYSQL" />No</td></p>
</tr>

<tr>
<td><p><strong>Apache:</strong>
<td><input type="radio" value="Yes" name="Apache">Yes<input type="radio" value="No" name="Apache" />No</td></p>
</tr>

<tr>
<td><p><strong>Web Services:</strong></td>
<td><input type="radio" value="Yes" name="WebServ">Yes<input type="radio" value="No" name="WebServ" />No</td></p>
</tr></table>
<hr>
<p><input type="submit" name="next" value="Next" /></p>
</form>

<form action="Conference_Company.php" method="get">
<p><input type="submit" value="Back" /></p>
</form>

<form action="Conference_Start.php" method="get">
<p><input type="submit" value="Start Over" /></p>
</form>
</body>
</html>

Conference_Summary.php

<?php
	session_start();
	$_SESSION['Java'] = $_POST['Java']; 
	$_SESSION['PHP'] = $_POST['PHP'];
	$_SESSION['MYSQL'] = $_POST['MYSQL'];
	$_SESSION['Apache'] = $_POST['Apache'];
	$_SESSION['WebServ'] = $_POST['WebServ'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Conference</title>
<meta http-equiv="content-type"
	content="txt/html; charset=iso-8859-1" />
</head>
<body>
<h2>Summary</h2>
<p>You entered the following information.</p>
<?php
$FirstName = $_SESSION['first_name'];
$LastName = $_SESSION['last_name'];
$Address = $_SESSION['address'];
$City = $_SESSION['city'];
$State = $_SESSION['state'];
$Zip = $_SESSION['zip'];
$Phone = $_SESSION['phone_num'];
$Email = $_SESSION['e_mail'];
$CompanyName = $_SESSION['company_name'];
$ComAddress = $_SESSION['com_address'];
$ComCity = $_SESSION['com_city'];
$ComState = $_SESSION['com_state'];
$ComZip = $_SESSION['com_zip'];
$ComPhone = $_SESSION['com_phone'];
$Java = $_SESSION['Java'];
$Php = $_SESSION['PHP'];
$SQL = $_SESSION['MYSQL'];
$Apache = $_SESSION['Apache'];
$WebServ = $_SESSION['WebServ'];

print("<table border=\"3\" cellPadding=\"15\">");
print("<tr><td><strong><center><a href='Conference_Start.php'>Personal Information</a></center></strong><br />First Name: $FirstName<br />
	  Last Name: $LastName<br />Address: $Address<br />City: $City<br />State: $State<br />
	  Zip: $Zip<br />Phone: $Phone<br />E-mail: $Email</td>");
print("<td><strong><center><a href='Conference_Company.php'>Company Information</a></center></strong><br />Company Name: $CompanyName<br />
	   Address: $ComAddress<br />City: $ComCity<br />State: $ComState<br />
	   Zip: $ComZip<br />Phone: $ComPhone<br /><br /><br /></td>");
print("<td><strong><center><a href='Conference_Seminars.php'>Seminars</a></center></strong><br />JavaScript seminar: $Java<br />
      PHP seminar: $Php<br />MySQL seminar: $SQL<br />Apache seminar: $Apache<br />
	  Web services seminar : $WebServ<br /><br /><br /><br /></td>");
print("</tr>");
print("</table");
?>
<hr>
<form action="Conference_Register.php" method="get">
<p><input type="submit" value="Register" /></p>
</form>

<form action="Conference_Seminars.php" method="get">
<p><input type="submit" value="Back" /></p>
</form>

<form action="Conference_Start.php" method="get">
<p><input type="submit" value="Start Over" /></p>
</form>
</body>
</html>

Conference_Register.php

<?php
	session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Conference</title>
<meta http-equiv="content-type"
	content="txt/html; charset=iso-8859-1" />
</head>
<body>
<h2>Conference Registration</h2>
<?php
/* ==== Code to connect to the database ==== */
$DBConnect = @mysqli_connect("localhost", "shawnhouston", "precision9")
	Or die("<p>Unable to connect to the database server.</p>"
	. "<p>Error code " . mysqli_connect_errno()
	. ": " . mysqli_connect_error()) . "</p>";
	
/* ==== Code to create hit_counter database if it does not already exist ==== */
$DBName = "conference_registration";
if (!@mysqli_select_db($DBConnect, $DBName)) {
	$SQLstring = "CREATE DATABASE $DBName";
	$QueryResult = @mysqli_query($DBConnect, $SQLstring)
		Or die("<p>Unable to execute the query.</p>"
		. "<p>Error code " . mysqli_errno($DBConnect)
		. ": " . mysqli_error($DBConnect)) . "</p>";
	echo "<p>Successfully created the database</p>";
	mysqli_select_db($DBConnect, $DBName);
}

/* ==== Code to create the table and give each candidate a candID === */
$TableName = "attendees";
$SQLstring = "SELECT * FROM $TableName";
$QueryResult = @mysqli_query($DBConnect, $SQLstring);
if (!$QueryResult) {
		$SQLstring = "CREATE TABLE $TableName (candID SMALLINT
		NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(40), last_name VARCHAR(40),
		address VARCHAR(40), city VARCHAR(40), state VARCHAR(2), zip VARCHAR(5),
		phone_num VARCHAR(15), e_mail VARCHAR(40), company_name VARCHAR(40), com_address VARCHAR(40),
		com_city VARCHAR(40), com_state VARCHAR(2), com_zip VARCHAR(5), com_phone VARCHAR(15),
		Java VARCHAR(3), PHP VARCHAR(3), MYSQL VARCHAR(3), Apache VARCHAR(3), WebServ VARCHAR(3))";
		$QueryResult = @mysqli_query($DBConnect, $SQLstring)
		Or die("<p>Unable to create the table.</p>"
		. "<p>Error code " . mysqli_errno($DBConnect)
		. ": " . mysqli_error($DBConnect)) . "</p>";
	echo "<p>Successfully created the attendees table</p>";
}

/* ==== Adds the candidate to the database and closes the connection ==== */
$FirstName = addslashes($_SESSION['first_name']);
$LastName = addslashes($_SESSION['last_name']);
$Address = addslashes($_SESSION['address']);
$City = addslashes($_SESSION['city']);
$State = addslashes($_SESSION['state']);
$Zip = addslashes($_SESSION['zip']);
$Phone = addslashes($_SESSION['phone_num']);
$Email = addslashes($_SESSION['e_mail']);
$ComName = addslashes($_SESSION['company_name']);
$ComAddress = addslashes($_SESSION['com_address']);
$ComCity = addslashes($_SESSION['com_city']);
$ComState = addslashes($_SESSION['com_state']);
$ComZip = addslashes($_SESSION['com_zip']);
$ComPhone = addslashes($_SESSION['com_phone']);
$Java = addslashes($_SESSION['Java']);
$PHP = addslashes($_SESSION['PHP']);
$MYSQL = addslashes($_SESSION['MYSQL']);
$Apache = addslashes($_SESSION['Apache']);
$WebServ = addslashes($_SESSION['WebServ']);

$SQLstring = "INSERT INTO $TableName VALUES(NULL, '$FirstName',
	'$LastName', '$Address', '$City', '$State', '$Zip', '$Phone', '$Email',
	'$ComName', '$ComAddress', '$ComCity', '$ComState', '$ComZip', '$ComPhone', 
	'$Java', '$PHP', '$MYSQL', '$Apache', '$WebServ')";
$QueryResult = @mysqli_query($DBConnect, $SQLstring)
	Or die("<p>Unable to execute the query.</p>"
		. "<p>Error code " . mysqli_errno($DBConnect)
		. ": " . mysqli_error($DBConnect)) . "</p>";
echo "<p>You have successfully registered for the conference</p>";

mysqli_close($DBConnect);
?>
</body>
</html>
1

I'll give your first poser a bash:

1. check for post variables with isset($_POST[..whatever...])
This should apply for form form advance ONLY
2. if not set, check for session variables isset($_SESSION[...whatever...])
I *think* this'll work for BACK button situations
3. if none set, user has hardcoded the url into the address bar or has gone through via bookmark - in this case bump user to the first form via header().

Votes + Comments
Yep!
0

Ok, got it to work like that thanks. While working on that I went through and made a log in page, etc that will validate the user, and allow them to update information if they are returning or start a new registration process.

I've ran into a snag and don't understand where my code is wrong. I have a form, that should draw from the database and fill in the update form so the user can see their entered information. However, when the form loads it loads the text boxes like this....

First Name: <?= $FirstName ?> etc.....

Here's the form:

<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Conference</title>
<meta http-equiv="content-type"
	content="txt/html; charset=iso-8859-1" />
</head>
<body>
<h1>Update Conference Information</h1>
<?php
if (isset($_COOKIE['regID']))
	$RegID = $_COOKIE['regID'];
	
$DBConnect = @mysqli_connect("localhost", "XXXXXXX", "XXXXX")
	Or die("<p>Unable to connect to the database server.</p>"
	. "</p>Error code " . mysqli_connect_errno()
	. ": " . mysqli_connect_error()) . "</p>";
$DBName = "conference_registration";
@mysqli_select_db($DBConnect, $DBName)
	Or die("<p>Unable to select the database.</p>"
	. "<p>Error code " . mysqli_errno($DBConnect)
	. ": " . mysqli_error($DBConnect)) . "</p>";
	
$TableName = "attendees";
$SQLstring = "SELECT * FROM $TableName WHERE regID='$RegID'";
$QueryResult = @mysqli_query($DBConnect, $SQLstring)
	Or die("<p>Unable to execute the query.</p>"
	. "<p>Error code " . mysqli_errno($DBConnect)
	. ": " . mysqli_error($DBConnect)) . "</p>";

if (mysqli_num_rows($QueryResult) > 0) {
	$Row = mysqli_fetch_row($QueryResult);
	$FirstName = stripslashes($Row[1]);
	$LastName = stripslashes($Row[2]);
	$Address = stripslashes($Row[3]);
	$City = stripslashes($Row[4]);
	$State = stripslashes($Row[5]);
	$Zip = stripslashes($Row[6]);
	$Phone = stripslashes($Row[7]);
	$Email = stripslashes($Row[8]);
	$ComName = stripslashes($Row[9]);
	$ComAddress = stripslashes($Row[10]);
	$ComCity = stripslashes($Row[11]);
	$ComState = stripslashes($Row[12]);
	$ComZip = stripslashes($Row[13]);
	$ComPhone = stripslashes($Row[14]);
	$Java = stripslashes($Row[15]);
	$PHP = stripslashes($Row[16]);
	$MYSQL = stripslashes($Row[17]);
	$Apache = stripslashes($Row[18]);
	$WebServ = stripslashes($Row[19]);
}
else {
	$FirstName = "";
	$LastName = "";
	$Address = "";
	$City = "";
	$State = "";
	$Zip = "";
	$Phone = "";
	$Email = "";
	$ComName = "";
	$ComAddress = "";
	$ComCity = "";
	$ComState = "";
	$ComZip = "";
	$ComPhone = "";
	$Java = "";
	$PHP = "";
	$MYSQL = "";
	$Apache = "";
	$WebServ = "";
}
mysqli_close($DBConnect);
?>
<h2>Conference Registration Information</h2>
<form action="Conference_Update.php" method="post">
<h3><u>Personal Information</u></h3>
<p>First Name:<input type="text" name="first_name" value="<?= $FirstName ?>" /> Last Name:<input type="text" name="last_name" value="<?= $LastName ?>" /></p>
<p>Address:<input type="text" name="address" value="<?= $Address ?>" /> City:<input type="text" name="city" value="<?= $City ?>" /></p>
<p>State:<input type="text" name="state" value="<?= $State ?>" /> Zip:<input type="text" name="zip" value="<?= $Zip ?>" /></p>
<p>Phone Number:<input type="text" name="phone_num" value="<?= $Phone ?>" /></p>
<p>E-mail:<input type="text" name="e_mail" value="<?= $Email ?>" /></p>

<h3><u>Company Information</u></h3>
<p>Company Name:<input type="text" name="company_name" value="<?= $ComName ?>" /></p>
<p>Address:<input type="text" name="com_address"  value="<?= $ComAddress ?>" />City:<input type="text" name="com_city" value="<?= $ComCity ?>" /></p>
<p>State:<input type="text" name="com_state" value="<?= $ComState ?>" />Zip:<input type="text" name="com_zip" value="<?= $ComZip ?>" /></p>
<p>Phone Number:<input type="text" name="com_phone" value="<?= $ComPhone ?>" /></p>

<p><input type="submit" value="Update Information" /></p>
</form>
</body>
</html>

Now I know its tracking the correct user information because I can print the statements out correctly within the php code, but then the form part I can NOT get to output properly. Any help is much appreciated. Half tempted to put the form right into the php code, but really don't want to go that route.

Edited by SMHouston: n/a

0

Try using proper php tags instead of shortened echo tags:

<?php echo $FirstName;?>

Some servers won't accept short tags.

0

That worked, thanks a ton. Will have to remember that for future use. Gonna go ahead and marked this as solved. Thanks again Ardav :).

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.