Pretty simple.
Code:
#!/usr/bin/perl
# using 'strict' means you have to define all your
# variables with 'my'..see variable examples further
# down. Once they have been defined in that sub
# routine, there is no need to redefine them.
use strict;
# use CGI.pm, rather than loads of
# long winded crap to get the variables...
use CGI;
$IN = new CGI;
# grab the variables passed over...
my $name = $IN->param('name');
my $age = $IN->param('age');
# print the content type header, and then the text
# you want. ' and " (as well as a few other
# charachters) need to be escaped by putting a
# backslash in front of them....just so you know why
# I have backslashes in my code ;)
print $IN->header();
print "Your name is $name, and your age is $age....arn't you an old 'en then ;)";
Hopefully that helps
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my
Amazon Wish List GLinks ULTRA Package | GLinks ULTRA Package PRO Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin |
Pre-Made Template Sets |
FREE GLinks Plugins!