Page 1 of 1

yet another passing variables question

Posted: Thu Feb 27, 2003 4:40 pm
by knight
I would like to pass the variable $identbook's value to the next
page. All I get is the variable name as the value sent. I've tried
various combo's of quotes, double quotes.
Thanks :)

<form method="get" action="getbook.php">
<input type="submit" name="Confirm" value="Confirm your selection">
<input type="hidden" name="bookid" value=$identbook>
</form>

Posted: Thu Feb 27, 2003 5:36 pm
by volka
if this is a complete code-block then you're outside the php-block.
php only takes place within <?php ... ?> (maybe <? ?> and similar, too)
Use the

Code: Select all

-tag of this board to post php-code and you will see what's php and what's something else (that is output as is).
Do not forget to quote [b]each[/b] property of an element including [i]value[/i]
try

Code: Select all

<form method="get" action="getbook.php">
	<input type="submit" name="Confirm" value="Confirm your selection">
	<input type="hidden" name="bookid" value="<?php echo $identbook ?>">
</form>