Re: Help?

From: Date: Mon, 31 Jul 2000 16:10:42 +0000
Subject: Re: Help?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9192@lists.php.net to get a copy of this message
out the SQL statement in a variable $sql=" SELECT * from game" ; $result =mysql_db_query($db,"$sql",$connection); hope this helps On Mon, 31 Jul 2000, Wee Chua wrote: > Hi everyone, > I have a field on the form in HTML which is a Selection with 2 options. > There are Company and Employee. For example, > Select one: <Select Name="Game"> > <option value"Emp">Employee</option> > <option value"Comp">Company</option> > </Select> > > Now, I want to use the selection on the form in order to retrieve the data > from such table in php. Assuming I have all the host, username and password > are correct and connected, I also have chosen the database I want to run > with. Here is the SQL statement with php. $result is a variable. > > $result = mysql_query("Select * from $Game",$db); > > I don't know how to pass the value from the <Select> to implement this SQL > statement. I also gave me the error message " Supplied argument is not a > valid MySQL result". > > Could anyone tell me how to pass the value from <Select> into SQL statement > with php. Thanks! > > Calvin > > > -- > --------------------------------------------------------------------- > Please check "http://www.mysql.com/php/manual.php" > before > posting. To request this thread, e-mail mysql-thread46118@lists.mysql.com > > To unsubscribe, send a message to: > <mysql-unsubscribe-mislam=students.uiuc.edu@lists.mysql.com> > > If you have a broken mail client that cannot send a message to the above address(Microsoft > Outlook), you can use http://lists.mysql.com/php/unsubscribe.php >

« previous php.general (#9192) next »