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
will someone help me make this page to edit/update my database?
Old 05-01-2009, 11:33 AM will someone help me make this page to edit/update my database?
Extreme Talker

Posts: 176
Name: Aaric
Trades: 0
a friends band asked if i would work on their website. I was happy to say yes. I want to make this a learning experience. I've used a bunch of CMS' but this site I want to be different. I don't want people to look at it and know it is a CMS.

I just put something up so something would be up
http://ghastlycitysleep.com/

When you go there you see a list of their upcoming shows.

I used a simple online form generator that I sometimes use to create a form where they enter the info for the show and it all goes in to a MYSQL database. The info on the main page is info pulled from the database and sorted by date.

So I have figured out how to add news to the database. Now I need help making a page that edits and deletes things from the database. I can usually figure things out on my own if I have a simple example but haven't been able to get this to work.

Will someone help me?
aaricwon@gmail.com
aaricwon is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-01-2009, 11:09 PM Re: will someone help me make this page to edit/update my database?
nayes84's Avatar
Extreme Talker

Latest Blog Post:
Difference between ASP And JSP
Posts: 232
Name: John
Location: Tokyo
Trades: 0
deletion is simple
you need to add a link to each row in the listing like index.php_action=delete&id=the id of that record

then in index.php file you need to check on that
ex:
PHP Code:
if($_GET["action"]=="delete")
{
     
mysql_query("delete from tablename where id='$_GET[id]'");
     echo 
"deleted successfully";

with modify is the same idea but you need to make a form to show old data in text boxes so user can modify it then you need to make a code to get that data and update the required records
mysql update code would be like that
PHP Code:
mysql_query("update tablename set field1='newdata',field2='newdata2' where id='$_GET[id]'"); 
__________________

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

if(I'm("Helpful")) Add_Talkupation("nayes84");
nayes84 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to will someone help me make this page to edit/update my database?
 

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 1.38970 seconds with 12 queries