I have created a page for updation of record. I want to pass the id of student from one page to another. I am trying to send it through window.location but it is not working. In
If you already have a form and wanna post that to an update script, you could just add the student id as an hidden form element example:
Else if you want to redirect from another page to the update page, with a student id, the best way will probably be a $_GET variable.
So the URL would look something like this: http://domain.com/update.php?student_id=1
And then your update.php will include a simple check like this.
if(!empty($_GET['student_id'])) {
$student_id = $_GET['student_id'];
// Ready to update
} else {
// Throw 404 error, or redirect to an create page
}