hi colin,
i have tried to do what you are suggesting me, but i am unable to do it as am new to php.
please send me the code if possible:
here is my first file code:
<?php
if((strlen($aunm)==0) || (strlen($apas)==0) || (strlen($arpas)==0))
{
echo '
<head>
<meta http-equiv="refresh" content="1;url=../register1.htm">
</head>
<body>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p align="center"><font face="Verdana, Arial" size=5 color="#000000">Either one of the Fields have been left blank</font></p>
</body>
';
}
else
{
include ( "include/conectdb.inc" );
$sql = "SELECT dunm FROM oaces WHERE dunm = '$aunm'";
$result = mysql_query($sql,$db);
$rowchk = mysql_num_rows($result);
if($rowchk == 0)
{
$sql1 = "INSERT INTO oaces (dunm,acod) VALUES ('$aunm','$arpas')";
$result1 = mysql_query($sql1,$db);
echo $dsrdusrnm;
echo '
<head>
<meta http-equiv="refresh" content="1;url=../register2.php3">
</head>
<body>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p align="center"><font face="Verdana, Arial" size=5 color="#000000">Hello !! Please fill in the other details in next form !</font></p>
<form method="post" action="register2.php3">
<input type=hidden name=\"id\" value=\"$aunm \">
</form>
</body>
';
}
if($rowchk > 0)
{
echo '
<head>
<meta http-equiv="refresh" content="1;url=../register1.htm">
</head>
<body>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p align="center"><font face="Verdana, Arial" size=5 color="#000000">This Username Already Exist</font></p>
</body>
';
}
include ( "include/closedb.inc" );
}
?>
here is my second file code :
<?php
echo $id;
echo'<form method=\"post\" action=\"regres1.php3\">
<input type=hidden name="id1" value=\"$id\">
</form>';
?>
& finally here is my third file code :
<?php
#database function :-
include ( "include/conectdb.inc" );
$sql = "INSERT INTO oaces (dunm,acod) VALUES ('$aunm','$arpas')";
echo $sql;
$result = mysql_query($sql,$db);
echo $result;
print result;;
print mysql_error();
if ( $asalu == "" )
{
if ( $agender == "Male" )
$asalu = "Mr.";
if ( $agender == "Female" )
$asalu = "Ms.";
}
$sql1 = "INSERT INTO oprdtl (usrid,salu,fnm,lnm,dob,sex) VALUES (LAST_INSERT_ID(),'$asalu','$afnm','$alnm','$adobd/$adobm/$adoby','$agender')";
echo $sql1;
$result1 = mysql_query($sql1,$db);
echo $result1;
print result1;
print mysql_error();
$sql2 = "INSERT INTO odcnu (usrid,yrldc,bchyr,dcpln,husno,odams) VALUES (LAST_INSERT_ID(),'$adcly','$adcbch','$adcpl','$ahusno','$aodano')";
echo $sql2;
$result2 = mysql_query($sql2,$db);
echo $result2;
print result2;
print mysql_error();
$sql3 = "INSERT INTO orsdtl (usrid,hadd,hcty,hstat,hzip,hcntry,hcell,hfon,heml) VALUES (LAST_INSERT_ID(),'$ahadd','$ahcty','$ahstate','$ahzip','$ahcntry','$ahcell','$ahfon','$aheml')";
echo $sql3;
$result3 = mysql_query($sql3,$db);
echo $result3;
print result3;
print mysql_error();
$sql4 = "INSERT INTO owrkdtl (usrid) VALUES (LAST_INSERT_ID())";
echo $sql4;
$result4 = mysql_query($sql4,$db);
echo $result4;
print result4;
print mysql_error();
$sql5 = "INSERT INTO omrabt (usrid) VALUES (LAST_INSERT_ID())";
echo $sql5;
$result5 = mysql_query($sql5,$db);
echo $result5;
print result5;
print mysql_error();
include ("include/closedb.inc");
?>
please send me the code :
how do i send varible from on script to another.
is it necessary that all the files should be php file.
how do i collect that data in next file and again send it to third fil.
and how do i again collect it in third file.
i hope now u gets my problem
thanx
piyush