printing php variables on html forms
Posted: Sat Jul 27, 2002 4:14 pm
Well, the title is somewhat self vague, but basically, I want to use a php echo to print the values of the variable of an html form. Php is installed on my system, but when I run the code the spaces where I put in a $variablename, the html and other text comes out, but it doesn't print the value of the variable. How can I fix this, or is there something I can do?
This is an example of the form source:
<form action="code.php" method=post>
<input type=text name="variable1" value="blue">
<input type=submit value="send">
</form>
This is the php code that I send the results of the above form:
<?php
echo "I like $variable1";
?>
If you know whats wrong, please help me.
This is an example of the form source:
<form action="code.php" method=post>
<input type=text name="variable1" value="blue">
<input type=submit value="send">
</form>
This is the php code that I send the results of the above form:
<?php
echo "I like $variable1";
?>
If you know whats wrong, please help me.