Fehm
08-03-2009, 02:12 PM
Hi, I posted with some tips on my php to email form, which is now succesfully working, but ive decided to go one step further, and try playing around with it, so maybe the data that is submitted goes into a MySQL database, this is my insertinto.php file that is the action for submit in the form:
<?
include ('config.php');
if (isset($_POST['submit']));
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$sample = $_POST['sample'];
$create = mysql_query("
INSERT INTO `Apps` (`name`,`email`,`message`,`sample`
) VALUES (NULL '" . $name . "','" . $email . "''" . $message . "''" . $sample . "');");
if (!$create)
{
die("There was a problem sending your application");
} else
{
die("Thank you for application, we aim to reply within 24 hours!!");
}
?>
To you, there'll be thousands of errors. id appreciate any help on getting this to work. Just some hinters would be nice, but if its all a load of crap then, Ill start again lol
Thanks for anyone help, rep will be given where deserved and if possible!
Thank you =D
Callum
<?
include ('config.php');
if (isset($_POST['submit']));
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$sample = $_POST['sample'];
$create = mysql_query("
INSERT INTO `Apps` (`name`,`email`,`message`,`sample`
) VALUES (NULL '" . $name . "','" . $email . "''" . $message . "''" . $sample . "');");
if (!$create)
{
die("There was a problem sending your application");
} else
{
die("Thank you for application, we aim to reply within 24 hours!!");
}
?>
To you, there'll be thousands of errors. id appreciate any help on getting this to work. Just some hinters would be nice, but if its all a load of crap then, Ill start again lol
Thanks for anyone help, rep will be given where deserved and if possible!
Thank you =D
Callum