![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
n00b question
here is the html file:
it takes your name. <HTML> <HEAD> <TITLE>Ben's CGI Test Page</TITLE> </HEAD> <BODY text = "aqua" bgcolor = "black"> <BASEFONT SIZE = 4> <h1 ALIGN = "center">Ben's CGI Test Page</h1> <hr WIDTH = 75% ALIGN = "center" size = "8"> <p>What is your name?</p> <form METHOD = "POST" ACTION="http://cgi-bin/test.cgi"> <input type = "text" NAME = "username" SIZE = 40 MAXLENGTH = 40 VALUE = "your name here"> <p><input type="submit" value ="send data">      <input type = "reset" value = "clear"></p> </form> </BODY> </HTML> here is the perl source: it prints out "hello" + whatever you entered...in theory. use CGI ' :standard';
$input = param('username');
print "Content-type: text/html \n\n";
print "hello $input";i'm using the sambar server to test the crap locally, http://localhost/page1.html is the html file on the server. the main directory is c:\Program Files\sambar63 under that we have the following: the html file is actually located in a subdirectory called "docs". the perl file is in the cgi-bin directory. i think i'm fucking this up from putting things in the wrong place or not looking for the right place. also, what's the difference between saving the perl file as as *.pl as opposed to *.cgi ? when i click to submit the name i get sent to the us government census page...WTF!?!
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|