pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: SG Edwards <s0460205@sms.ed.ac.uk>
To: pgsql-php@postgresql.org <pgsql-php@postgresql.org>
Subject: problem with predefined variables
Date: Tue, 05 Apr 2005 16:09:55 +0100
Message-ID: <1112713795.4252aa4384e8c@sms.ed.ac.uk> (raw)



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)




view thread (2+ messages)  latest in thread

Message-ID: <1112713795.4252aa4384e8c@sms.ed.ac.uk>
Permalink:  ../1112713795.4252aa4384e8c@sms.ed.ac.uk/
Also on:    postgresql.org/message-id/1112713795.4252aa4384e8c@sms.ed.ac.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: s0460205@sms.ed.ac.uk
  Subject: Re: problem with predefined variables
  In-Reply-To: <1112713795.4252aa4384e8c@sms.ed.ac.uk>
  References: <1112713795.4252aa4384e8c@sms.ed.ac.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox