Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Need help creating PHP that will edit and delete from mySQL please
Old 12-28-2009, 11:03 AM Need help creating PHP that will edit and delete from mySQL please
Extreme Talker

Posts: 176
Name: Aaric
Trades: 0
I started teaching myself PHP/mySQL a while back but then because of work and other obligations I had to take time off. I managed to create a form where martial artists register to compete in an event. The data collected by the form is then emailed to me and also stored in a mySQL database. I then made a page that displays the info from the database. The 1st page displays basic information on each martial artist (Full Name, Weight, Birthdate, Fight Record) then if you want to see all of the information that person filled out, you can click their name and it will open a page displaying everything that person filled out pulling that info from the database.

Here is the main page:


Here is what you see after clicking a name:


I want to create an admin page so I can edit the database and delete fighters if I need to...

Can anyone help or can you suggest any sites that may be able to help me?
aaricwon is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-28-2009, 07:28 PM Re: Need help creating PHP that will edit and delete from mySQL please
Defies a Status

Posts: 1,606
Trades: 0
I will throw this out and wait for yor questions:
To edit you need to pull the DB contents into a text box where you can edit it and write the result back to the DB.

Delete is a simple delete from where something (usually ID) = query.
Load a list of the fighters and have a script or routine to delete by id, name or whatever.

EDIT: Here is a sample delete routine where the category was selected from a drop down list:
Quote:
$category=$_POST[category];
//echo $category; // debug only for the echo
$cmscategory="DELETE FROM cms_category WHERE category='$category'";
mysql_query($cmscategory);
__________________
Colbyt

Please login or register to view this content. Registration is FREE

Last edited by colbyt; 12-28-2009 at 07:33 PM..
colbyt is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Need help creating PHP that will edit and delete from mySQL please
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.48291 seconds with 12 queries