Rifts Posted August 21, 2010 Share Posted August 21, 2010 <form action="blabla"> <input type="hidden" name="user" value="<?php echo $player;?>"> </form or <input type="hidden" name="user" value=<?php echo $player;?>> or are they both wrong Quote Link to comment https://forums.phpfreaks.com/topic/211398-whats-the-correct-syntax-for-this-form/ Share on other sites More sharing options...
premiso Posted August 22, 2010 Share Posted August 22, 2010 Since you solved it, but never replied here is a response. There is no "clear" way to say the correct version as it depends on the needs. But here is a basic setup of a form in HTML: <form action="somepage.php" method="POST"> <input type="hidden" name="user" value="<?php echo $player; ?>"> </form> You want to use the quotes as if the $player value has weird characters in it it will mess up the form code. You should also make sure that $player does not have literal double quotes " in it, as that will break the form as well. Either or, hope that helps. Quote Link to comment https://forums.phpfreaks.com/topic/211398-whats-the-correct-syntax-for-this-form/#findComment-1102416 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.