PHP & MySQL / HTML FORM Deleting & Updating

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
User avatar
tmaiden
Forum Commoner
Posts: 64
Joined: Fri Feb 24, 2006 3:15 pm
Location: Philadelphia
Contact:

PHP & MySQL / HTML FORM Deleting & Updating

Post by tmaiden »

I am looking to display rows from a table. With the display of the rows, I want two columns; one column to Reset the items counter (Update) and another column to Remove the item from being counted (Delete).

Could someone direct me to a tutorial for this. My main concern is when an Update or Delete takes place, I want to display a message to the user stating if the action was successful at the top of the page, and bellow the message I want to redisplay the same table showing the new data.

Thanks.
khuti
Forum Newbie
Posts: 13
Joined: Mon Mar 06, 2006 12:29 am

Post by khuti »

there is alot of tutorials around on the internet, which im sure can help you out, i would suggest just getting to grips with the different areas first. learn like how to use the delete, update and insert sql statements.

once you feel you understand its just a matter of linking it all together. and obviously make sure you understand how forms work. which if you dont then i suggest going back a step and learning to fully understand html before trying php, let alone using mysql aswell.

i think that should put you in the right path :)
User avatar
a94060
Forum Regular
Posts: 543
Joined: Fri Feb 10, 2006 4:53 pm

Post by a94060 »

to display the table,with somethnig like this (i think)

Code: Select all

//db stuff here.
//select the correct table and data
//also you echo the names of the colums

//also put the table starting stuff ehre
while($row=mysql_fetch_array(/*name of your result var*/) {
//you then put here a the <td> around the name of the values of each.
}
This would be most of the bsic syntax for the table. Other people will probably fix it so you can use it(i whipped this in school)
Post Reply