Forum Moderators: coopster
Can it be done?
eg:
$menu1 = mysql_query("..."); //query the database tea table
$menu2 = mysql_query("...");
echo "<td>"."<input type='button' value='Teas' name='button1' onclick='".$menu1."'></td>";//
echo "<td><input type='button' value='Platters' name='button2' onclick='".$menu2."'></td>";//
if ($menu1) {...}
if ($menu2) {...}
<input type="submit" name="button1" value="Button 1" />
<input type="submit" name="button2" value="Button 2" />
<input type="submit" name="button3" value="Button 3" />
<input type="submit" name="button4" value="Button 4" />
</form>
</body>
<?php
if(isset($_POST['button1'])){
echo("You clicked button one!");
}//if isset
if(isset($_POST['button2'])){
echo("You clicked button two!");
}//if isset
if(isset($_POST['button3'])){
echo("You clicked button three!");
}//if isset
if(isset($_POST['button4'])){
echo("You clicked button four!");
}//if isset
?>
</html>