Djkanna Posted August 25, 2012 Share Posted August 25, 2012 You must realize, just because you would have said, not many others do, we're used to "Thanks" that's it end of thread (or in some cases problem solved an no feedback: Example). A good rule of thumb, remain insistent on your need for help after suggestions have been posted, that way others still know you need help rather than just look over, see a solution and think okay problem solved. Anyhow, I do not wish to argue with you, it's clear now you still need help, so the thread needs to remain open. Quote Link to comment Share on other sites More sharing options...
Octarine Posted August 25, 2012 Share Posted August 25, 2012 1 Quote Link to comment Share on other sites More sharing options...
Razor42 Posted August 25, 2012 Author Share Posted August 25, 2012 You must realize, just because you would have said, not many others do, we're used to "Thanks" that's it end of thread (or in some cases problem solved an no feedback: Example). A good rule of thumb, remain insistent on your need for help after suggestions have been posted, that way others still know you need help rather than just look over, see a solution and think okay problem solved. Anyhow, I do not wish to argue with you, it's clear now you still need help, so the thread needs to remain open. I understand where your coming from, and no I do not wish to argue wih you. I respect you as a very good coder and someone often looking to give help. I would have replied with feedback had I have been given the chance to even test what had been given to me, I'm not exactly one of the people you often see on here begging for anwsers to their solutions and offering zero back and having no intention of learning. I do give back, pretty much everything I have coded for MC has been posted on this forum for free. What I am currently working on (the reason for this post) will also be posted on this forum for free. Right now thats out of the way... I took what Sniko told me to do and added it to my coded. Then I went and tested what I had. I have now run into an other error :(... The error is.. Fatal error: Call to undefined function index() in /home/a1908372/public_html/upload/education.php on line 8 The relavent piece of coding is... <?php include "globals.php"; print "<h3>School</h3>"; switch($_GET['action']) { case "gradecourses": gradecourses(); break; case "cstart": cstart(); break; default: index(); break; } if($ir['course'] > 0) { $cd=$db->query("SELECT * FROM courses WHERE crID={$ir['course']}"); $coud=$db->fetch_row($cd); print "You are currently doing the {$coud['crNAME']}, you have {$ir['cdays']} days remaining."; } else { function index() { $q=$db->query("SELECT * FROM grades"); print "Hello and welcome to school. Before doing a course, you must first select a grade.... <table width=75% cellspacing=1 class='table'><tr style='background:gray;'><th>Grade</th><th>Required Courses Complete</th><th>Enter</th></tr>"; while($r=$db->fetch_row($q)) { $enter="<a href='education.php?gcourses={$r['crGRADE']}'>Enter</a>"; print "<tr><td>{$r['grade_name']}</td><td>{$r['crREQUIRED']}</td><td>$enter</td></tr>"; } print "</table>"; } } Unsure why this is as I have defined the function?. Quote Link to comment Share on other sites More sharing options...
Djkanna Posted August 25, 2012 Share Posted August 25, 2012 Perhaps you fulfill this condition. ($ir['course'] > 0) In which case, the function is never defined. Take the function out of the if/else statement and then check. If you want to stop upon fulfilling this condition, put it above the switch statement, and kill the script after your "You're doing a course" message. Quote Link to comment Share on other sites More sharing options...
Razor42 Posted August 25, 2012 Author Share Posted August 25, 2012 Thank you, sorted that now. Although I still have errors I will work on fixing these myself, thanks for your help everyone you may now close the thread DJK. Quote Link to comment Share on other sites More sharing options...
Djkanna Posted August 25, 2012 Share Posted August 25, 2012 Okay pal. Good luck fixing your remaining errors. 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.