Jump to content

Members only script


CammyD

Recommended Posts

Hey guys.

Once again i need your help with a project.

I am trying to create a little site for my mountain biking club.

I have got most of the code sussed out, but there is a problem with my members script.

On the main page i want it to say "You have not payed this month" if you user level is 1.

I am using this code for it:



foreach ($data as $words) {
    print "";
    print $words;
    print '</a>, ';
    echo $words;
    $data = mysql_query("SELECT * FROM users WHERE username='$keyword'")
  
or die(mysql_error());
if ( $data = "one" )
   {
   	echo "You have not payed this month";
   	
   }



 

An whenever i load up the page, i get this error:

 

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\Projects\admin\index.php on line 62

 

Link to comment
https://forums.phpfreaks.com/topic/93930-members-only-script/
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.