hi.. ----- Original Message ----- From: "Ron Piggott" <ron.php@xxxxxxxxxxxxxxxxxx> To: "PHP DB" <php-db@xxxxxxxxxxxxx> Sent: Monday, March 19, 2007 4:26 AM Subject: IF ( $_POST['submit'] == "Update Subscriptions" OR$_POST['submit'] == "Update Entire Account" ) { > > I am wanting to ask a question about IF statements. > > I have been developing a PHP > mySQL based subscription tracking > application. > > I am trying to set up an administration screen now where admin could > update an address, e-mail address, subscription(s), etc. OR (and this is > the key) update the entire account. > > I have this series of IF statements (below). I have a bunch of SUBMIT > buttons on the admin screen so if someone just wants to update the > address on the admin screen the "Update Address" button may be > clicked ... and it is right near the fields to input a change of > address. Same thing with "Update Subscriptions". But if the account > needs multiple changes I have an "UPDATE ENTIRE ACCOUNT" button at the > bottom. > > Here are the series of IF statements used to process the form. > > if ( $_POST['submit'] == "Update Subscriptions" OR $_POST['submit'] == > "Update Entire Account" ) { > > } elseif ( $_POST['submit'] == "Update Address" OR $_POST['submit'] == > "Update Entire Account" ) { > > } elseif ( $_POST['submit'] == "Update E-Mail Address" OR > $_POST['submit'] == "Update Entire Account" ) { > > } elseif ( $_POST['submit'] == "Submit Birth Date" OR $_POST['submit'] > == "Update Entire Account" ) { > > } i read this line.. and this was realy a waste of script.. i mean this line $_POST['submit']== "Update Entire Account" why this line always show up every if line?? i don't know what your script looks like.. but i sure you this line is waste of typing. > I am stuck again. If on the admin screen someone clicks "UPDATE > ADDRESS" the address change is saved. BUT if I try to do an address > change and then click "UPDATE ENTIRE ACCOUNT" the address change isn't > saved. from i read above.. when you click update every account. it respond to do function in this if line if ( $_POST['submit'] == "Update Subscriptions" OR $_POST['submit'] == "Update Entire Account" ) { from this point i suggest to not use submit as condition to begin a function. are your page contain a lot submit button?? fyi.. i'm indonesian and i'm not good on english.. so forgive me. what i mean about function in here was.. something below the if if ( $_POST['submit'] == "Update Subscriptions" OR $_POST['submit'] ==> "Update Entire Account" ) { //this where i mean function // } -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php