"; $dt2=strtotime(date("$dob")); //echo $dt2; echo "
"; $diff=$dt1-$dt2; $dys=$diff/86400; $yrs=$dys/365; //echo $yrs; if($yrs > 18 && $yrs < 60) { $d=strlen($day1); if($d==1){$day1="0".$day1;} $last_donated=$year1."-".$month1."-".$day1; if($dont=="ok") { $last_donated="9999-99-99" ; } $dt=date("Y-m-d"); if($resi_city=="other"){ $resi_city="$resi_city_oth";} if($work_city=="other"){ $work_city="$work_city_oth";} $sql="insert into registered_user (name,u_password,email,loginid,phone1,phone2,mobile,dob,sex,blood_group,rh_factor,last_donated,resi_address,resi_city,resi_state,resi_pin,resi_country,work_address,work_city,work_state,work_pin,work_country,registered_as,diseases,comment,date_of_regn ) "; $sql.="values('$name','$u_password','$email','$email','$ph1','$ph2','$mobile','$dob','$sex','$blood_group','$rh_factor','$last_donated','$address','$resi_city','$resi_state','$resi_pin','$resi_country','$work_address','$work_city','$work_state','$work_pin','$work_country','$reg_as','$diseases','$comment','$dt')"; mysql_query($sql); $rowid=mysql_insert_id(); $regn_no="wbb-".$rowid; $sql_upd="update registered_user set regn_no='$regn_no' where uid=$rowid"; mysql_query($sql_upd) or die ($sql_upd); /////////////////////////// End of inserting data ////////////////////////////////// //////////////mail function goes here//////////////////// $to="$email"; $subj="Your login details from www.webbloodbank.org"; $messege="Hello $name Thank you for registration
Your Username is : $email
Your Password is : $u_password
If you want to login please click on following link :
http://www.webbloodbank.org"; //$headers.="From : www.webbloodbank.org \n"; $CRLF = "\n"; $headers = "MIME-Version: 1.0{$CRLF}"; $headers .= "From:www.webbloodbank.org{$CRLF}"; $headers .= "Content-type: text/html; charset=iso-8859-1{$CRLF}"; mail($to,$subj,$messege,$headers); header("Location:confirmation.php"); /////////////End of mail function/////////////////////// } /////end of if else{ $msg="Your age is not within 18 to 60. Sorry you can not register "; }//////end of else } ?> Web Blood Bank
Password *
Email * (user name)
Phone no *
Residence : Office :
Mobile No.
Date of Birth * -
Sex *
Blood Group * > A    > B    > AB    > O
RH Factor * > Positive    > Negative
Registered as* > Donor    > Seeker    > Both
Last Blood Donated on -
  Donated long back
Residential Address *
 City or
Work Address
 City or
Additional Comments
(if any)

The above details furnished are true and accurate. Blood donation is a medical procedure and I accept total responsibility for any risks associated with the donation of my blood. Iím willing to be a voluntary blood donor without any inducement. I further state that no remuneration shall be accepted by me for donating blood. I further state that I have no objection if you publish my name and other particulars as a blood donor in your above site.