Im making a function that are getting information from my SQL server. What im trying to make it do is the following:
- Fill a dropdown list. WORKING
- Select from dropdown list. NO CLUE.
SQL query with the selected dropdown value. KIND OF KNOW
"Austmann" will be changed with the selected valuefunction runMyFunction() { $result = mysql_query("SELECT * FROM olsortriment WHERE bryggeri ='austmann'") or die(mysql_error()); echo "<table border='1'>"; echo "<tr> <th>Name</th> <th>Age</th> </tr>"; while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['navn']; echo "</td><td>"; echo $row['bryggeri']; echo "</td></tr>"; } echo "</table>"; } if (isset($_GET['hello'])) { runMyFunction(); } ?>
Run PHP Function
What should i do to populate my variable with the selected item from drop-down list?