Mysql Insert Submit Button Php
I am generating a list of images and looking to insert a specific image based on wether or not a submit button has been pressed alongside my image. Here is my code to generate a li
Solution 1:
also, <form> should be <form method='post'>
instead of onclick = post() change it to name='post'
and instead of function post(){ make it if($_POST['post']){
Solution 2:
echo '<inputtype="submit"onClick=post()>';
onClick=post() - This is a javascript event used only for javascript but the post() function you have written in php code so it cannot insert into your tatabase table.
Post a Comment for "Mysql Insert Submit Button Php"