Send Dynamic form Values to PHP
Hi, I have created a web application that enables to Delete Items in a product table using check boxes.
I Need to Display each and every product in <TR> and with the product there is a corresponding check box to delete it, use can select the check box and then he will press the Update Button in the Form to submit for processing.
Code: ( php )
Quote:
Quote:Thanks I made it but now there is a small bug.
to submit the Form I am using a image and onclick of the image i will call for the JS function . then JS will Submit the form.
Code: ( html4strict )
Quote:And One more thing
Try handling the errors so that the warning does not appear when user do not select any of the checkboxes
TRY
if(sizeof($frm_chk_delete)==0) {
echo "atleast one of the check boxes";
header('location: previospage.php');
}
else
{
implode(bla bla bla);
}
errors should be handle because implode will produce warnind not an error
so the script wont stop
and the SQL statement will be executed
and produce a database error
u dont wanna tell anyone bout ue database schema
if u wanna study how to handle SQL statement in PHP
read this
Quote:
Quote:still U have an error In ur HTML script
Code: ( php )
Quote:
Quote:and i put spaces between the double and single quotes so that it will be distinguishable here On the site for diplay, not that its used that wayi personally use double quotes for echoing HTML statement con then i dont need to exit and re-enter the quotes like value=" ' .$id. ' "
if u use double quotes the u can directly use
echo "<input type=\"checkbox\" name=\"whatever\" value=\"$id\">"
and so onThanks for that bro. I combined your Error trapping system to my Script.Now the Script is Ready to Fly.
Code: ( php )Any time Brother
not a problemHi I have to Open this thread again.
see here in my dynamic form again i have to put a <textarea> to pass the Inquiries to database.Along with a Hidden value field(ID).
The ID will always send to php page since it is hidden and always there is value.
But if user doesn't type a Value to textarea(S) array of comma will pass.
I need find out a way to give a default value to text area if user does not type a Value.
Again I need to update the MySQL table with new Inquiries values. Thats why i am getting this ID to the hidden fields.
Code: ( php )
Quote:
Quote:WELL RIGHT
THE VALUE ATTRIBUTE IS APPLICABLE IN <input type="text">
NOT IN TEXT AREA
搜索更多相关主题的帖子:
form Dynamic Send Values PHP