Embed PHP in HTML Error

I have been trying to embed php into this registration form and it gives me error on the last line where am closing the html tag

[php]

Register | Assessment Calender
logo
Home>Enquiry Form

Products


Roses
Amaryllis
Violet
Tulips
Orchids

Enquiry Form
Deliveries
About Us

Register

First Name:
Last Name:
Username:
Email:
Password:
Confirm Password:
Location:
<?php

//Connecting to database

$con=mysqli_connect(“localhost”,“root”,"",“User_db”);
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

//
$Firstname = $_REQUEST[‘Firstname’];
$Lastname = $_REQUEST[‘Lastname’];
$Username = $_REQUEST[‘Username’];
$Password = $_REQUEST[‘Password’];
$Password_Conf = $_REQUEST[‘Password_Conf’];
$Email = $_REQUEST[‘Email’];
$Location = $_date[‘Location’];

//Here we will check do we have all inputs filled

if(empty($Username)){
die(“Please enter your password!
”);
}

if(empty($Conf_Password)){
die(“Pleas confirm your password!
”);
}

if(empty($Email)){
die(“Please enter your email!”);

//Check if username is already in use

$user_check = mysq;_query(“SELECT Email FROM Users WHERE Email=’$Email’”);
$do_email_check = mysql_num_rows($email_check);

//Display errors

if($do_user_check > 0){
die(“Username is already in use!
”);
}

if($do_email_check > 0){
die(“Email is already in use!”);
}

//Checking if passwords match

if($Password != $Conf_Password){
die(“Passwords do not match!”);
}

//if everything is ok then user is registered

$sql=“INSERT INTO Users (Firstname, Lastname, Email, Password, Age, Location)
VALUES
(’$_POST[Firstname]’,’$_POST[Lastname]’,’$_POST[Email]’,’$_POST[Password]’,’$_POST[Age]’,’$_POST[Location]’)”;

if (!mysqli_query($con,$sql))
{
die('Error: ’ . mysqli_error());
}
echo “You have successfully registered. <a href='Login.php’Login”;

mysqli_close($con);

?>

...Thank You For Visiting...

Copyright (c)
[/php]

Hello friend, look…

if(empty($Email)){
die(“Please enter your email!”);
}

There’s a few problems here heh

For example:

[php]$user_check = mysq;_query(“SELECT Email FROM Users WHERE Email=’$Email’”);[/php]

Also, mixing of mysql and mysqli does not work

So what can I change from here to make it work? It didn’t give me errors on the MySQL codes it gave me errors wen I tried to close the

Sponsor our Newsletter | Privacy Policy | Terms of Service