![]() |
|
#1
|
|||
|
|||
Automate a data change php formHi, thanks in advance for reading this! I inherited the responsiblity for maintaining my non-profit's MySql flat file with multiple tables, administered by me directly with Putty (it's hosted elsewhere), and all the users access the data via php on our website. Here's my conundrum: for situations when data on a table needed to be changed, the previous administrator created a "delete" php form, and then the user had to re-enter the entire data. Let's say it was to our "news" section. The fields are author, date, subject and article. There is another field, "id", an auto-incrementing integer that is the primary key, but it is hidden. If someone screws up a name in the "article" field and doesn't notice it until after it's posted, they have to delete the record and re-enter it all again. I'd like to figure out a way to display the news articles, maybe just by "id" and "subject", let the user choose which one to change, bring up all the data for that record, let them change anything they want to, and then click a button to update the record. I'm just figuring out MySQL & php scripts right now, and I know for sure how to display the data all at once for everything. But is what I'm asking for even possible?
I'm not looking for a free ride, altho if someone has the inclination to just show me the code I need I wouldn't argue Thanks so much! By the way, you can view some of the user-end php scripts at www.flightsimnetwork.com - click on the "Captain's Lounge NOTAMS" for a look at the news section. |
|
#2
|
||||
|
||||
|
I suck at coding php and have little clue about mysql... But, can you just use phpmyadmin or a program similar to that to admin the databases?
__________________
Mr. Bob's Web Design - Tirelessly looking for ways to enhance the customer base of your business. |
|
#3
|
|||
|
|||
|
BobbyDouglas, thanks for the response. Looking at the admin program, I don't think it fits my needs. I want regular users who post to be able to correct it as needed, and I don't want them to have the rights that the admin program would give them.
Thanks anyway! Mike |
|
#4
|
||||
|
||||
|
Hello mjfmn,
What you're asking for is quite simple to do actually (but if you're just starting out with PHP and MySQL almost everything can seem daunting at first). Nevermind, we're here to help when we can... If I understand your question; you're looking for some examples on how to easily edit a certain table in a MySQL database? Here's a quick example... a fictitious web page filenamed - news-edit.php; reply if you have any specific questions figuring out the sample code: PHP Code:
Or... you could just pay someone to set this up for you... __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#5
|
|||
|
|||
|
Jds, thanks! Hey, if we weren't non-profit I'd definitely consider paying someone! I have to admit, I enjoy learning php and mysql - it's not exactly HARD, just a new language. I'm great with basic "show the data" forms or "enter the data" forms (how hard is that, right?), but as I get deeper into this it gets more complicated. And since my full-time job doesn't allow me the time to actually sit and learn the stuff, I have to do it on my off time.
What you gave me is great - a starting point to working on my own code. Thanks a lot! Mike |
Recent GIDBlog
First week of IA training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| All the big PHP script collections that matter | jrobbio | MySQL / PHP Forum | 5 | 06-Jun-2003 16:14 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The