restrict your query with the name of your entries and show name is already existed in database like:
$qry1="SELECT * FROM `yourtable` WHERE name='".$_POST['name']."'";
$res1=mysql_query($qry1) or die(mysql_error());
echo "the name is already in use";
write your insert query...
I think there is alternative solution, instead of writing data in the database that may be useful only for verification purposes.
you can make a verification in this way
$test_query = mysql_query(select 'some data to verify here' from 'yourtable here');
$test_data = mysql_fetch_row($test_query);
if ('your_value_to_be_inserted' === '$test_data')
die 'You are trying to enter these values twice'
//run your insert query here and add at the end the following
$last_rec_id = mysql_insert_id($insert_connection);
In this way you will make sure that last data entered from your particular session does not duplicate
1) Allow registered users to:
1. make bookings for sports facilities like swiming, spa etc.
I took three tables
-username (primary key)
2. Sports_name: To add facility by admin side
-sportid (primary key with auto increment)
3. Sports_facility:Selecting sport facility from user side
-username (The username from table USERS which is registered.)
Q. Now how i am gona make relation while adding, modifying, displaying n deleting the facilities which registered user has booked for himself..?
Hello i have a script that lets the user to take a photo and then upload it -this was the thread i created https://www.daniweb.com/programming/web-development/threads/508651/how-to-open-camera-and-take-a-photo-scriptBut the photo returns in low res ...