hello.
big problem. tried for hours:
I have to use a form with two buttons. both have to be images.
if the first is pressed, the form-data is processed in a following modify.php, saved into a database and forwarded to page 1.
if the second button is pressed, the form data is handled in the same way, but i will be forwarded to page 2.
but how do i get a value to the php, which identifies which button i have pressed?
the problem:
i heared that graphical buttons are allways submit-buttons. adding value='1' and value='2' and different names did not result in the fact, that i could access it via php.
is there a way to use javascript to send the form-data and check and send which submit button is pressed?
i found:
submit buttons aren't that special, they just send a name and value like anything else :
<input type="submit" name="fruit" value="apple">
<input type="submit" name="fruit" value="banana">
Clicking the first will produce $fruit = 'apple' and the second will create $fruit = 'banana' and check accordingly :
if ($fruit == 'apple') {
echo 'you clicked on apple button';
} ------------------
but also this parameter is not accassible in the php script. I heard that submit buttons (and image-buttons) couldn't have own values to submit. is that right?
I also tried to access the koordinates (sub.x & sub.y) of the image click to process them. but also these data isn't submitted to the php.
And it is not the fault of netscape 4.x - also mozilla, konqueror and opera act the same.
thank you for help
allan