View Single Post
11-13-2008, 04:41 PM
#1
developer_x is offline developer_x
Status: Junior Member
Join date: Mar 2005
Location: Copenhagen
Expertise:
Software:
 
Posts: 88
iTrader: 0 / 0%
 

developer_x is on a distinguished road

  Old  Trying to find an error

Hi,

Please see the code block.

PHP Code:
if($_GET['activate_id']!="" && $_GET['email']!="")
{
    
$q="select * from tbl_subscriber_newsletter where email='".$_GET['email']."' and activation_code='".$_GET['activate_id']."'";
    
$r=mysql_query($q); 
When I run the script I have I get this error:


Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /****/index.php on line 9
I believe the query has some error. Could some one help me correct the query:

PHP Code:
$q="select * from tbl_subscriber_newsletter where email='".$_GET['email']."' and activation_code='".$_GET['activate_id']."'"