I am trying to get sessions to work so i can pass a variable to the next page... i've tried even the simplest php code to get them to work:
<?php
session_start();
$hostname = "............
.
.
.
.
$connection = mysql_connect($hostname, $user, $password);
mysql_select_db($dbuse) or die("Could Not Connect to Database");
$SESSION['hid'] = 1;
$SESSION['account'] = 123457;
print("<TD>
<form method=\"post\" action=\"details2.php\">
<input type=\"hidden\" size=25 name=\"account\" value=$account>
<input type=\"hidden\" size=25 name=\"hid\" value=$hid>
<input type=\"submit\" name= \"submit100\" value=\"Details\">
</p>
</form>
</TD>\n");
?>
and get this result on the page:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /usr/local/apache/htdocs/test.php:2) in /usr/local/apache/htdocs/test.php on line 4
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/local/apache/htdocs/test.php:2) in /usr/local/apache/htdocs/test.php on line 4
and the same result when i hit the details button....
all i want to do is push the details button and have it send 2 variable to the next page - i can do this easily w/hidden form fields and have it go to a new large page, the problem is i need it to be a 400x800 page so i tried using this javascript i made:
window.open('details.php','Details','width=400,height=800');
return false;
and this as the start of the form:
<form method=\"post\" onSubmit=\"return openW();\" action=\"details.php\">
but the small window that pops up doesnt get any of the variables in the form...
This is for a senior design project thats due in 2 days... PLEASE help!
Thanx
Adam