I would like to add the word "Megapixels" after $_POST['mp'] so that within the 'mp' text box if I enter 12, it will save 12 Megapixels to the database.
PHP where I store the passed 'mp' value in the variable '$mp':
$mp = $cameras->real_escape_string($_POST['mp']);
I have tried the following
$mp = $cameras->real_escape_string($_POST['mp'] . "Megapixels");
$mp = $cameras->real_escape_string($_POST['mp']) . "Megapixels";
Im sure this would be very easy to do, I'm just missing something.
Thanks for your help
CODE UPDATE:
<?php
if (isset($add)) {
/* GET FROM POST */
$brand = $cameras->real_escape_string($_POST['brand']);
$category = $cameras->real_escape_string($_POST['category']);
$model = $cameras->real_escape_string($_POST['model']);
$mp = $cameras->real_escape_string($_POST['mp']);
/* QUERY */
if (mysqli_query($cameras, "INSERT INTO models(
/* ROW NAME */
brand, category, model, mp
) VALUES(
/* VARIABLE NAME */
'$brand', '$category', '$model', '$mp'
)")) {
header("Location: http://admin.specced.co.uk?suc=3");
}
}
?>