Help, account making system via Php, need to check account existance!

Please support our MS SQL advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2008
Posts: 2
Reputation: armakapo is an unknown quantity at this point 
Solved Threads: 0
armakapo armakapo is offline Offline
Newbie Poster

Help, account making system via Php, need to check account existance!

 
0
  #1
Sep 2nd, 2008
Hello, i'm very new here in these forums.
I'm making a webpage for registration for my online game's server.
My problem is in the registering part, i've got the query to register the new user on the database, but first i need to check if the name of the account in the field isn't used yet. My code to do so is:

  1. $query = mssql_query("SELECT * FROM memb_info WHERE memb___id = ".$_POST['cuenta']."");
  2. // memb_info IS the TABLE, memb___id IS the accountname
  3.  
  4.  
  5. IF ($query) {print "does exist"; }
  6. // just was a test
the problem is, if i type an existing account name, look which is the error:

Warning: mssql_query() [function.mssql-query]: message: The name of the column 'armakapo' is not valid. (severity 16) in C:\xampp\htdocs\caca.php on line 15

I guess it's searching for COLUMNS in the memb_info table, instead of ROWS.
because if i put in the account field "memb___id" (a name of a column), it says "does exist"
so, can you help me to make it search for a row instead of a column name? thanks you very much!
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 2
Reputation: armakapo is an unknown quantity at this point 
Solved Threads: 0
armakapo armakapo is offline Offline
Newbie Poster

Re: Help, account making system via Php, need to check account existance!

 
0
  #2
Sep 3rd, 2008
any help please?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the MS SQL Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC