Dynadot Black Friday and Cyber Monday 2026: save more on domains. See our sales.

Need Urgent MySQL Help

SpaceshipSpaceship
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Watch

Domains4u

Account Closed
Impact
3
Hi all. Im in some real trouble here.


LINK: http://www.ukgmc.com/radio/add.php


Ive created a database that stores Radio URLs, and displays them in a .php file........all fine and good.

I then placed a form at the top of the page for users to enter there own submissions........all fine a good.

When a user submits a url its adds to the database and Displays 'ADDED TO DATABASE', but if the user then presses refresh it will add it again. I somehow need to stop duplicate entries into the database, becuase this could become a vunrability for hackers or annoying script kiddies who want to flood the databse.

Whats the best way to stop this?

Regards.
 
Last edited:
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Last edited:
0
Close
Alternatively you could do a select query in the script to check if it already exists, if it does then it will not be added. This of course will also stop someone maliciously adding the same url constantly.

A possible other alternative is to make the field in the database that holds the URL inique.
 
0
Close
Fixed now. Thanks to SecondVersion :)
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

New: watch any domain
You can now watch domains on NamePros. We check each one and notify you when something changes. Search for a domain and press Watch on...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back