astralaaron Posted January 28, 2008 Share Posted January 28, 2008 echo "<td><input type=\"text\" id=\"screenName\" name=\"screenName\" value=\"$_POST['screenName']\" size=\"50\"></td>";how can i add a variable like that to this codei must be really tired.. i thought i knew this one Link to comment Share on other sites More sharing options...
astralaaron Posted January 28, 2008 Author Share Posted January 28, 2008 value=" .$_POST['screenName'] ."that worked, sorry.. Link to comment Share on other sites More sharing options...
zppblood Posted January 28, 2008 Share Posted January 28, 2008 Put { } before and after $_POST['screenName']. <?php echo "You entered {$_POST['screenName']}";?> You can also use ' instead of " for strings, the difference between the two is that ' doesn't output that actual value of the variable, but output the variable name and doesn't output the special characters like \n, \r, etc. It's suppose to be a little faster when using ' as it doesn't have to do the extra work of finding the values of the variables/special characters and you don't have to escape " all the time when outputting the string with (X)HTML/XML on attribute values. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.