I am trying to pass variable that containing the values with space through href but I fail to get the expected output with space.
The code I used is:
print " <a href=update.php?id='$id'&name=$name&dob='$dob'&email='$email'>Update Details</a> <br>
Student ID: $id<br> Student Name: $name<br> Date Of Birth: $dob<br> Email ID: $email<br>";
In update.php I could see the link as
localhost/student_portal/update.php?id='abc'&name=Giridharan
and I didn't get the full name and dob and email
My variables with values are as follows:
$id=abc
$name=Giridharan Rengarajan
$dob=1993-07-22
[email protected]
What should I do to get all the four values in update.php?
$query_string = 'id='.urlencode($id).'&name='.urlencode($name).'&dob='.urlencode($dob).'&email='.$email; echo htmlentities($query_string); print " <a href=update.php?htmlentities($query_string)>Update Details</a> <br> Student ID: $id<br> Student Name: $name<br> Date Of Birth: $dob<br> Email ID: $email<br>";<br> the urs i got is localhost/student_portal/… how can i extract values from that.?