SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Forums
SiteExperts.com Forums
All Discussions

SiteExperts Feedback
The Lounge
Dynamic HTML
Site Design/ Critiques
HTML and CSS
XML Technologies
The Wireless Internet
Internet Explorer
Microsoft .NET
The Server
Technical Support

Sponsored Links

User Groups : Forums : SiteExperts : The Server :

Previous DiscussionNext Discussion


';
?>




Started By scwilson on May 22, 2006 at 12:28:10 PM

 PHP and Select Dropdown Loses Setting

Our order form for name, address, etc. contains PHP-handled dropdown lists for selecting state and country. If, on "Submit", the user has selected "State", say, but missed a required field, e.g. "City", an error message is displayed alongside "City". The state selection is undisturbed. Standard stuff so far.

But now the user types in the city, presses "Submit" again, and the form is this time re-displayed with "State" showing "0". That is, on this second "Submit" the state selection is lost. Can anyone see what we are doing wrong?

Many thanks for having a look. Here's the code for "State" (with list trimmed for brevity):

State 
if ((isset($_POST['submit2'])) && (($_POST['State']) == "0")) {
echo "Please include your State.\n";
}
?>
1 Response(s) | Reply

Earlier Replies | Replies 1 to 1 of 1 | Later Replies
Frances on May 23, 2006 at 1:35:19 AM (# 1)

See http://www.siteexperts.com/forums/viewConverse.asp?d_id=19180


Earlier Replies | Replies 1 to 1 of 1 | Later Replies

To respond to a discussion, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password
Copyright 1997-2004 InsideDHTML.com, LLC. All rights reserved.