----- Original Message ----- From: "Smile-Poet"
The problem is that this (the 'value=""' ' entry) appears on the form:
<?=$_POST['last_name'];?>
This means php isn't seeing the page before it's sent to the browser.
I bet you are running this on your local PC. And I bet you are double-clicking the shortcut to open it, or just putting the page address into the browser (file://C:/pages/mypage.htm style of thing), or smething instead of browsing http://localhost/mypage.htm, so that when it first shows up it isn't getting processed by the Web server and therefore the php is being seen and displayed by the browser instead of being processed by php.
The pages need to be .php not .htm in order to be processed by the PHP interpreter.
And, although the form code has this
<input name="req" type="hidden" id="req" value="process" >
and the script has this
switch ($_REQUEST['req']) {
I get an error message that 'req' is not defined.
Looks to me like a dumb mistake by the script author proving (s)he never tested it after writing it.. Should be $_POST['req'] - there is no REQUEST set of variables in php.
$_REQUEST does exist. http://www.php.net/manual/en/reserved.variables.php#reserved.variables.request
The script is complaining about $_REQUEST['req'] which does not exist the first time through unless you add it to the URL:
http://localhost/mypage.php?req=somevalue
That's not the best solution. Better would be to test if $_REQUEST['req'] exists and assign a value to a variable based on the result.
if (isset($_REQUEST['req']) { $myRequest = $_REQUEST['req']; } else { $myRequest = 'somevalue'; }
Then change the switch variable
switch ($myRequest) {
Note that 'somevalue' needs to be the actual value needed to make the form display empty.
I hope all this makes sense. It would be easier to explain with more of the script to look at.
Sheila -- Sheila Fenelon http://www.shefen.com/
____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED]
To set a personal password send an email to [EMAIL PROTECTED] with the words: "set WDVLTALK pw=yourpassword" in the body of the email.
To change subscription settings to the wdvltalk digest version:
http://wdvl.internet.com/WDVL/Forum/#sub
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at: Jupitermedia Corp. Attn: Discussion List Management 475 Park Avenue South New York, NY 10016
Please include the email address which you have been contacted with.