
June 14th, 2001, 10:50 PM
|
|
Registered User
|
|
Join Date: May 2001
Posts: 17
Time spent in forums: 2 h 16 m 45 sec
Reputation Power: 0
|
|
|
grabbing posted variables - putting in MySQL
Another newbie here (excuse me if my terminology is off) -
I am trying to write a simple form input-to-mysql CGI script and I'm stuck at how to access the variables posted to my perl CGI. All the information I can find accesses the posted variables via the QUERY_STRING environment variable, then splits them into name/value pairs, rather than accessing them directly by name as PHP does.
Basically, I need to get to the point where the variables are named so I can insert them into the SQL statement below.
Can anyone explain to me how to do this, or point me to a resource that can explain it? Thanks!
$sql = "INSERT INTO contact (prefix,firstname,middlename,lastname,address1,address2,city,state,zip,country,email) VALUES ('$prefix','$firstname','$middlename','$lastname','$address1','$address2','$city','$state','$zip','$ country','$email')";
|