Simple HTML GET variable question
Posted: Tue Jun 23, 2009 11:05 am
I want to send two values to a new page using the GET method, but only the first one shows up. This is what I am doing:
<a href="student_print.php?student_id=<?php echo $user['student_id'];?>;course_id=<?php echo $course_id;?>">Print</a>
As you can see, I am trying to send the value of student_id and course_id to the page student_print.php. In the above code, I had separated the two values with a simicolon but I have also tried a comma and a space. No matter what I do, only the first value is sent. I am assuming that I can indeed send multiple values using GET.
Thoughts? Thanks.
<a href="student_print.php?student_id=<?php echo $user['student_id'];?>;course_id=<?php echo $course_id;?>">Print</a>
As you can see, I am trying to send the value of student_id and course_id to the page student_print.php. In the above code, I had separated the two values with a simicolon but I have also tried a comma and a space. No matter what I do, only the first value is sent. I am assuming that I can indeed send multiple values using GET.
Thoughts? Thanks.