HTH. I have solved the problem with this code: <?php session_name("TESTpostcard"); session_start(); session_register("name");
if (isset($HTTP_POST_VARS["name"])) //<--------- USE THIS $name = $HTTP_POST_VARS["name"]; //<-------- HERE <?php if($submit=="Submit") { echo"<FORM ACTION=\"$SCRIPT_NAME\" METHOD=\"POST\"> <INPUT TYPE=\"text\" NAME=\"name\" value=\"$name\"> <INPUT TYPE=submit name=\"Send\"> <center><img src=\"$SCRIPT_NAME?submit=Display\"></center> </FORM> "; } elseif($submit=="Send") { echo"<FORM ACTION=\"$SCRIPT_NAME\" METHOD=\"POST\"> <INPUT TYPE=\"text\" NAME=\"name\" value=\"$name\"> <center><img src=\"$SCRIPT_NAME?submit=Display\"></center> </FORM> "; } elseif($submit=="Display") { if($name) { header("Content-type: image/png"); $image = imagecreate(100, 100); $white = ImageColorAllocate ($image, 255, 255, 255);//Set this first as the background colour $black = imagecolorallocate($image, 0, 0, 0); ImageString($image,2,2,2,$name,$black); ImageInterlace($image, 1); ImagePNG($image); }else{ header("Content-type: image/png"); $image = imagecreate(100, 100); $white = ImageColorAllocate ($image, 255, 255, 255);//Set this first as the background colour $black = imagecolorallocate($image, 0, 0, 0); ImageString($image,2,2,2,"name is not set!",$black); ImageInterlace($image, 1); ImagePNG($image); } } else{ echo"Main Form:<FORM ACTION=\"$SCRIPT_NAME\" METHOD=\"POST\"> <INPUT TYPE=\"text\" NAME=\"name\" value=\"$name\"> <INPUT TYPE=submit name=\"Submit\"> <center><img src=\"$SCRIPT_NAME?submit=Display\"></center> </FORM> "; } //session_unregister("name"); //<------Tried this & failed ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]