Page 1 of 1

PHP & MySQL / HTML FORM Deleting & Updating

Posted: Tue Mar 07, 2006 9:30 am
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.

Posted: Tue Mar 07, 2006 1:21 pm
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 :)

Posted: Tue Mar 07, 2006 1:29 pm
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)