Hi,
I need a little help trying to figure out how to pass a variable through a
URL.
I need to set up a website that has a bit of dynamic content. A customer
has an MLM business and he wants to set up a web page for each of his
customers (the people who have joined under him). The web pages will be the
same for each customer, except for a few items like their name, address, etc
.... He wants to give each customer their own URL so they can advertise it.
I really don't want to set up 100 subdirectories and then replicate all of
the HTML (except for the name and address) for each person. I was thinking
that maybe I could make a script that would take data from the URL and then
create the web page. Something like:
www.domain.com/whatever?smith or
www.domain.com/whatever?bob or
www.domain.com/whatever?jerry
If I could get the above to work, I could have a script that would intercept
the variable and then find the customer information from a small database
and insert it into the HTML.
I'm not sure how to intercept the variable. I've tried:
$input=$ARGV[0];
print"HTTP/1.0 200 OK/n Content-type: text/html\n\n"
print "<html><head><title>Thank You</title></head>\n"
print "<body><H1>This is a test</H1>\n"
print"<h1>$input</h1>"
print "</BODY></HTML>"
Can anybody help me out? It seems to work OK from the command line when I
call it like:
test.pl mystery_variable
However, it doesn't seem to work (pass the variable) when I call it from a
web browser like:
www.domain.com/whatever?mystery_variable
Is there a better way to do this?
Thanks,
Lance