Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Can you write this script?
Old 08-19-2002, 04:51 PM Can you write this script?
Junior Talker

Posts: 4
Location: malaysia
Trades: 0
I'm gonna put a simple form on my site.Can you write cgi/ perl for this form??

---------------------

Username : boxxxxxxxxx

Password : boxxxxxxxxx

Login button.

Once member gave their usermane and password and push 'login button,' it will send to my cgibin and it will response through email automatically. But I don'T konw how to make the script. Hope you will help Thanks
__________________
What's this??
Dqur is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-19-2002, 05:38 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
I could make you one in PHP as a last resort... I'll try a Perl one in a second, have to get out my book But I'm a bit rusty so you may wanna wait until someone replies with a better one!
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Old 08-19-2002, 05:58 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
Ok, I did my personal best - you may want to use it until someone else makes a better one

HTML Page:
Code:
<form action="form.pl" method="post">
Username: <input type="text" name="user"><br>
Password: <input type="password" name="pass"><br>
<input type="submit" value="Login">
form.pl :
Code:
#!/usr/bin/perl
#####################
# Getting Form Data #
#####################
require cgi-lib.pl;		# Since I'm new to Perl, you'll have to download the cgi-lib library so we can
				# access form data, download it from http://cgi-lib.berkeley.edu/ and upload it into
				# your CGI-BIN

$user = $input{'user'};
$pass = $input{'pass'};



#############################
# Sending the email message #
#############################
open(MAIL,"|/usr/sbin/sendmail -t");
print MAIL "To: your\@email.com \n";		# Make sure when ever you use the at sign, you escape it, the at sign is a special charcter in Perl so you must put a \ before it
print MAIL "From: from\@address \n";		# This could be 'webserver@domain.com" or any text you want
print MAIL "Subject: The Subject \n";
print MAIL "Username: $user \n Password: $pass \n Anymore text you may want.";
close(MAIL);
Hope there's no errors

Last edited by Christopher; 08-20-2002 at 03:21 PM..
Christopher is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Can you write this script?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19985 seconds with 12 queries