updateing database with some javascript

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nite4000
Forum Contributor
Posts: 209
Joined: Sun Apr 12, 2009 11:31 am

updateing database with some javascript

Post by nite4000 »

Hey I posted on my last post but guess no one saw it but here is what I have.

On my last post i messed up with what I thought i had to do so here is what has to be done


i have 16 boxes 4 on each table row and a chk box next to each first box when the box is checked the 4 boxes are enabled allowed to be typed in. when unchked its not typeable.

Now i have a submit button when I chk one I want to insert a record into my table and when unchked I want to remove the record completely.
I also need to be able to alter text in boxes then update the table long as they are still enabled.

I hope someone can help. I have the JS code for the enabled and disable of the boxes.


Thanks
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: updateing database with some javascript

Post by yacahuma »

Take one step at a time. Do a print_r($_POST). See what is you are dealing with. if you wish, post your print_r output to see what you have. Some where you are going to have a function like

Code: Select all

function update($_POST)
{
   if (checked())
       insert into db
   else 
       delete from db
}
Post Reply