urlencode()???
Posted: Sun Mar 16, 2008 1:40 pm
Where I do wrong
Code: Select all
<HTML>
<HEAD>
<TITLE>Input text and format it</TITLE>
</HEAD>
<BODY>
<FORM method="post" action="ganuk.php">
<P>Input text:
<INPUT type="text" name="ftxt">
</P>
<?php
//COLOR CHOICE (URLENCODE)
$color = urlencode(2);
?>
<P>
<INPUT type="radio" name="color" value="blue"><FONT COLOR="blue" SIZE="5">Blue</FONT>
<BR>
<INPUT type="radio" name="color" value="green"><FONT COLOR="green" SIZE="5">Green</FONT>
<BR>
<INPUT type="radio" name="color" value="red"><FONT COLOR="red" SIZE="5">Green</FONT>
</P>
<P>
<INPUT type="submit" name="submit" value="Format">
</P>
</FORM>
<?php
if(color == blue) $color==urlencode("blue");
if(color == green) $color==urlencode("green");
if(color == red) $color==urlencode("red");
?>
</BODY>
</HTML>