1 i written code for mysql query,its working fine,but its adding same data again and again when the use refresh page. means its making duplicate records how toavoid this prob..
2 hi friends...i need yahoo mail table effect. there we can control coloumn width, is it possible? how & wht is the code?
mysql query pro in php
Moderator: General Moderators
-
andychamberlainuk
- Forum Newbie
- Posts: 6
- Joined: Mon Jul 28, 2008 7:15 pm
Re: mysql query pro in php
There are a few ways I can think...
1) Why not run a query before the insert query to check if the data already exist. A common example is with user registration. To ensure that you don't duplicate a username, you must first search the table for that username.
2) You could redirect to a confirmation page after your update
e.g. header("Location:http://mysitename.com/confirm.php");
Hope this helps!
1) Why not run a query before the insert query to check if the data already exist. A common example is with user registration. To ensure that you don't duplicate a username, you must first search the table for that username.
2) You could redirect to a confirmation page after your update
e.g. header("Location:http://mysitename.com/confirm.php");
Hope this helps!