Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old May 18th, 2006, 1:14 AM   #1
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
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"> &nbsp&nbsp&nbsp&nbsp <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.
bl00dninja is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:54 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC