yet another passing variables question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
knight
Forum Newbie
Posts: 5
Joined: Tue Feb 25, 2003 5:34 pm
Location: B.C.

yet another passing variables question

Post 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>
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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>
Post Reply