|
|

| |
}
else {
$myconnect=mysql_pconnect("209.61.158.248","wheels_msq","A4hj75") or die ("not able to connect");
$mydb=mysql_select_db("test",$myconnect);
$myquery=mysql_query("select distinct email from supdetails where email='$email'",$myconnect);
$nums=mysql_num_rows($myquery);
if($nums==0) {
if($attach!="") {
$nummyquery=mysql_query("select number from supplierlog",$myconnect);
$querystr=mysql_fetch_row($nummyquery);
$oldtotalnumbers=$querystr[0];
$totalnumbers = $oldtotalnumbers + 1;
mysql_query("update supplierlog set number=$totalnumbers where number=$oldtotalnumbers",$myconnect);
mysql_query($updatemyquery);
$str=pathinfo($attach_name);
$filename="file".$totalnumbers.".".$str["extension"];
/// copy the attachment
if(!file_exists("/tmp/$filename")) {
copy($attach,"/tmp/$filename");
}
/// read old file and write new file
$fp2 = fopen("/tmp/$filename","r");
$fp3 = fopen("ftp://wheels_ftp:TWEEvsls@www.wheelsindia.com/htdocs/supplier/docs/$filename","w");
while ($contents = fread( $fp2, 4096 )) {
fwrite( $fp3, $contents, strlen($contents) );
}
fclose($fp2);
fclose($fp3);
//// delete old file
if(file_exists("/tmp/$filename")) {
unlink("/tmp/$filename");
}
}
mysql_query("insert into supdetails values('$suppliersof1','$suppliersof2','$suppliersof3','$suppliersof4','$suppliersof5','$suppliersof6','$suppliersof7','$suppliersof8','$suppliersof9','$suppliersof10','$firm','$ceo','$cof','$name','$design','$add1','$add2','$phone','$fax','$email','$yoe','$nop1','$nop2','$nop3','$soo','$turnover1','$turnover2','$turnover3','$techcoll','$majorcus1','$nature1','$majorcus2','$nature2','$majorcus3','$nature3','$ifiso','$ifnoiso','$filename','$addcapacity','$pan','$cst','$tngst','$ecc','','','','N','$hintques','$hintans')",$myconnect);
?>
New Supplier Registration
, Welcome to the Wheels Suppliers Online. You will be activated by Wheels India Limited to access the website. Please await an E-mail providing you with the User ID and Password. Thanks For Registering.
Back to Login
|
}
else {?>
New Supplier Registration
Sorry! User Already Exists.
Back to Login
|
}
}?>
|
|