w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Web form is submitting blank data to database
<?php
    require_once($_SERVER['DOCUMENT_ROOT'].'/inc/bootstrap.php');
    include("config/cn.php");
    $template['template']="page";

    if($_POST){


    // Data pulled from input form
    $full_name = $_POST['FullName'];
    $contact_number = $_POST['ContactNumber'];
    $best_time_to_call = $_POST['BestTime'];


    $enter_sql = "INSERT INTO contact
(full_name,contact_number,best_time_to_call)
VALUES('$full_name','$contact_number','$best_time_to_call')";
    /*print($enter_sql);*/

    $enter_query = mysql_query($enter_sql) or die(mysql_error());

    header('Location: /thankyou.php');
    exit;
} 

?>




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.