homepage Welcome to WebmasterWorld Guest from 50.17.162.174
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
php-mysql user creation problem
abhishekkaushik




msg:3964014
 3:01 am on Aug 2, 2009 (gmt 0)

hi,

my case is i am trying to create one member database whose column username must be unique (I have made the required changes in table attribute so that it does not allow the duplicate entries to be inserted in)
Now my problem is when user fails to create an account with existing username how can I inform him that same username exists and he needs to choose different username. I mean mysql_query() function return anything using which we can figure out what same username exists in database apart from insert is failed.

Thanks

 

eelixduppy




msg:3964054
 6:14 am on Aug 2, 2009 (gmt 0)

mysql_query will return false if the insert did not work, however, if you want to let the user know before the query they you are going to have to make a separate query to check for availability.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved