wgptya
Last Updated: February 25, 2016
·
692
· dubrod

simple mysqli processor

<?php
$database_server = "localhost";
$database_user = "XXX";
$database_password = "XXX";
$dbase = "XXX";

$mysqli = new mysqli($database_server, $database_user, $database_password, $dbase);

/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}

$insert = "INSERT INTO `leads` (
    `email`,
    `phone`
    ) VALUES (
    '".$_POST[email]."',
    '".$_POST[phone]."'
    )";

$result = $mysqli->query($insert);

$mysqli->close();

header('Location: success.html');

?>
Say Thanks
Respond

1 Response
Add your response

9292
D54f65ad3ff9ee1c9c033a403d4b5f9f
over 1 year ago ·