From: | SG Edwards <s0460205(at)sms(dot)ed(dot)ac(dot)uk> |
---|---|
To: | "pgsql-php(at)postgresql(dot)org" <pgsql-php(at)postgresql(dot)org> |
Subject: | problem with predefined variables |
Date: | 2005-04-05 15:09:55 |
Message-ID: | 1112713795.4252aa4384e8c@sms.ed.ac.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
Hi,
I am just learning PHP and have a very simple script to access data in a
predefined variable as follows:
<body>
<?php
echo "you are running the file <b>$PHP_SELF</b>.<br /><br />\n";
echo 'you are viewing this page usinig: <br /><b>', $HTTP_USER_AGENT, '</b><br
/>from the IP address ', $REMOTE_ADDR;
?>
</body>
However, the assignment does not happen, giving the command line error (PHP
Notice: Undefined variable: PHP_SELF in /home/s0460205/public_html/test.php
on line 10
you are running the file <b></b>.<br /><br />
you are viewing this page usinig: <br /><b>PHP Notice: Undefined variable:
HTTP_USER_AGENT in /home/s0460205/public_html/test.php on line 11
</b><br />from the IP address PHP Notice: Undefined variable: REMOTE_ADDR in
/home/s0460205/public_html/test.php on line 11)
- why would this occur?
Many thanks
(I am running PHP/4.3.10)
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2005-04-05 15:25:21 | Re: problem with predefined variables |
Previous Message | Christopher Kings-Lynne | 2005-04-03 03:00:40 | Re: sql command |