Re: Help?

From: Date: Mon, 31 Jul 2000 16:09:20 +0000
Subject: Re: Help?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9190@lists.php.net to get a copy of this message
> <option value"Emp">Employee</option> > <option value"Comp">Company</option> You're going to want the "=" in there... <option value="Emp">Employee</option> <option value="Comp">Company</option> So, now $Game will = either "Emp" or "Comp". Assuming you've made a connection and selected a database, and $db is the name of the link identifier you created with that selection, your SQL statement of "select * from $Game" would be just fine, provided that variable tracking is on and $Game becomes "Emp" or "Comp". > $result = mysql_query("Select * from $Game",$db); You can add a die() to this, to print a nice error: $result = mysql_query("Select * from $Game",$db) or die(mysql_error()); - julie +------------------------------------------------+ | Julie Meloni (jcm@i2ii.com) | | Tech. Director, i2i Interactive (www.i2ii.com) | | | | "PHP Essentials" & "PHP Fast & Easy" | | http://www.thickbook.com/ | +------------------------------------------------+

« previous php.general (#9190) next »