August 8th, 2000, 09:48 AM
I've got a registration page but I want users to verify their data before it's submitted to the database. The form input is passing a string of data to verify.cgi, which I then want to pass the SAME STRING of data on to add.cgi. How can I achieve this?
August 8th, 2000, 10:32 AM
I dunno, but have you tried two ACTION tags inside your FORM tag?
August 8th, 2000, 11:36 AM
Let me rephrase my desires: I want to pass an array from one script to be used in another script. How is that done?
August 8th, 2000, 01:03 PM
There are several ways to do this.
1. If you plan on going through the system (system()-like commands) do it like this:
system `perl verify.cgi "$var1" "$var2"`;
##This will pass the values $ARGV and $ARGV as $var1 and $var2.
Then to pass it back, do the same type of thing.
I don't recommend this, it's just a pain.
2. Redirect the browser to the script with the variables in the string (which is the GET method):
print "Content-type: text/htmln";
print "Location: verify.cgi?var1=asdf&var2=fdasnn"
3. Just put verify.cgi in you add.cgi script as a subroutine and run it when your want to verify the data. This is the best idea.
[This message has been edited by JonLed (edited August 09, 2000).]
August 8th, 2000, 04:16 PM
>>The form input is passing a string of data to verify.cgi, which I then want to pass the SAME STRING of data on to add.cgi.
Verifying the strings is part of the Add user process so merge them together to ONE script. There is no reason to separate them to two scripts. Though, in some situation, it loads faster technically, but yours would make it slower.