Hi Jason, <?php switch ($_REQUEST['username']) { case 'student' : include('student_script.php'); break; case 'supervisor' : include('supervisor_script.php'); break; } ?>
Better is to use $_POST if your form's method="post" or $_GET if your form's method="get" As long as the user type is available to the new page through a form variable, or request string like newpage.php?username=student, you can access it using $_REQUEST/$_GET/$_POST Take care, Greg -- phpDocumentor http://www.phpdoc.org "Jason Howlett" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > I am new to PHP and I am writing a script that evaluates input from a form > then calls other PHP scripts depending on the input it receives. > > The login form is very simple and asks the user to enter a username and a > password. It is used by two types of users, students and supervisors. In the > PHP script I check to see what the value is for the username. If it equals > "student" I need to call a script that displays the information for the > correct student. Else a different script is called that allows the > supervisor to select a particular student. > > I am not sure how I can call these scripts to run from inside my current > script. > > I know that PHP includes can be used to display code from another script in > the current page but I need to call the scripts to run and the content > displayed in a separate new page. > > Any advice much appreciated! > > > Thank you > > > Jason Howlett > > > > _________________________________________________________________ > Stay in touch with MSN Messenger http://messenger.msn.co.uk > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php