Hello everybody,
I am working with PHP (4.3) and MySQL (3.23.54) on Windows 2000. That I wish to achieve is - when a user will select an option from a combo box some other elements (like, text box, radio button or another combo box) on the form will be filled up automatically by the corresponding values stored in the database. As PHP works on the server side I would like to assist PHP to do this by the help of another. can anybobdy help me?
ZIA
If I read your question correctly, you have to use JavaScript to accomplish what you want, not PHP.
Thanks acid.
Should it work?
<select size="1" name="Course_No" onChange="<?php header("Location:Student_List.php"); ?> >
Can I embed PHP in JavaScript?
that wont work as any header information must be come before any HTML has been written.
What you could do i think is:
<select size="1" name="Course_No" onChange="document.location.href='student_list.php'">
This is anything BUT server-side. You want the client to be continually checking the form and doing things after the page has already appeared.
PHP's job is finished once your web browser receives the </html>
Definitely a job for Javascript.