Page 1 of 1

Problem using echo

Posted: Thu Aug 18, 2011 12:06 am
by qasim_353
I am having problem in output. when i output the following it shows something else:

Code: Select all

echo "<form method= "POST " action= "confirm.php?uid=<?php echo $uid; ?> "\>
<div class= "right "><input name= "Button " type= "button " onClick= "location.href='?uid=<?php echo $uid; ?>&sendmsg=1' " value= "Resend "\></div>
<span><input name= "code " type= "text " maxlength= "32 " style= "width:150px;text-align:left " value= " " tabindex= "1 " class= "form "\></span>
<input type= "submit " name= "Submit " value= "Confirm " tabindex= "2 " onClick= " "\>
</form>";

Re: Problem using echo

Posted: Thu Aug 18, 2011 1:30 am
by Christopher
You cant put <?php echo $uid; ?> inside PHP code. Just do:

Code: Select all

echo "<form method= "POST " action= "confirm.php?uid=$uid;"\>

Re: Problem using echo

Posted: Thu Aug 18, 2011 5:53 am
by phphelpme
You might also need to put your back slash in your script for your echo statements:

Code: Select all

echo "<form method=\"POST\" action=\"confirm.php?uid=".$uid."\"\>";
Best wishes