Jump to content
MakeWebGames

Recommended Posts

Posted

Re: [v2] If course done?

 

I cant figure out the following query

If the user has not done the Example Course then die(You need to finish the Example Course before seeing this page)

Need some help asap Thanks!

Something like this (this wont work..)

 

if $ir['cdays'] > 0
{
die ("You have not finished the course. You must finish the course before seeing this page.")
}
Posted

Re: [v2] If course done?

 

$cdo=$db->query("SELECT * FROM coursesdone WHERE userid=$userid AND courseid=1");

if($db->num_rows($cdo) == 0)
{
print "You have not taken the course.";
$h->endpage();
exit;
}
Posted

Re: [v2] If course done?

The code I gave does work...

I have tested it.

And if your not talking about making them not be able to see the page when in a course already, then im sorry,thats what i undstood from it.......

Posted

Re: [v2] If course done?

i think he wants someone to have completed a certain course before being able to see a certain page. If that is the case than what DissObey posted will work for him

Join the conversation

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

Guest
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...