SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Threaded View
-
Apr 11, 2009, 23:07 #1
- Join Date
- Mar 2007
- Posts
- 182
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Undefined index: action in C:\wamp\www\
I'm just practicing some basic stuff but i don't know why i keep getting this error:
Notice: Undefined index: action in C:\wamp\www\phpvt\lesson09\simpleform.php on line 14
This is my form:
PHP Code:<?php
if($_GET['action'] == 'submit') {
echo(($_GET['txtUsername']));
}
?>Code HTML4Strict:<form action="simpleform.php" method="get"> <fieldset> <legend>Login Information</legend> Username: <input type="text" name="txtUsername" maxlength="20" size="20" /><br /> Password: <input type="password" name="pwdPassword" maxlength="20" size="20" /><br /> <input type="submit" name="action" value="submit" /> </fieldset> </form>
Both the php code and the xhtml form code above are in the same file called simpleform.php
I really don't know why i'm getting this error.
Any thoughts?
Thank you.Jaysone
Bookmarks