HTML POST function not working?

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
recce
-


Joined: 19 Jun 2005
Posts: 6
Location: Toronto Ontario Canada

PostPosted: Wed Aug 17, 2005 3:40 am    Post subject: HTML POST function not working? Reply with quote

Is abyss configured to use only the get action in forms or something? I'm trying to create a script in php and i tried to use the post action. however it's behaving as the get function! any ideas?

the form is as follows:
Code:
<form>
      <h1>LOG IN</h1>
      <form method="POST" action="administrator2.php">
      <p><strong>Username:</strong><br>
      <input type="text" name="username"></p>
      <p><strong>Password:</strong><br>
      <input type="password" name="password"></p>
      <p><input type="submit" name="submit" value="Login"></p>
      </form>


the next page verifies that the form was filled out:

Code:
//check for required fields from the form
      if ((!$_POST[username]) || (!$_POST[password])) {
         echo "something was missing. please try again";
         exit;

anyone notice anything?
_________________
Fly High far and free but don't forget to turn left at Alberqurque
Back to top View user's profile Send private message Visit poster's website
k1ll3rdr4g0n
-


Joined: 04 Jul 2004
Posts: 609

PostPosted: Wed Aug 17, 2005 5:07 am    Post subject: Reply with quote

Code:
//check for required fields from the form
      if ((!$_POST['username']) || (!$_POST['password'])) {
         echo "something was missing. please try again";
         exit;


try that
_________________
Back to top View user's profile Send private message AIM Address
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Aug 17, 2005 1:06 pm    Post subject: Re: HTML POST function not working? Reply with quote

recce,

Abyss knows how to deal with GET and POST requests (the best example is this forum which is hosted on Abyss and uses POST requests). Your PHP code seems to be the problem.
Try changing your POST action with a file containing this code:

Code:

<?php
phpinfo();
?>


to check what POST variables are actually passed to your script.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
recce
-


Joined: 19 Jun 2005
Posts: 6
Location: Toronto Ontario Canada

PostPosted: Wed Aug 17, 2005 8:58 pm    Post subject: Reply with quote

Thanks for the help.... Rule # 1 of webcode troubleshooting: CHECK SYNTAX.... 1 quotation mark was throwing the whole script out of wack.....
_________________
Fly High far and free but don't forget to turn left at Alberqurque
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group