Menu

Can't update or delete

powers
2004-06-05
2004-06-06
  • powers

    powers - 2004-06-05

    I'm having a problem with my updating and deleting scripts
    My query

    $queryupdate = "select * from customer where customer_id = '$customer_id'";

    doesn't seem to be able to retrieve the details of the record to be updated unless the first record in the table has a customer_id value of 0. When the first record has a $customer_id=0 it is the only record it retrieves, otherwise I get a blank page with only the submit and reset buttons or 'cannot find record' in the case of the delete script.
    Any ideas??

     
    • powers

      powers - 2004-06-06

      Figured it out after reading the post by damian742.

      I edited the query below

      $queryupdate = "select * from customer where customer_id = '$customer_id'";

      to read

      $queryupdate = "select * from customer where customer_id = '$id'";

      My update forms now display data that i can amend!

      Thanx Damian!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.