jck Posted July 12, 2007 Share Posted July 12, 2007 take a look at this code <?php require_once("conn.php"); require_once("templates/MainHeader.php"); $request = mysql_query(" SELECT rt.username, rt.Rating FROM dd_rating AS rt WHERE ItemID = $_GET['ItemID']") or die(mysql_error()); echo '<b><center>See what Rating others gave for this joke </center></b><br><br>'; if (mysql_num_rows($request) > 0) { while ($row = mysql_fetch_assoc($request)) { $name = $row['username']; $rate = $row['Rating']; echo ' ' . $name . ' had given a rating of ' . $rate . ' to this joke.<br />'; } } else echo 'No ratings for this joke.'; require_once("templates/MainFooter.php"); ?> when i run it by putting where ItemID=69 it works but when i do othersvote.php?ItemID=69 its not working Quote Link to comment Share on other sites More sharing options...
tapos Posted July 12, 2007 Share Posted July 12, 2007 You can try this $request = mysql_query(" SELECT rt.username, rt.Rating FROM dd_rating AS rt WHERE ItemID = $_GET[itemID]") or die(mysql_error()); -- Tapos Pal Quote Link to comment Share on other sites More sharing options...
jck Posted July 12, 2007 Author Share Posted July 12, 2007 thanks a lot tapos pal it worked Quote Link to comment Share on other sites More sharing options...
jck Posted July 12, 2007 Author Share Posted July 12, 2007 k 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.