Another lame question
So, I have a site that displays several students’ requests to change advisors, with an Approve and Deny button for each student. Then I have a Javascript pop-up that confirms the decision when clicked on either button, and it will also e-mail the student about this decision. This should all be on one page as well.
How do I specify which student I will update and e-mail to? I know the query will be like $query = “UPDATE student set current_advisor = “.$requested_advisor.” where SID = “.$sid, but how do I specify which student I’m doing this for?
I have only worked with php forms, where you have the user type in the information, but in this case, all the data is there already…
$sidis the id of the student you want to update… It depends how you’re building the page. You can either insert a form for each student, as follows:Then when the user clicks either approve or deny, you’re $_POST array in PHP will be filled with: