earthsiege
08-24-2004, 01:52 PM
hey guys,
im not sure which room this thread should go in but because i use php a lot i thought id put it here.
right the question i have is when you have a form in a web page and it has action which sends information to a php page can you have multiple submit buttons with the same 'name' but different values.
because if you can then you can manipulate the information from that form in realtion to which button the user pressed.
for example:
you have a form containing ordering information which allows the user to change the quantity of their objects and submit their order or if they want add more objects.
by have two buttons like <input type='submit' name='next' value='Add'>
and <input type='submit' name='next' value='Submit'>
you can go to the php page and update all information changed on the previous page and then you an have something like:
if ($next == Add){
header.....
}
else{
header...more shopping...
}
?>
is this even possible or am i babbling on because if you try this and type something like print($next) on your php page it prints either Add or Submit but doesnt work in the IF statement.
im not sure which room this thread should go in but because i use php a lot i thought id put it here.
right the question i have is when you have a form in a web page and it has action which sends information to a php page can you have multiple submit buttons with the same 'name' but different values.
because if you can then you can manipulate the information from that form in realtion to which button the user pressed.
for example:
you have a form containing ordering information which allows the user to change the quantity of their objects and submit their order or if they want add more objects.
by have two buttons like <input type='submit' name='next' value='Add'>
and <input type='submit' name='next' value='Submit'>
you can go to the php page and update all information changed on the previous page and then you an have something like:
if ($next == Add){
header.....
}
else{
header...more shopping...
}
?>
is this even possible or am i babbling on because if you try this and type something like print($next) on your php page it prints either Add or Submit but doesnt work in the IF statement.