I am trying to make buttons holding data that will query a mysql database. They are holding the letters that correspond with what they will display.
html:
<form action="names.php" method = "post">
<input type = "button" name = " 'a%' and 'czz%' " value = "A thorugh C">
<input type = "button" name = " 'd%' and 'hzz%' " value = "D thorugh H">
<input type = "button" name = " 'i%' and 'kzz%' " value = "I thorugh K">
<input type = "button" name = " 'l%' and 'pzz%' " value = "L thorugh P">
<input type = "button" name = " 'q%' and 'zzz%' " value = "T thorugh Z">
</form>
php:
<?php
$connection = mysql_connect("localhost", "user", "pass");
mysql_select_db("database", $connection);
$result = mysql_query("SELECT username
FROM users
WHERE username
between $_POST['name']");
echo "<table border='1'>";
echo "<tr><th>Username</th>;
while($row = mysql_fetch_row($result)) {
echo "<tr><td>";
echo $row['name'];
echo "</td><tr>";
}
echo "</table>";
mysql_close($connection);
?>
I haven't found any information out there about buttons. I have only found stuff on text fields and submit buttons. I want to be able to just click the button and it take me to the results.
Any ideas on how else to do this because this doesn't seem to work?