View Single Post

  #1 (permalink)  
Old 05-12-2008
Brian Spotts
 
Posts: n/a
Default echoing mysql result

Hey everyone. I have a simple form with three fields, when the user
submits, I want the php to echo under the form the results in my sql
table that match the three fields in the form. I'm tried to use
variables similar to:

$typeinform="document.myform.mytype.value";
$typeinals="document.myform.myals.value";
$typeinfdoi="document.myform.myfdoi.value";

$myQuantity = mysql_query("SELECT * FROM totals WHERE type =
'$typeinform'
AND als = '$typeinals'
AND fdoi = '$typeinfdoi'

I'm basically trying to figure out how to get the php to echo that
result in my page after the user submits. I've tried this...


<<<FORM>>>>
<?php
echo $myQuantity;
?>

It doesn't return anything though, any ideas?
Reply With Quote