Alexander R
New member
Been staring at the screen for half an hour now and I can't figure out why the value's are not being inserted into the table
<?php
include "conn.php";
$model=$_POST['model'];
$os=$_POST['os'];
$hdd=$_POST['hdd'];
$ram=$_POST['ram'];
$processor=$_POST['processor'];
$sql= "INSERT INTO computers(model, os, hdd, ram, processor)
VALUES('$model' , '$os' , '$hdd' , '$ram' , '$processor')";
mysql_query($sql);
header("location:index.html");
?>
No error messages appear, and I've echo'd the variables so i'm pretty sure it has something to do with the sql statement.
<?php
include "conn.php";
$model=$_POST['model'];
$os=$_POST['os'];
$hdd=$_POST['hdd'];
$ram=$_POST['ram'];
$processor=$_POST['processor'];
$sql= "INSERT INTO computers(model, os, hdd, ram, processor)
VALUES('$model' , '$os' , '$hdd' , '$ram' , '$processor')";
mysql_query($sql);
header("location:index.html");
?>
No error messages appear, and I've echo'd the variables so i'm pretty sure it has something to do with the sql statement.