mysql query pro in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ganesh
Forum Newbie
Posts: 1
Joined: Mon Jul 28, 2008 7:25 am

mysql query pro in php

Post by ganesh »

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?
andychamberlainuk
Forum Newbie
Posts: 6
Joined: Mon Jul 28, 2008 7:15 pm

Re: mysql query pro in php

Post by andychamberlainuk »

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!
Post Reply