Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts

    undefined index?

    Notice: Undefined index: assignedto in insert.php on line 7

    Code:
    <?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);
    ?>

  • #2
    Regular Coder
    Join Date
    May 2008
    Location
    Ohio
    Posts
    231
    Thanks
    3
    Thanked 21 Times in 21 Posts
    Whatever form submit the data does not have a field named "assignedto" - check your HTML again.

  • Users who have thanked derzok for this post:

    jarv (05-16-2008)

  • #3
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts
    silly me changing things that don't need changing!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •