Categories

See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More

Passing variables without a form using url

Course Queries Syllabus Queries
Max. 2000 characters
Replies

usr_profile.png
Jadav Payeng

User

( 5 months 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

  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 '<p align = "center"><strong><a href ="section_list.php?section_id='.$line1['section_id'].'&user_fname='.$line1['user_fname'].'&user_lname='.$line1['user_lname'].'">' .$line1['course_id'].':'.$line1['course_name']. '</a></strong><br><br>'; 




     }

List of Sections (it is supposed to list a single intructor and then each of the sections they teach under their name)

 session_start();

 $section_id = $_REQUEST['section_id'];
 $user_fname = $_REQUEST['user_fname'];
 $user_lname = $_REQUEST['user_lname'];


$course_id = $_SESSION['course_id'];
$course_name = $_SESSION['course_name'];
$section_id = $_SESSION['section_id'];
$semester = $_SESSION['semester'];
$year = $_SESSION['year'];
$course_description = $_SESSION['course_description'];
$SGoal_Description = $_SESSION['SGoal_Description'];
$sobjective_description = $_SESSION['sobjective_description'];
$LObjective_Description = $_SESSION['LObjective_Description'];
$topic_title = $_SESSION['topic_title'];
$topic_description = $_SESSION['topic_description'];
$coursework_title = $_SESSION['coursework_title'];
$coursework_location = $_SESSION['coursework_location'];
$coursework_description = $_SESSION['coursework_description'];



  $query = "SELECT course_t.course_id, course_name, section_t.section_id, semester, year, course_description,
                  SGoal_Description, sobjective_description, LObjective_Description, topic_title, topic_description, coursework_title, 
                  coursework_location, coursework_description, syllabus 
               FROM course_t, section_t, section_goal_section_t, section_goal_t, section_coursework_t,
                 mapped_topic_section_t, mapped_lis_section_t, coursework_t, topic_t, lis_objective_t, section_objective_t
               WHERE course_t.course_id = section_t.course_id
                 AND section_t.section_id = section_goal_section_t.section_id
                 AND section_goal_section_t.sgoal_id = section_goal_t.sgoal_id
                 AND section_goal_section_t.section_id = mapped_lis_section_t.section_id
                 AND mapped_lis_section_t.lobjective_id = lis_objective_t.lobjective_id
                 AND section_t.section_id = mapped_topic_section_t.section_id
                 AND mapped_topic_section_t.topic_id = topic_t.topic_id
                 AND section_t.section_id = section_coursework_t.section_id
                 AND mapped_lis_section_t.sobjective_id = section_objective_t.sobjective_id
                 AND section_coursework_t.coursework_id = coursework_t.coursework_id"; 


   $result = @mysql_query($query);

         while ($line1 = mysql_fetch_array($result, MYSQL_ASSOC)) {


   echo '<ul align = "center"<strong>' .'Instructor'. ':' ."$user_fname". "$user_lname".'<li align = "center">
   <a href ="course_section.php?course_id='.$line1[
			
        

what's your interest