I may possibly have taken leave of my senses here. I’m trying to help someone out with an unfinished web site (original designer vanished months ago). I don’t know a great deal about PHP or mySQL, though I know a helluva lot more than I did a few days ago.
Anyway, what I’m trying to finish/create is an interface that that can, for example, add news items to a database and a corresponding page that would display them (that part is done and I used it to learn how to add things in other areas), and also be able to edit existing items.
This is where everything’s going all wonky on me. I read some tutorials, and I coded this page that would theoretically list all the news items and allow you to click on a link to either edit or delete an item.
I’ve debugged the 768 typos I created and gotten a vaguely reasonable-looking page, but unfortunately I’ve created a sort of stealth ninja instead of a functional edit page. I’ve done something terribly wrong, and clicking an edit link actually deletes the item’s content field from the database table.
Now, I do not expect you nice folks to debug my code, but I’m having a hard time finding a tutorial specific to this sort of thing and I’m hoping for suggestions as to where I can teach myself how to do it the right way: I need to be able to pull the info out of the database, populate a WYSIWYG editor with it (I haven’t even incorporated that into the prototype edit page yet, just the add page), and then be able to submit the changes, preferably without deleting the info from the table which it’s doing right now.
Web-based tutorials would be most accessible for me but book suggestions are welcome too–I’ve pulled up a list from at my library’s site but I don’t really know what’s good.
(The text of the page I’ve got, in case anyone is feeling adventurous and wants to look at it, is here: http://daisywreath.net/temp/edit.txt )
Any pointers would be much appreciated!