473,387 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Help with "POST"

<?php
I am confused about what goes on with method POST. Here is my problem,
sketching it out:

if (isset($_POST['Submit']) && $_POST['Submit']=="Submit") {
Do a bunch of stuff
if (isset($_SESSION['Error'])) unset($_SESSION['Error']);
if (a certain form control, A, is not "any") {
Verify that a Zip code is numeric and is five digits
If not: then {
$_SESSION['Error'] = "an error description";
header("Location: thisSite.php:);
}
}
}
header("Location: anotherSite.php:);
?>

...... in the form description I have an
<?php if (isset(($_SESSION['Error'])) echo $_SESSION['Error']; ?>
The form is type POST.

So here it is:
When I start, there is no error message.
I deliberately put in a bad zip code and have a value other than "any" in
the A control and click submit it. It goes to anotherSite.php.
If I then hit the back arrow on the browser, it displays with the error
message.
It seems that on the submit it goes through the logic and sets the error.
It then must be going through a second time, but this time taking on the
default setting of "any" for control A and so bypass the logic on the zip
code and so goes to anotherSite.php.

Please help me here.

Shelly
Jul 30 '05 #1
0 1293

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Rui Pestana | last post by:
Hello all, I want to use the POST method to submit the form and then grab the parameters in the asp file with request.form("parm"). The problem is that I am using the _search target to open...
1
by: brian | last post by:
i have a form processing being done by an asp page which works ok with "GET". two text inputs are sent and processing is done by an asp page which outputs the two values. with GET both values...
12
by: Assaf | last post by:
Hi all, My client is using an online service provider that processes survey responses. After a user fills survey.aspx and presses the OK button, 2 things need to happen: 1. the data has to...
0
by: Joeyej | last post by:
Hi - I'm trying to move/use a web form (containing some javascript field checks) previously hosted on a Windows 2000 server. However, the FORM METHOD="post..." command in the form (shown below)...
2
by: ReGex | last post by:
I have been working on a little project in C# to log into a website (using code inspired/riipped from http://www.codeproject.com/cs/internet/bloglivejournal.asp) but when I request the response,...
1
by: jhmace | last post by:
I have embedded a script into a simple page that allows a visitor to join an email list. The email list is hosted by campaigner.com. The site is: http://www.GreenFinds.com The email signup is...
1
by: Jim Carlock | last post by:
Let's not argue about semantics. Let's talk about semasiology. Do specifications exist for using mixed case, upper case, lower case for the contents of the method employed? My own preferences...
25
by: william.hooper | last post by:
here is my form: <html> <head></head> <body> <FORM ACTION="code.php" method="post"> <INPUT TYPE=SUBMIT NAME="arty.jpg" VALUE="Action"> </FORM>
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.