Problem with $PHP_SELF
Posted: Wed Feb 18, 2004 10:35 pm
Hey all-
I used a snippet from "Programming PHP", but it's not workin... could it be because I am using a local server (Apache)? Or am I missin somethin...
Says that the $PHP_SELF is an undefined variable... more like:
-S
I used a snippet from "Programming PHP", but it's not workin... could it be because I am using a local server (Apache)? Or am I missin somethin...
Code: Select all
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
if(!empty($_POST['name'])){
echo "Greetings, {$_POST['name']}, welcome.";
}
?>
<form action="<? $PHP_SELF ?>" method="post">
<input type="text" name="name">
<input type="submit">
</form>
</body>
</html>Code: Select all
Forbidden
You don't have permission to access /<br /><b>Notice</b>: Undefined variable: PHP_SELF in <b>c:\program files\easyphp1-7\www\formtester.php</b> on line <b>16</b><br /> on this server.