Passing parameters to second script

I have a script that creates a database entry for a new user. After the user has been validated, I create a directory for him or her. So while my first script is meant to create a new user, I have another script which I want to use solely to create the directory.
Here's my question: How do I send these two values, $NEW_USER and $NEW_DIRECTORY_NAME from my first script to my second, and, also, will simply sending these values to the directory-creating script cause the first script to EXIT?
Who is Participating?
khacharnConnect With a Mentor Commented:
hi microfleet..
here the answer..i have used this method(it is the only method) for myself..hope it suits you..
i will give you some brief code..
1) Calling program(
to execute the script you will have to write this foll code somewhere in you script..
  start("perl <parameter>");

2) Called program..(
In the very beginning of your program you will write this code..  
($parameter = $ARGV[0]);
#Now you have the parameter you wanted in your code..
Hope it helps
The simplest way is probably with <input type="hidden">
microfleetAuthor Commented:
I want one script to call another. As far as I know the <input type> is a HTML code. That isnt what I want. After the user has been created, my script should through itself call a second script. It should pass its variables to it. I think by using the REQUIRE statement I can accomplish part of what I want, but there is still a part that I need: I neglected to mention this but the second script needs to be able to read the QUERY_STRING just as if all the form information had been posted to it and not to the first script.
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

you can set $ENV{QUERY_STRING} and $ENV{REQUEST_METHOD} before calling the second script.
microfleetAuthor Commented:
ok, those values are set. How then do I make a direct call to a second script from within my first script?
If you want the first script to exit when the second script is done, you can exec it,
if you want to return the the first script after the second script is done, you can call it with system,
if the second script is a perl script, you can do it.
microfleetAuthor Commented:
Yes your code does fine; however, I figured out a way to do what I want a few days ago. I forgot I still had this posted. But since you did answer the question, and it was helpful, I'm giving you the points.
thanx micro)for the points.
Could you also post how you Did it..for me..
microfleetAuthor Commented:
khacharn, this is how I POST to a perl script:

'----BEGIN CODE---

Dim Flags As Long, URL as string
Dim TargetFrame As String
Dim PostData() As Byte

URL = ""   'You don't need to send a "?"
HEADERS = "Content-Type: application/x-www-form-urlencoded" & vbCrLf

'The ampersands are important!
PostData = "&name=John Doe&"

' VB creates a Unicode string by default so you need to
' convert it back to Single byte character set.
PostData = StrConv(PostData, vbFromUnicode)

'send information
WebBrowser.Navigate URL, Flags, TargetFrame, PostData, HEADERS

'---END CODE----
All Courses

From novice to tech pro — start learning today.