Hi Guys,
hope someone can help me with this problem. In CGI I issue this command inside the script:
<input type=hidden name=color value=\"$FORM{'color'}\">
and whatever colour i pass from a form to the script it captures and keeps however i'm having problems doing this in php. I'm sure its something i'm doing wrong but I'm hoping someone can show me what i've done wrong.
here's my code:
session_start();
if (!isset($_SESSION['color']))
$_SESSION['color'] = 0;
$uid = isset($_POST['uid']) ? $_POST['uid'] : $_SESSION['uid'];
the above is registering my session.
then i've got this on my form part of the script:
echo("<table border=0><tr><td valign=middle><input name='msg' size=60></td>") ;
if (isset($_POST["submit"])){
$color = $_POST["color"];
$_SESSION['color'] = $color;
}
echo("<td valign=middle><input type='hidden' name='color' value='$color'>") ;
then this is the part that displays on my messages screen:
<font color='$color' face=verdana size=2><b>{$e[0]}</b> - {$e[2]}<br>
but it doesn't seem to pass the colour at any stage and when i view source all i get is the name=color value="0", the value =0 bit should detect the color. What could i be doing wrong?