Hi there,
I got a form containing some input fields and drop down menues. All of those values are submittet. however, the value of the buttons are not. i have more than one button and i want to know which one was klicked.
heres an example of what my script looks like:
<form action=page.php method=post>
<input type=text ....>
<input type=hidden ...>
<input type=button name=button1 value=button1 onClick=submit()>
<input type=button name=button2 value=button2 onClick=submit()>
<input type=button name=button3 value=button3 onClick=submit()>
</form>
So, all the values are in my _POST variables, except the buttons. how do i get those values?
value of fom element not submittet
Moderator: General Moderators
-
Tubbietoeter
- Forum Contributor
- Posts: 149
- Joined: Fri Mar 14, 2003 2:41 am
- Location: Germany
change them to type="submit" and please quote all properties of html elements 
Code: Select all
<input type="submit" name="button1" value="button1" />-
Tubbietoeter
- Forum Contributor
- Posts: 149
- Joined: Fri Mar 14, 2003 2:41 am
- Location: Germany
using single-quoted strings in php there's no need to escape double-quotes, e.g.You should not rely on the bonhomie of browsers to parse unquoted properties, it will retaliate sooner or later 
Code: Select all
<?php
$dqString = "<a href="whatever.html" > goto ...</a>";
$sqString = '<a href="whatever.html" > goto ...</a>';
$dqString = "<a href="$url" > goto ...</a>";
$sqString = '<a href="'. $url . '"> goto ...</a>';
print("<a href="$url" > goto ...</a>");
echo '<a href="', $url, '"> goto ...</a>';
?>
<a href="<?php echo $url; ?>"> goto ...</a>