Variable Help!
Posted: Fri Mar 13, 2009 1:53 pm
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
Hi Guys
I have two pages...page 1 looks like:
I am trying to store the $Job_ID and $Job_Name as a session variable...and my code for this is (at the top of page1)
And I am trying to use these variables in page2 as:
But this doesnt work. Can any1 tell me what I am doing wrong please.
Thank you
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
Hi Guys
I have two pages...page 1 looks like:
Code: Select all
$query = "SELECT * FROM Job_ID";
$result = mysql_query($query);
echo "<h1 class='title2'>Upcoming Project Roles</h1>
<p>From the menu below please select the Project Role:</p>
<form id='form2' method='post' action='go.php'>
<p>
<label>
<select name='job' id='job'>";
while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
$Job_ID=$row['Job_ID'];
$Job_Name= $row['Job_Name'];
echo "<option value=\"$Job_Name\">$Job_Name</option>";
}Code: Select all
Session_Start();
$_SESSION['$Job_ID']=$_POST['$Job_ID'];
$_SESSION['Job_Name']=$_POST['Job_Name']Code: Select all
<div class="title2"> <? echo $_SESSION['Job_ID'] echo $_SESSION['Job_Name'] ?> Specification:</div>Thank you
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: