learn.php
----------
<?php
$input = $_POST['msg'];
echo "You said: $input";
?>
index.html
-----------
<form action="learn.php" method="post">
Enter your message: <input type="text" name"msg" size="30" />
<input type="submit" value="send" />
</form>
After i input words and send/submit. This error appears when i preview it in DW:
Notice: Undefined index: msg in C:\localhost\learn.php on line 11
You said:
Or it shows a blank page when I access the file in my folder.
Thanks alot.
I have no idea why there is an error.. please advice.
Moderator: General Moderators
Re: I have no idea why there is an error.. please advice.
You forgot the equals sign between name and "msg".
Also, please wrap your code in the [ code ] tags. It makes it much more readable.
Also, please wrap your code in the [ code ] tags. It makes it much more readable.
Re: I have no idea why there is an error.. please advice.
ahh... my bad. Such a simple mistake.
Code: Select all
<?php
echo 'Thanks alot Griven.'
?>Code: Select all