Re: PHP_SELF

From: Date: Wed, 01 Aug 2001 19:49:53 +0000
Subject: Re: PHP_SELF
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-60764@lists.php.net to get a copy of this message
Ok, I would like to thank Ralph Guzman & Richard Lynch for your help. I combined your ideas into my own working example. Just posting here for archiving/discussion purposes... // Input some data // echo "<form action=\"$PHP_SELF\" method=\"POST\" enctype=\"multipart/form-data\">\n"; echo "1. Age:<br>\n"; echo "&nbsp &nbsp<input type=\"text\" name=\"Age\" size=\"4\" maxlength=\"2\" value=\"$Age\"><p>\n"; echo "2. Email:<br>\n"; echo "&nbsp &nbsp<input type=\"text\" name=\"Email\" size=\"25\" maxlength=\"30\" value=\"$Email\"><p>\n"; echo "&nbsp &nbsp<input type=\"submit\" name=\"submit\" value=\"Submit\">\n"; // Start error correction // if (!$HTTP_POST_VARS) { exit(); } elseif (!$Age) { echo "Please enter your age.<br>\n"; }
        elseif (!$Email) { echo "Please enter your email.<br>\n"; }
else { echo "Thanks for your submission.\n"; } // Do what you want with you sanitised strings // .......... :) Thanks again guys...

« previous php.general (#60764) next »