Jump to content

Email Activation Error


Recommended Posts

getting the following errors on the activation.php file.

Warning: mysql_query() expects parameter 2 to be resource, null given in /home/reakcity/public_html/activation.php on line 10

Warning: mysql_num_rows() expects parameter 1 to be resource, null given in /home/reakcity/public_html/activation.php on line 11

Invalid Validation Code


also it shouldnt say invalid validation code because it is right..



Link to comment
Share on other sites

Yeah the database class.

Lit is saying that param 2 is null which means it it empty ie mysql_query($param1,$param2); or mysql_fetch_array($param1,$param2); Chances are you are just using mysql_query("some db query here"); but you are missing your resource Your connection string.

If you use the wrapper then that will handle it all for you (would be better anyways so you can switch to MySQLi on the fly). Long story short, convert you queries and fetches to the applicable $db-> method and you should be good to go.

Link to comment
Share on other sites

  • 3 weeks later...

v1 -> v2

Find: mysql_

Replace with: $db->

Find: fetch_array

Find: fetch_assoc

Replace with: fetch_row

Find: real_escape_string

Replace with: escape

Make sure you globally define the $db variable in created functions if it hasn't been done.

Most conversions are as simple as that, some others require a change of method

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...