- This topic is empty.
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I have signup form with captcha. I tried to store the values from input text field through submit button but seems it’s not working with me.
How to fix this? Thanks!
submit.php
session_start();
if( $_POST ){
$con=mysqli_connect("localhost","homecre1_testE","qwerty@12345","homecre1_testemailCheck");
if(mysqli_connect_errno()){
echo "Error".mysqli_connect_error();
}
$cnumber= $_POST['contractNumber'];
$email= $_POST['email'];
$iamount= $_POST['installmentAmount'];
$password= $_POST['password'];
$cpassword= $_POST['cpassword'];
$captcha = $_POST['captcha '];
$cnumber= mysql_real_escape_string($cnumber);
$email= mysql_real_escape_string($email);
$iamount= mysql_real_escape_string($iamount);
$password= mysql_real_escape_string($password);
$cpassword= mysql_real_escape_string($cpassword);;
$captcha = mysql_real_escape_string($captcha);;
$query = "
homecre1_testemailCheck
INSERT INTO.
Users(
contractNumber,
email,
installementAmount,
password,
captcha) VALUES ('$cnumber', '$email', '$iamount', '$password', 'captcha');";
mysql_query($query);`
/<em>Duplicate Entry Validation</em>/
$check_email = "SELECT * FROM Users WHERE email='$email'";
$run = mysqli_query($con,$check_email);
if(mysqli_num_rows($run)>0){
echo "Alert('Email $email already exist in our database!)";
exit();
}
echo "Registration Successfull";
/<em>Captcha Validation</em>/
if(($_REQUEST['captcha'] == $_SESSION['vercode'])){
$cnumber= mysql_real_escape_string($_REQUEST['cnumber']);
$email= mysql_real_escape_string($_REQUEST['email']);
echo 1;
} else {
echo 0;
}
}