it isnt that hard to do.. if you can get "student" and "supervisor" to
successfully log into the web pages (even if you dont have anything to
display) then all you really need to do is this:
suppose that you had $user for username in the form and $password in the
form for password...
do this:
/*after all of the sql login/query is done and checking user names do
this:*/
if($user=="student"){
include("scriptname.php");
}elseif($user=="supervisor"){
include("scriptname.php");
}else{
print"an error message here";
}
/*end*/
dont know if this would help i would need to see your actual login page and
the script that drives the login sequence before i could really tell what to
do for it..it all depends on how you have it set up..and are you getting
usernames from a sql table or is it hard coded into the login script??

let me know and mail me private off list at [EMAIL PROTECTED] if
you want help...

laters


----- Original Message -----
From: "Jason Howlett" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 01, 2003 10:45 AM
Subject: [PHP] Calling other php scripts from inside a php script.


> 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
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to