Skip to content
Permalink
1fc184b196
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
33 lines (27 sloc) 711 Bytes
<?php
session_start();
include 'db_conn.php';
$sr = "localhost";
$username = "root";
$password = "";
$dbname = "test_db";
$con = mysqli_connect($sr,$username,$password,$dbname);
if (isset($_POST['submit']))
{
if (!empty($_POST['af_nam']) && !empty($_POST['af_num']) )
{
$af_nam = $_POST['af_nam'];
$af_num = $_POST['af_num'];
$query = "insert into airframe(af_name, af_num) values('$af_nam', '$af_num')";
$run = mysqli_query($con,$query);
if ($run)
{
echo "Air Frame Added";
}else {
echo "Fail to add Air Frame";
}
}else
{
echo "All fields require";
}
}