Warptweet Posted February 12, 2007 Share Posted February 12, 2007 At my websites address bar, it has ?flash=1 or something like ?flash=2. Now, heres my question... How can I fetch the info on a row in my MySQL database that has 1 or 2 (depending on what ?flash=x) For Example: If ?flash=1 Then php would fetch the row in my MySQL database with the "flash" column that has the value of 1 Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 12, 2007 Share Posted February 12, 2007 SELECT * FROM table WHERE flash = '$flash'; You should read some of the db tutorials on here. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 12, 2007 Share Posted February 12, 2007 ...OR... <?php $sql = mysql_query("SELECT * FROM table WHERE flash = '{$_GET['flash']}'")or die(mysql_error()); while($row = mysql_fetch_array($sql)){ echo $row['flash']; } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.