new to php, need help..
| From: | Jonathan | Date: | Thu, 20 Feb 2003 07:34:12 +0000 |
| Subject: | new to php, need help.. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-136319@lists.php.net to get a copy of this message | ||
hi all, i've only begun learning php around 1 week ago, i'm having trouble
with this code,
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
if (isset($subject)) { echo "$subject[0]<br />";
echo "$subject[1]<p />"; }
else { $subject[0] = "Enter Subject A";
$subject[1] = "Enter Subject B"; } ?>
<FORM ACTION="<? echo $PHP_SELF; ?>">
<input type="text" NAME="subject[0]" value="<? echo $subject[0];
?>" />
<input type="text" NAME="subject[1]" value="<? echo $subject[1];
?>" />
<input type="submit" value="Submit!" />
<input type="reset" value="Reset" />
</FORM>
</body>
</html>
i got the body code from www.linuxguruz.org
but i can't seem to get my input value correct,
rather then parsing the variable subject[0]
it passes the words "<? echo $subject[0]; ?>" as the value instead,
i'm using macromedia dreamweaver MX as my html text editor
pls help... thanks!
Jonathan