Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2000121

[PHP-DB] Kinda silly question From: DEWA (dwa <email protected>)
Date: 12/13/00

Maybe this one is a silly question ...

Could someone teach me about that damn $PHP_SELF ???
coz until now i can't get it work in anyway .. so i have to make a lot of pages.

i mean like whenever i wanna use it, it gaves me an error ...
ex:
if ($comp) {
    bla bla bla
} else {
echo "<form name='form' action='$PHP_SELF">";
echo "<input type='text' name='comp'>";
echo "<input type='submit' value='get it'>";
echo "</form>";

or

echo "<form name='form' action='$PHP_SELF">";
echo "<input type='text' name='comp'>";
echo "<input type='submit' value='get it'>";
echo "</form>";

print "$comp";

It always said that :
Warning: Undefined variable: comp in c:\homepage\modify.php on line 10