| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| recce -
 
 
 Joined: 19 Jun 2005
 Posts: 6
 Location: Toronto Ontario Canada
 
 | 
			
				|  Posted: Wed Aug 17, 2005 3:40 am    Post subject: HTML POST function not working? |   |  
				| 
 |  
				| 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 |       | 
	
		|  | 
	
		| k1ll3rdr4g0n -
 
 
 Joined: 04 Jul 2004
 Posts: 609
 
 
 | 
			
				|  Posted: Wed Aug 17, 2005 5:07 am    Post subject: |   |  
				| 
 |  
				|  	  | 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 |       | 
	
		|  | 
	
		| aprelium -
 
 
 Joined: 22 Mar 2002
 Posts: 6800
 
 
 | 
			
				|  Posted: Wed Aug 17, 2005 1:06 pm    Post subject: Re: HTML POST function not working? |   |  
				| 
 |  
				| 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 |       | 
	
		|  | 
	
		| recce -
 
 
 Joined: 19 Jun 2005
 Posts: 6
 Location: Toronto Ontario Canada
 
 | 
			
				|  Posted: Wed Aug 17, 2005 8:58 pm    Post subject: |   |  
				| 
 |  
				| 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 |       | 
	
		|  | 
	
		|  |