Colin Eldridge wrote:
Hi, my name is Colin Eldridge, teacher from Australia.
Hello Colin,
Australia! I'm here in Wollongong Uni.
I am relatively new to PHP.
I have set up a small intranet for my students to build and use interactive webpages. The intranet: A server(P4, XP) running Apache, MYSQL and PHP (from Janet Valade's text with CD-ROM)
and 3 hosts running P2, Win98 and using IE or Mozilla as intranet browsers.
Students use a browser on the 3 hosts to access PHP scripts from the server, which then deliver HTML forms back to the originating host. Hosts 'post' completed forms to server, and PHP scripts connect to the MYSQL server to update a database.
Question: Is there a simple way for PHP to identify which host a form has come from? The network names of the 3 hosts are stu1, stu2 & stu3. Some type of unique host Id is needed by the PHP scripts to contruct database records. For this exercise, we are not using PHP sessions, and the students do not have usernames and passwords for access to the database. Access is automatic after each host is logged onto the intranet.
Yes, there is .! use env. variables.
$_SERVER["SERVER_NAME"] $_SERVER["REMOTE_ADDRESS"] // i think this is what u r looking for
if u would lke to find out more...
// test.php <?
echo phpinfo();
?>
:)
Thanks very much for your time.
Regards
Colin Eldridge
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php