yeh you can do it with if else statements but if there's alot of them things will get messy make use of the switch case logical operators.
if you mean you wanna do a query _base_d on a user selection on the previous page via a parameter set in the href element of the achor tag then yes its possible
example
| Code: : |
<a href="deletemessage.php?method=shift_delete">hard delete</a>
<a href="deletemessage.php?method="trash_delete">soft delete</a>
<a href="deletemessage.php?method="archive">Move to archive</a>
|
say your in your message inbox and you wanna give 3 options for handing the messages for removal from inbox. on the processing page for this you'ld have your _script_ checking the method parametor of the url via the get array.
| Code: : |
$_GET['method'];
so you could use a switch
$parameter = $_GET['method'];
switch($parameter){
case 'shift_delete':
do your delete query;
break;
case 'soft_delete':
do your soft delete query;
break;
case 'archive':
do your archive query;
break;
defualt:
"go back and try that again"
break;
} // end of switch
|
Good luck. if this is not what you meant please clarify