Problems in working with two scripts

Friends i create two scripts of a site

In first script i used curl to post username and password …then after filling username and password the captche page occurs

i print captche on screen and then send captche value to second script… but when i send captche value the data of first script gone… so scripts are not working for me

You need a master or controlling script that calls the two scripts via includes or as functions. For example as functions:

function curl() {
    // do curl stuff;
}

function captcha() {
    // do captcha stuff;
}

// main script

if(not curl() stuff) {
    die() or something;
)

if(not captcha() stuff) {
    die() or something;
)

// do page stuff