Thread: Passing on Info

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Wheaton,IL USA
    Posts
    9
    Rep Power
    0
    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?
    Thanks,
    Jamie
  2. #2
  3. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    14
    I dunno, but have you tried two ACTION tags inside your FORM tag?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Wheaton,IL USA
    Posts
    9
    Rep Power
    0
    Let me rephrase my desires: I want to pass an array from one script to be used in another script. How is that done?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    15
    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[0] and $ARGV[1] 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).]
  8. #5
  9. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>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.

IMN logo majestic logo threadwatch logo seochat tools logo