On a Mac with 10.2.4 using dreamweaver mx.
I am doing a tutorial from webmonkey:
http://hotwired.lycos.com/webmonkey/01/ ... rogramming
What i dont understand is why this code works on my live site, but not on my localhost?
Code: Select all
<html>
<head>
<title>My Form</title>
</head>
<body>
<form action="bad_words.php" method="post">
My name is:
<br> <input type="text" name="YourName">
<p> My favorite dirty word is:
<br> <input type="text" name="FavoriteWord">
<p>
<input type="submit" name="submit" value="Enter My Data!">
</form>
</body>
</html>Code: Select all
<html>
<head>
<title>Perv!</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>
Hi <?php print $YourName; ?>
<p>
You like the word <b> <?php print $FavoriteWord; ?> !?! </b>
<p>You oughta be ashamed of yourself!
</body>
</html>And the following works on both, local and live.
Is this the preferred syntax?
Am I getting ahead of myself, will the answer be more clear as I learn more of the basics?
Code: Select all
<html>
<head>
<title>Perv!</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>
Hi <?php print "$_POSTїYourName]";?>
<p>
You like the word <b> <?php print "$_POSTїFavoriteWord]";?> !?! </b>
<p>You oughta be ashamed of yourself!
</body>
</html>