Home › Forums › Quform PHP › Update Syntax
- This topic has 10 replies, 2 voices, and was last updated 8 years, 5 months ago by Ally.
- AuthorPosts
- June 4, 2016 at 10:39 am #19251davidjwestParticipant
Hi,
I have the code working for updating the database but I also want to use the code to allow users to edit their entries, so I need it to do updates too.
Can you give me an example of the syntax to do an update please as I am not familiar with OO syntax for db operations.
Thanks.
June 6, 2016 at 7:39 pm #19261AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- This reply was modified 8 years, 5 months ago by Ally.
June 9, 2016 at 12:15 pm #19303davidjwestParticipantThanks Ally.
This doesn’t work for me but it could easily be my code – how can I get the query to display somewhere so I can debug it?
I can’t echo it as that page isn’t actually displayed.
Thanks.
June 12, 2016 at 10:21 am #19313AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
June 13, 2016 at 6:19 pm #19321davidjwestParticipantThanks.
It appears that the product ID isn’t being passed from the form script, I have the details in a hidden field:
<input type=’hidden’ name=’pid’ value=’3′>
And then this in the process-all-elements.php file:
$pid = $_POST[‘pid’];
But it isn’t getting set, do I need any validation etc?
June 13, 2016 at 8:07 pm #19324AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
June 15, 2016 at 7:22 pm #19362davidjwestParticipantThanks – yes, here’s a link
http://vapourlove.co.uk/edit_multiple.php?pid=3
Obviously the value in pid changes and that populates the hidden value in the form, I can see it in the source code.
June 17, 2016 at 6:05 pm #19376AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
June 23, 2016 at 11:12 am #19407davidjwestParticipantYeah I get this:
[“pid”]=>
string(1) “3”June 23, 2016 at 12:33 pm #19408davidjwestParticipantBut when I assign it, the value isn’t showing up.
ie:
$pid=$_POST[‘pid’];
Isn’t assigning a value to $pid.
June 24, 2016 at 2:30 pm #19414AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.