Cannot INSERT INTO a table

android
php
mysql

#1

Hi, I am currently creating an android app for college and I am trying to allow customers to login or register to the app, but for some reason I am having problems inserting data into a phpMyAdmin database. At the moment I can retrieve data from the database for login but i cannot insert data for registration.

I am recieveing any echo’s and errors i set up from the php script so I know the app is connecting correctly. It is just when I go to test the actual insertion nothing happens I get no errors, all my echos for testing return successfully with all the correct parameters but the database never updates. I have checked permissions in the database and it I have full access to read and write, so its not a permission issue (unless c9 has another permission i need to give myself access to ), as already stated pull (Select) information from the database so it is connecting properly.
Iam really stuck if any body can help I would greatly apperciate it.
Here is my php code

    <?php 
	echo "it made it to the file";
	include("dbconnect.php");
	$Username = $_POST['UserName'];
	$Password = $_POST['Password'];
	$Name = $_POST['Name'];
	$Age = $_POST['Age'];
	$Email = $_POST['Email'];
	$PrevCollege = $_POST['PrevCollege'];
	$PrevCourse = $_POST['PrevCourse'];
	$Cert = $_POST['Certificate'];
	$Interests = $_POST['Interests'];
   /*making sure all information is being recieved*/
	echo "The name given was ",$Name, " Password ", $Password, " username ", $Username, " Email ", $Email;
	/*this if statement is used to avoid null items going into database because retrieving null items from the database when logging in causes and error will add ways handling null objects when everything else works*/
	if(!empty($_POST['PrevCollege'])){
		$PrevCollege = "Notspecified";
		echo "prevCollege is empty";
	}
	if(!empty($_POST['PrevCourse'])){
		$PrevCourse = "Notspecified";
	}
	if(!empty($_POST['Certificate'])){
		$Certificate = "Notspecified";
	}
	if(!empty($_POST['Interests'])){
		$Interests = "Notspecified";
	}
	echo "about to insert";
	$sql= $connect->prepare("INSERT INTO UserDetails (UserName, Password, UserEmail, Name, age, CertificatesAchieved, Interests, PrevCollege, PrevCourse) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"); 
		if ( false===$sql) {
		echo "failed to prepare";
		die('failed error 6 ' .htmlspecialchars($sql->error));	
	}
	$sql->bind_param("sssssssss", $Username, $Password, $Email, $Name, $age, $Cert, $Interests, $PrevCollege, $PrevCourse);
		if ( false===$sql) {
		echo "failed to bind";
		die('failed error 5 ' .htmlspecialchars($sql->error));	
	}
	$sql->execute();
	if ( false===$sql) {
		echo "failed to execute";
		die('failed error 6 ' .htmlspecialchars($sql->error));	
	}else{
		//$sql->close();
		mysqli_stmt_close($sql);	
		echo "worked";
							
	}
	
?>

Also here is a screen shot of the database structure just in case