Can someone tell me why I cant get anything to echo properly with this?

<?php
session_start();

$_SESSION = $_POST;
$_SESSION = $_POST;
$_SESSION = $_POST;
$_SESSION = $_POST;
$_SESSION = $_POST;

?> ... This is on one page
<h2><a href="Conference_Start.php">Personal Information</a></h2>
<p>Company Name: <?php echo $_SESSION ?> <br />First Name: <?php echo $_SESSION ?> <br />Last Name: <?php echo $_SESSION?> <br />Phone: <?php echo $_SESSION?> <br />Email: <?php echo $_SESSION?> </p></td></tr></table>

I want the stuff on the first page to come out into a table on the 2nd page

Member Avatar for diafol

Can someone tell me why I cant get anything to echo properly with this?

You need a ';' at the end of all php lines.
Perhaps you're not sending any data - do

print_r($POST)

to see which variables are being passed by your form.

What Im trying to do is, I have a page1 where customer enters information and then what they put in there I want to echo into a table..

I put the info in and all i get is empty lines right by the headers

here is all of my code from page 1

<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Professional Conference</title>
</head>
<link rel="stylesheet" href="conf_php_styles.css" type="text/css" />
<meta http-equiv="content-type"
content="text/html; charset=iso-8859-1" />
<body>
<center><img src="conf.jpg"=></center>
<h1>Professional Conference</h1>
<h2>Personal Info</h2>
<span>*Required Field</span>
<form action="Conference_Seminars.php" method="post">
<p>Company Name<span>*</span><input type="text" name="company" id='company' /></p>
<p>First Name<span>*</span><input type="text" name="firstName" id='firstName' /></p>
<p>Last Name<span>*</span><input type="text" name="lastName" id='lastName' /></p>
<p>Phone Number<span>*</span><input type="text" name="phone" id='phone' /></p>
<p>E-mail<span>*</span><input type="text" name="email" id='email' /></p>
<p><input type="hidden" name="PHPSESSID" value='<?php echo session_id() ?>' />
<input type="submit" value="Next" /></p>
</form>
<form action="Conference_Restart.php" method="post">
<p><input type="submit" value="Start Over" /></p>
</form>
</body>
</html>

Here is next page

<?php
session_start();
$_SESSION['company'] = $_POST['company'];
$_SESSION['firstName'] = $_POST['firstName'];
$_SESSION['lastName'] = $_POST['lastName'];
$_SESSION['phone'] = $_POST['phone'];
$_SESSION['email'] = $_POST['email'];
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Professional Conference</title>
</head>
<link rel="stylesheet" href="conf_php_styles.css" type="text/css" />
<meta http-equiv="content-type"
content="text/html; charset=iso-8859-1" />

<body>
<h1>Personal Info Summary</h1>
<p>You entered the following.</p>
<table border="2" cellpadding="5">
<tr valign="top"><td>
<h2><a href="Conference_Start.php">Personal Information</a></h2>
<p>Company Name: <?php echo $_SESSION['company']; ?> <br />First Name: <?php echo $_SESSION['firstName']; ?> <br />Last Name: <?php echo $_SESSION['lastName']; ?> <br />Phone: <?php echo $_SESSION['phone']; ?> <br />Email: <?php echo $_SESSION['email']; ?> </p></td></tr></table>
<h2>Seminars</h2>
<p>You checked the following.</p>
<table border="2" cellpadding="5">
<tr valign="top"><td>

Hello,
please use code tags to make your codes more readable.
Also use suggestion above and print the output of POST SGA.

Sorry about that I am new to this..
I tried the print_r($POST)
and didnt get anything I am lost as to why its not working

<form action="Conference_Seminars.php" method="post">

Are you sure the file with above code is in same directory as Conference_Seminars.php

Yeah, I have another page with checkboxes that seem to work ok. Just cant get the code from page 1 to echo

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.