...

View Full Version : undefined index?



jarv
05-16-2008, 04:05 PM
Notice: Undefined index: assignedto in insert.php on line 7



<?php
include_once('config.php');
$Assessor = mysql_real_escape_string(stripslashes($_POST['Assessor']));
$page = mysql_real_escape_string(stripslashes($_POST['page']));
$Dateadded = mysql_real_escape_string(stripslashes($_POST['Dateadded']));
$Assessment = mysql_real_escape_string(stripslashes($_POST['Assessment']));
$assignedto = mysql_real_escape_string(stripslashes($_POST['assignedto']));
$section = mysql_real_escape_string(stripslashes($_POST['section']));
$sql = "INSERT INTO assessment (Assessor, page, Dateadded, Assessment, assignedto, section) VALUES ('$Assessor','$page','$Dateadded','$Assessment','$assignedto','$section')";
$result = mysql_query($sql,$link) or die('Error: ' . mysql_error() . '<br>SQL: ' . $sql);
header("Location: display.php");
mysql_close($link);
?>

derzok
05-16-2008, 04:10 PM
Whatever form submit the data does not have a field named "assignedto" - check your HTML again.

jarv
05-16-2008, 04:21 PM
silly me changing things that don't need changing!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum