Link to home
Start Free TrialLog in
Avatar of phita
phita

asked on

Submit Data from URL

How can I do this:
When a visitor goes to www.mydomain.com/script.cgi?data=INFO


INFO is written to a file on the server?

Something along the lines of :

open (FILE, ">>$datafile");
print FILE "$data\n";
close(FILE);

? I don't know.
ASKER CERTIFIED SOLUTION
Avatar of amandeep
amandeep
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of phita
phita

ASKER

ok, instead of having it display "data '$data' stored" can we have it redirect to a different site?

I tried

print "<HTML><HEAD><TITLE>one second</TITLE>\n";
print "<meta http-equiv="Refresh" content="0; url=http://www.mydomain.com/"></head></html>\n";


but I get an error.
Avatar of phita

ASKER

also, instead of having ?data=INFO , can I have:

script.cgi?INFO ? Thanks!
Avatar of phita

ASKER

alright, I got the REDIRECTing thing to work,


the only little problem is the ?data=INFo one.
Avatar of phita

ASKER

w00t thanks alot i got it all figured out. thanks alot