Editing Entries

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
daebat
Forum Commoner
Posts: 47
Joined: Mon May 11, 2009 10:16 am

Editing Entries

Post by daebat »

I have a custom built cms that allows for an admin to submit advertising materials through an upload form (EXAMPLE: title, description, thumbnail, full res jpg, png, tiff). Each submission is assigned an ID number and then displayed descending by ID. I would like to create the functionality of letting an admin come in and edit entries as well (they can already delete). My problem is that I'm not sure what the best way to do this... right now I'm working on just using the original upload form and then setting the default values to the values in the database. My problem is that ALL of the entries get listed and I'm not sure if that is the best way to submit edits. What I'd like to do is set up a page they can go to that lists the entries by title only and then you can click through to edit the specific entry... my problem is that I don't know how to carry over the dynamic data... example:

mysql_query("SELECT * FROM affiliatelogos WHERE brand = 'abc' ORDER BY id DESC ") or die(mysql_error());

Title 1
Title 2
Title 3

->click through title 1

Title: title 1
Brand: ABC
JPG: image/path.jpg
(submit)

I'm sure it is a matter of adding a little dynamic code to the link just not sure what it is.

----------------------------------------------


SOLVED THIS PROBLEM: I ended up just passing on the id then using the get function to grab it and select only that specific id for editing and then processed it as an update to the table. works fine.
Post Reply