NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Help me with MySQL

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 02-11-2006, 10:22 AM THREAD STARTER               #1 (permalink)
Account Suspended
 
Domains4u's Avatar
Join Date: Nov 2005
Location: www.TFFH.net
Posts: 280
Domains4u has a spectacular aura aboutDomains4u has a spectacular aura about
 



Help me with MySQL


Hi all

I own www.UKGMC.com which is a radio directory, but its also a working project, im going to be working with it for a good year or so until i develop a unique type of script that can be used like PHPBB (open source).

To jump to the point, ive write some working code in MySQL which is what you see when you click on the site above. With the help of a nampros member ive added a anti-duplication script to it, that stops users from refreshing the page and adding more submitions (basiclly flooding the page with crap), but that dosnt stop them adding junk manually.
????: NamePros.com http://www.namepros.com/programming/166555-help-me-with-mysql.html

So what i want to do now is add an admin page that will look EXACTLY the same except next to every entry there will be a Delete link, that deletes the entry, im maybe thinkking some check boxes to delete multiple entrys. But this will only be available in the admin/index.php part of the site, which ill have password protected.

Has anyone got any tutorials on the internet or any recourses that might help me to add a delete link to my code so that i can delete entrys without having to manually enter code?

Thanks for looking and i hope you can help.


D4U
Domains4u is offline  
Old 02-11-2006, 10:24 AM   #2 (permalink)
Professional Monkey
 
Amnezia's Avatar
Join Date: Jul 2005
Location: Escaped from the zoo
Posts: 907
Amnezia has a spectacular aura aboutAmnezia has a spectacular aura about
 


Cancer Survivorship Save a Life
mysql is not a programming language you need php to do something like that.
__________________
Webmaster Words
Amnezia is offline  
Old 02-11-2006, 10:35 AM   #3 (permalink)
Senior Member
 
Eric's Avatar
Join Date: Mar 2005
Posts: 4,948
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
Well, on your admin index page just have a loop grab all the urls, like:

PHP Code:

$query 
mysql_query("SELECT * FROM urls") or die("Error: ".mysql_error());

while(
$row mysql_fetch_array($query))
{
  echo 
$row['url'].' <a href="?delete=yes&id='.$row['id'].'">Delete</a><br>';
????: NamePros.com http://www.namepros.com/showthread.php?t=166555
}

if(
$_GET['delete'] == "yes")
{
  
$id intval($_GET['id']);
  
$query mysql_query("DELETE FROM urls WHERE id = $id LIMIT 1") or die("Error, couldn't delete");

Err, something close to that
Eric is offline  
Old 02-11-2006, 10:38 AM THREAD STARTER               #4 (permalink)
Account Suspended
 
Domains4u's Avatar
Join Date: Nov 2005
Location: www.TFFH.net
Posts: 280
Domains4u has a spectacular aura aboutDomains4u has a spectacular aura about
 



Originally Posted by Amnezia
mysql is not a programming language you need php to do something like that.
I am using PHP


Quote:
Well, on your admin index page just have a loop grab all the urls, like:
Thats sort of what i was looking for, ill look into it now ive got a base to work off. Couldnt find how to do it in my PHP books.
????: NamePros.com http://www.namepros.com/showthread.php?t=166555

Thanks SV.....saved the day........................again!
Domains4u is offline  
Old 02-11-2006, 11:12 AM   #5 (permalink)
NamePros Regular
Join Date: Jun 2003
Location: Louisiana, USA
Posts: 658
painperdu has a spectacular aura aboutpainperdu has a spectacular aura about
 



Have you considered validating and checking for duplicates before they're entered into the db?
painperdu is offline  
Old 02-11-2006, 02:07 PM THREAD STARTER               #6 (permalink)
Account Suspended
 
Domains4u's Avatar
Join Date: Nov 2005
Location: www.TFFH.net
Posts: 280
Domains4u has a spectacular aura aboutDomains4u has a spectacular aura about
 



Pain yer, ive already got that sorted

Im just trying to create an admin page to delete unwanted posts.
Domains4u is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: Install the Apache Web Server, Perl, PHP, and MySQL on Windows deadserious Webmaster Tutorials 96 05-27-2007 02:24 PM
Great Scripts for Sale With Resale Rights! Zeeble Scripts For Sale 20 01-04-2006 02:39 AM
Tutorial: How to Install Apache2 MySQL and PHP on Windows deadserious Webmaster Tutorials 35 09-21-2005 10:46 PM
Tutorial: Getting Started With MySQL (The Basics) deadserious Webmaster Tutorials 3 04-18-2004 02:17 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 08:37 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger