Jump to content

[SOLVED] help with code


jck

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.