Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
need help with this problem!
Old 01-16-2005, 10:16 PM need help with this problem!
iceman35's Avatar
Extreme Talker

Posts: 210
Location: New York
Trades: 0
i cant figure out what is wrong.

im getting a fetch error = Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/murray35/public_html/directory/insert_rating.php on line 10

this is the page code:

Code:
<?
include_once "config.php";

$sid=$_REQUEST["sid"];
$rating=$_REQUEST["rating"];
$ip=$_SERVER["REMOTE_ADDR"];
$sql=mysql_query("select * from sbwmd_ratings where sid=$sid and ip='$ip'");
$check=0;

if($rst=mysql_fetch_array($sql))
{
header("Location:"."software-description.php?msg=" . urlencode("You can rate one software once only!") .  "&id=".$sid);
}
else
{
mysql_query("insert into sbwmd_ratings (rating,ip,sid) values($rating,'$ip',$sid)");
("Location:"."software-description.php?msg=" . urlencode("Thanks for rating the software") .  "&id=".$sid);

}


?>
iceman35 is offline
Reply With Quote
View Public Profile Visit iceman35's homepage!
 
 
Register now for full access!
Old 01-17-2005, 06:28 AM
Ultra Talker

Posts: 377
Trades: 0
It means that you query was wrong. Check your query. For example try to use^
"where sid='".$sid."' and ip\'".$ip."'"
__________________
andrews_john

Please login or register to view this content. Registration is FREE
andrews_john is offline
Reply With Quote
View Public Profile Visit andrews_john's homepage!
 
Reply     « Reply to need help with this problem!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09598 seconds with 12 queries