Jump to content

If not exists


madcrazy1

Recommended Posts

Hi,

I am trying to control how many times a user can insert the same info

I can control output using select distinct but if the user accidentally or intentionally repeatedly kept inserting the same info, that user would have to click the delete button that many times to get rid of it, istead of just once.

this is the bit of code i tried adding if not exists to without any luck.

 

## ADD NEW ENTRY INTO THE DATABASE
$query_add="INSERT INTO `files3` (`logid` , `name` , `bigimage` ) 
VALUES ('".$_SESSION['logid']."', '$l1', '$l2')";
$result=mysql_query($query_add);
$_REQUEST['page'] = "links";
$ErrorMessage = "link updated successfully";
}break;

 

Please help Thank you.

Link to comment
https://forums.phpfreaks.com/topic/67729-if-not-exists/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.