Jump to content

Archived

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

jwk811

Another Error... should be something easy... please help

Recommended Posts

An error on an account activation script.. hes the error

Fatal error: Call to undefined function: () in /home/content/j/w/k/jwk811/html/membership/activate.php on line 21

Heres line 21

if ( $mysql_affected_rows ( $sql ) == 0 )

would you happen to know whats wrong with it?

Share this post


Link to post
Share on other sites
you need to remove the $ from the front of mysql_affected_rows - mysql_affected_rows is a function, not a variable so it doesn't need it.

Share this post


Link to post
Share on other sites
did that and got a different error

Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource in /home/content/j/w/k/jwk811/html/membership/activate.php on line 21

same line

Share this post


Link to post
Share on other sites
means that your query failed...put "or die(mysql_error())" on the end of your mysql_query line.

[code]$result = mysql_query("SELECT * FROM tablename") or die(mysql_error());[/code]

Share this post


Link to post
Share on other sites

×

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.