Jump to content

dksmarte

Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dksmarte's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Nevermind. I realized what the problem was. I put action="addmember.php" and action="post" in the form tag. It should've been method="post". [!--quoteo(post=350850:date=Mar 1 2006, 09:03 PM:name=thorpe)--][div class=\'quotetop\']QUOTE(thorpe @ Mar 1 2006, 09:03 PM) [snapback]350850[/snapback][/div][div class=\'quotemain\'][!--quotec--] If you know you should do something, why dont you do it? If the form is posted empty then the indexes are never created. [/quote] Well I was purposefully submitting things so that I knew the indexes would be created. That's why I found the error so weird when I got it. No worries though, I found the problem in my form.
  2. I'm making a simple script to add a member to a website and I got some pretty interesting errors. First of all, here's the code: *removed because no longer relevant to solution* Here's the HTML form that submits to the above code: [code]<form action="addmember.php" action="post">                         <table>                             <tr>                                 <td>Username:</td>                                 <td><input type="text" name="username" /></td>                             </tr>                             <tr>                                 <td>MD5 Hash Of Password:</td>                                 <td><input type="text" name="password" /></td>                             </tr>                             <tr>                                 <td></td>                                 <td><input type="submit" value="Add Member" /></td>                             </tr>                         </table>                     </form>[/code] I get this error when creating a new member with the above forum on php page: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] Notice: Undefined index: username in c:\program files\easyphp1-8\www\haven\members\addmember.php on line 13 Notice: Undefined index: password in c:\program files\easyphp1-8\www\haven\members\addmember.php on line 14[/quote] Now I know that I should check to make sure that the values of the script are never empty but I'm not too concerned with that since this script can only be accessed by administrators. Anyways, even when I submit data from the form so I know that the post array will have the indexes username and password defined, it still gives me that error. Shouldn't it be working? What am I missing?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.