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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Trouble updating MySQL Table via php script

    Hello,
    I have two scripts, one, update.php, takes updated info from row in table and thru a _POST the row is updated by updated.php script. The two scripts are posted on pastebin here: [PHP] Update.php - Pastebin.com. The trouble I'm having is when I fill in the updated form and hit submit on the update.php script I get this error message -
    Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in /var/www/inventory/updated.php on line 37
    Being new to php & mysql this has thrown me. I hope someone can take a look and point me in right direction. I also posted the schema for the table in case that would be helpful.

  • #2
    New to the CF scene
    Join Date
    Jun 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm also noticing when I change the line in update.php to:<form action="updated.php" method="post">
    <input type="text" name="ud_id" value="<? echo $id>"?> I dont get the id number in the field I get "<? echo $ id>". So I'm not passing the integer to updated.php if that helps.


  •  

    Tags for this Thread

    Posting Permissions

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