I am wanting to ask a question about IF statements.

I have been developing a PHP > mySQL based subscription tracking

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

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 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

Does someone have experience with the IF command that could help me.  I
am trying to make it so that I don't have to have the commands in the
PHP script that processes the form twice by including the " OR
$_POST['submit'] == "Update Entire Account" ) "


Reply via email to