Re: PHP calling PHP?

From: Chris Smith <csmith(at)squiz(dot)net>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: PHP calling PHP?
Date: 2001-05-10 05:23:31
Message-ID: 01051015233100.28891@area51.cybersydney.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php


> > > echo "<FORM ACTION=\"$PHP_SELF\" METHOD=\"POST\">\n";
> >
> > Ack! You could do this for much better readability instead:
> > echo "<FORM ACTION='$PHP_SELF' METHOD='POST'>\n";

Different quotes do different things in PHP, just something to remember...

If you did echo '$PHP_SELF' (single quotes) it won't print the variable
value, it will print the variable name.. (easy to get caught on!)..

eg
<?
echo "PHPSELF = $PHP_SELF<br>";
echo 'PHPSELF = $PHP_SELF<br>';
?>

prints out..

PHPSELF = test.php
PHPSELF = $PHP_SELF

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Christian Marschalek 2001-05-10 05:32:07 RE: PHP calling PHP?
Previous Message Grant 2001-05-10 05:10:23 Re: PHP calling PHP?