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 Link to comment https://forums.phpfreaks.com/topic/59606-solved-help-with-code/ 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 Link to comment https://forums.phpfreaks.com/topic/59606-solved-help-with-code/#findComment-296197 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 Link to comment https://forums.phpfreaks.com/topic/59606-solved-help-with-code/#findComment-296203 Share on other sites More sharing options...
jck Posted July 12, 2007 Author Share Posted July 12, 2007 k Link to comment https://forums.phpfreaks.com/topic/59606-solved-help-with-code/#findComment-296204 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.