illegalife Posted February 1, 2009 Share Posted February 1, 2009 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! Quote Link to comment Share on other sites More sharing options...
AlabamaHit Posted February 1, 2009 Share Posted February 1, 2009 Re: [v2] If course done? if($ir['cdays'] > 0) { die(""); } Quote Link to comment Share on other sites More sharing options...
gurpreet Posted February 1, 2009 Share Posted February 1, 2009 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.") } Quote Link to comment Share on other sites More sharing options...
DissObey Posted February 1, 2009 Share Posted February 1, 2009 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; } Quote Link to comment Share on other sites More sharing options...
AlabamaHit Posted February 3, 2009 Share Posted February 3, 2009 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....... Quote Link to comment Share on other sites More sharing options...
Tonka Posted February 3, 2009 Share Posted February 3, 2009 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.