Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically Sumbit A Form

Status
Not open for further replies.

hunter13605

Technical User
Apr 7, 2006
44
0
0
US
i have a 3 case if else system that decides on which user type a person is. The only thing that i could find to automatically submit the form is...

Code:
if ($match == 3)
{
  print "<FORM ACTION=admin.pl METHOD='AutoPOST' NAME='sendtoadmin'>";
  print "<INPUT TYPE='hidden' NAME='pin' VALUE=$pin>";  
  print "<INPUT TYPE='hidden' NAME='password' VALUE=$password>";
  print "</FORM>";
  print "<SCRIPT LANGUAGE='JavaScript'>
	document.sendtoadmin.submit();
  </SCRIPT>";
}

i don't like doing it this way because it shows the username and password in the address bar. Is thes another way to automatically submit a form without displaying the information in the address bar? Possibly an OnLoad script.
 
This is really a CGI scripting question, or maybe even a javascript question, but why not use the correct method:

METHOD='POST'

I never heard of method autoPost.
 
That is code that i found after 2 hours of searching google. I don't really want to use Java script but that was the only solution that i could find at the time. Also, how do i post in the cgi forum?
 
Thanks, i had forgotten to try that but i just did and problem solved. I can't remember why it said to put AutoPOST instead of POST but that was the problem. Thanks for all your help now and in the past.
 
one more quick question... Do pearl files have to go in the cgi-bin folder? I have always put them in there because i got a book that said that they wouldn't work if they weren't.
 
Most web servers are setup to only run scripts from the cgi-bin. They don't have to, but the server configuration files would have to be changed to allow script execution from other folders.

BTW: perl, not pearl. :)
 
alright, thanks for your help. Sorry about the spelling.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top