ok your problem is that each loop is updating every item. This is because you are testing if there is a value for $_POST, up date it. You need to set a identifier so it knows which post to update. for example, but the post id in your input field. then you can update from … Read more
Ok, i am not gonna write whole HTML there, just giving you outer structure:
check this one out. it should end up like this in the $_POST array (PHP format for easy visualization)
I’m fairly new to coding in HTML. After hours of searching the internet for a way to do this, I failed and so I’m here. I was setting up a CSRF Proof of concept page here, I want it to redirect to another page which will execute the payload that the CSRF had implemented. So … Read more
First of all, the .json attribute is a property that delegates to the request.get_json() method, which documents why you see None here. You need to set the request content type to application/json for the .json property and .get_json() method (with no arguments) to work as either will produce None otherwise. See the Flask Request documentation: … Read more
If you don’t want your data to be seen by the user, use a PHP session. Data in a post request is still accessible (and manipulable) by the user. Checkout this tutorial on PHP Sessions.
Dynamically create <input>s in a form and submit it Example: EDIT: Since this has gotten upvoted so much, I’m guessing people will be copy-pasting this a lot. So I added the hasOwnProperty check to fix any inadvertent bugs.
The values are sent in the request body, in the format that the content type specifies. Usually the content type is application/x-www-form-urlencoded, so the request body uses the same format as the query string: When you use a file upload in the form, you use the multipart/form-data encoding instead, which has a different format. It’s more complicated, but … Read more
I just found the solution and yea it was easier than I thought 🙂 so here is the solution: it works like charm 🙂