Example #1
0
if (!session_status()) {
    session_start();
}
require_once '../config.php';
require "../webconfig.php";
require_once "Database.php";
$name = new Database();
$name->controls();
$name->connection();
if (!$name->con) {
    echo 'Error: ' . mysql_error();
}
echo "thanks for taking the survey";
if (isset($_POST['submit'])) {
    $name->savePerson_detail($_POST);
    $name = $_POST['Header'];
    $product_name = $_POST['product_name'];
    $Model_size = $_POST['Model_size'];
    $Net_Prize = $_POST['Net_Prize'];
    $Selling_Prize = $_POST['Selling_Prize'];
    $Warranty = $_POST['Warranty'];
    $PdtDescription = $_POST['Description'];
    //$Brand_name=$_POST['Brand_name'];
    $db = new Database();
    $db->controls();
    $db->connection();
    $db->insert($name, $product_name, $Model_size, $Net_Prize, $Selling_Prize, $Warranty, $PdtDescription);
}
if (array_key_exists("submit", $_REQUEST)) {
    if (($_FILES["file"]["type"] == "image/gif" || $_FILES["file"]["type"] == "image/jpeg" || $_FILES["file"]["type"] == "image/pjpeg" || $_FILES["file"]["type"] == "image/png" || $_FILES["file"]["type"] == "application/pdf" || $_FILES["file"]["type"] == "application/msword" || $_FILES["file"]["type"] == "text/txt" || $_FILES["file"]["type"] == "text/doc") && $_FILES["file"]["size"] < 20000000000000000) {