holty
03-29-2003, 01:58 PM
Hi,
I'm new to PHP;)
I have a html page with a form on. I would like the values from teh form to be hidden in the next form (i.e. the page that the first form posts to). When I try I get undefined variable.
Here's my code:
html page:
<form name="form" method="post" action="test2.php">
<Select name="cbotest">
<option value="">Choose an option</option>
<option value="one">One</option>
<option value="two">Two</option>
<option value="three">Three</option>
<option value="four">Four</option>
</select>
</form>
test2.php
<input type="hidden" name="cbotest" value="<?php print $cbotest?>">
This is the result:
<input type="hidden" name="cbotest" value="<br />
<b>Notice</b>: Undefined variable: cbotest in <b>**removed**</b> on line <b>151</b><br />
I have removed where the script is :) Any ideas?
I'm new to PHP;)
I have a html page with a form on. I would like the values from teh form to be hidden in the next form (i.e. the page that the first form posts to). When I try I get undefined variable.
Here's my code:
html page:
<form name="form" method="post" action="test2.php">
<Select name="cbotest">
<option value="">Choose an option</option>
<option value="one">One</option>
<option value="two">Two</option>
<option value="three">Three</option>
<option value="four">Four</option>
</select>
</form>
test2.php
<input type="hidden" name="cbotest" value="<?php print $cbotest?>">
This is the result:
<input type="hidden" name="cbotest" value="<br />
<b>Notice</b>: Undefined variable: cbotest in <b>**removed**</b> on line <b>151</b><br />
I have removed where the script is :) Any ideas?