Commit 3fb5d898 authored by Polavarapu Satya Durga Lalitha Rao Sarma's avatar Polavarapu Satya Durga Lalitha Rao Sarma
Browse files
parents 9d1db319 a2286e70
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'swecha');
define('DB_PASSWORD', 'swecha');
define('DB_DATABASE', 'shms');
if (mysqli_connect_error()) {
die('Connect Error('. mysqli_connect_errno().')'. mysqli_connect_error());
} else {
if (isset($_POST['submit'])) {
$uname = mysqli_real_escape_string($con,$_POST['uname']);
$email = mysqli_real_escape_string($con,$_POST['email']);
$pass = mysqli_real_escape_string($con,$_POST['pass']);
$rpass = mysqli_real_escape_string($con,$_POST['rpass']);
$query = "insert into regiscred (uname,email,pass,rpass) values('$uname',$email','$pass','$rpass')";
$result = mysqli_query($con,$query);
$con = mysqli_connect("localhost", "root", "", "blood");
if($con === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
$name = $_POST['name'];
$age = $_POST['age'];
$city= $_POST['city'];
$mobile = $_POST['number'];
$ld= $_POST['ago'];
$sql = "INSERT INTO bloo (uname,blood,age,mobile,city,dd) VALUES ('$name', '$blood', $age,'$mobile','$city',$ld)";
if($result == true){
<script> alert("thanks foro registering");</script>
echo "<h1>Thank You for Being a Blood Donor..You will Receive a Message when there is a Requirement!! </h1>";
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment