|
Posted by Larry Woods on 07/29/05 15:02
I have the following htm file "sendmail.php":
<html>
<head>
</head>
<?php
if ($HTTP_POST_VARS["postback"]=="y") {
................blah, blah.
}
?>
<body bgcolor="white">
<form action="sendemail.php" method="post">
.................blah, blah.
<input type="hidden" name="postback" value="y">
</form>
</body>
</html>
When I execute this script I get the following ,
Notice: Undefined index: postback in C:\Inetpub\wwwroot\PHP\sendemail.php on
line 5
which is referring to the "If" statement. I "assume" this error/warning is
because the parser executes the 'if' statement on the first time through and
the form varialbles are not defined at this time.
How do I test for a "postback" situation? (Yes, I know that I could serve
up another page instead of the SAME page, but this is fairly common
practice, so there MUST be a way to do it....right?)
TIA,
Larry Woods
Navigation:
[Reply to this message]
|