TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 08-04-2009, 03:57 PM   #1 (permalink)
The Contributor
 
russellharrower's Avatar
 
Join Date: Jul 2009
Posts: 80
Thanks: 13
russellharrower is on a distinguished road
Default if data is already in database

Hi I am trying to work out the following information
Lets say I have the word apple in my database and someone wants to place another apple in the db, I don't what them to be able to.

I don't want to have to use the unique key to do this, however I have already.

What I want to do is in the PHP if the word is in the database it ends the php code, and does not go on.

I was thinking something like this.

Code:
if ($row[name] =="apple'') {
END
}
else
{
continue 
};
russellharrower is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Injection and mysql_real_escape_string Durux General 61 01-29-2013 12:20 PM
[Tutorial] How to organize your classes | Part 1 Tanax Advanced PHP Programming 10 03-01-2009 10:08 PM
Retrving data from database to form knvuppula General 2 09-10-2008 04:33 AM
Cleaning data before entering database question Killswitch General 7 12-24-2007 11:29 PM
Tips: PHP security Village Idiot Tips & Tricks 22 11-23-2007 11:17 PM


All times are GMT. The time now is 04:33 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design