TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   $_POST problem (http://www.talkphp.com/absolute-beginners/5065-_post-problem.html)

Dave 10-27-2009 09:39 PM

$_POST problem
 
I working on another "learning" project. In this one, I am attempting to move a radio button selection ("varname") to another page in order to do a MySQL query, etc., using the $_POST method.

Both of the lines below seem to work the exact same within the HTML table statements that I'm using. However, with #1, the $_POST turns up empty. With #2, the $_POST does have the appropriate value.

1. <?php echo "value = $varname" ; ?>

2. value = "<?php $varname ?> "

What is the difference?

Thanks.

Dave 10-27-2009 09:49 PM

Wait...

Should statement #2 be...?

value = "<?php echo $varname ; ?>"

...Just thought about the ECHO.

Dave

Dave 10-27-2009 10:10 PM

Yesss! The echo solves the problem!


All times are GMT. The time now is 04:03 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0