Question: I am trying to make a form where if you click on the submit button, whatever you have written on the text field would be stored in the database. 
I have created a page as create.php and have written down this code:

```
<html>
<head>
 <title>adding info</title>
</head>
<body>
<h1>insert information</h1>
<form method=”post” action = "">
 <p>name: 
 <input name=”name” type=”text”> </p>
 <p>age:
 <input name=”age” type=”text”> </p>
 <br>
 <p> email:
 <input name = "email" type = "text"> </p>
 <br>
 <input type="submit" name="submit" value="submit">
</form>
</body>
</html> 

<?php

function checkconnection()
{
    global $link;
    $databaseName = 'information';
    $link = mysqli_connect('localhost', 'root', '', $databaseName);
    return $link;
}
if(checkconnection())
{
    echo 'i have gotten connected to the database' ;
}
else
{
    echo 'error';
}

if(isset($_POST['submit'])) 
{    
    $name = $_POST['name'];
     $age = $_POST['age'];
     $email = $_POST['email'];
     //connect to database
     db();
     global $link;
     $query = "INSERT INTO info('name', 'age', 'email') VALUES ('$name', '$age' , '$email' )";
     $insertInfo = mysqli_query($link, $query);
    if($insertInfo)
    {
        echo "works";
    }else
    {
        echo mysqli_error($link);
    }
    mysqli_close($link);
 }

?>

```

using my checkconnection() , I know that my database is getting connected. When I click on submit, it doesn't show any error. When I go to my database though there is no record being added.

Answer: 
Double-check all of the quotes in your HTML. You seem to have some typographic quotes instead of straight quotes;

```
<form method=”post” action = "">

```

should be

```
<form method="post" action="">

```

and having the wrong quotes may confuse your browser to not send the request variables with the names you expect.
You define your $link twice - maybe that's the problem.
And there is a space 

```
$query = "INSERT INTO info('name', 'age', 'email') VALUES ('$name', '$age' , '$email' )";

```

between '$age' and the ,.
Does the "works" get printed?

And don't forget to bind the data - it's not a solution to your problem, but your code is not safe yet.