Before I say a word I'd just like to inform you that these are the types of questions better left to books and tutorials rather than live help. That being said, ELSE does not need to follow IF. Code the condition you want to capture and perform your error message on that.
// Enter if member not chosen. if (empty($EditMember)) { echo "Please choose a member to edit"; exit; } // Continue if member is chosen. -Kevin ----- Original Message ----- From: "Sunfire" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 4:18 PM Subject: [PHP] if(!empty()) statement > hi.. > i have a combobox that has members from a mysql database loaded into it.. > one of the choices is "select a member to edit" and has a value of "". now > if a person selects "select a member to edit", then an error message shows > up saying they need to select a member to edit and puts them back to the > main menu with a link.. now if they really do pick a member to edit i want > the form to show up.. what i need to know is how do you break/drop out of an > if statement..: > //mysqlstatements here > if(!empty($EditMember)){ > //need to skip this or break out of it > }else{ > //error section > } > or should i do: > if(empty($EditMember)){ > //error message > e}else{ > //the form} > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php