User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.
I have been trying to find information on passing variables without a form using url, but I can't seem to find anythig that pertains to my situation. Basically I need to have a page that is hierachical in the sense that you can click one course out of a list, that brings you to a list of sections, and you can click on a section which will bring to a page with the correct information for that one section. I was taught for this situation to use $_SESSION and then to include the variables in the url. My problem is that everytime I click on a course or a section, the information for every single course or section that is a query match is displaying rather than just the information for that one course or section. This is what I have for each of the pages in hierarchical order (not including the connect portion of the code which works fine anyways). I know this is a ton of code, and a complete mess. I will keep searching out information, and many many thanks in advance for any help.
List of Courses
session_start();
$section = $_SESSION['section_id'];
$user_fname = $_SESSION['user_fname'];
$user_lname = $_SESSION['user_lname'];
$query ="SELECT DISTINCT course_t.course_id, course_name, user_fname, user_lname, section_t.section_id
FROM course_t, authorized_user_t, section_t, teaching_history_t
WHERE authorized_user_t.authorized_user_id = teaching_history_t.instructor_id
AND teaching_history_t.section_id = section_t.section_id
AND section_t.course_id = course_t.course_id";
$result =@mysql_query($query);while($line1 = mysql_fetch_array($result, MYSQL_ASSOC)){echo'
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that
you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice
sessions to improve your knowledge and scores.
manpreet
Best Answer
3 years ago
I have been trying to find information on passing variables without a form using url, but I can't seem to find anythig that pertains to my situation. Basically I need to have a page that is hierachical in the sense that you can click one course out of a list, that brings you to a list of sections, and you can click on a section which will bring to a page with the correct information for that one section. I was taught for this situation to use $_SESSION and then to include the variables in the url. My problem is that everytime I click on a course or a section, the information for every single course or section that is a query match is displaying rather than just the information for that one course or section. This is what I have for each of the pages in hierarchical order (not including the connect portion of the code which works fine anyways). I know this is a ton of code, and a complete mess. I will keep searching out information, and many many thanks in advance for any help.
List of Courses
List of Sections (it is supposed to list a single intructor and then each of the sections they teach under their name)