Newbie Spellweaver
- Joined
- Jul 11, 2012
- Messages
- 15
- Reaction score
- 0
Hi.
I have a question, so, i have tbl_guild and i'm adding a guild to it with php help, so when adding a guild i input characters name in input field and when proceeding i need script to check if user exists in tbl_users and NOT exist already in tbl_guild and if so proceed further with my script.
I'm new to php so i would appreciate some help here how to solve this problem.
I had a few ideas how to do so:
//Checking name in users is exists
$checkusername = mssql_query("SELECT name FROM tbl_users where name='$_POST[name]'");
$ccheckusername2 = mssql_fetch_array(checkusername)
//Checking name in _tblguild
$checkgname = mssql_query("SELECT name FROM tbl_guild where name='$_POST[name]'");
$checkgname2 = mssql_fetch_array($checkgname)
So how to put this in if statement together , if possible.
if ($checkgname2== ).....
And after that my mind blows
Thanks!
I have a question, so, i have tbl_guild and i'm adding a guild to it with php help, so when adding a guild i input characters name in input field and when proceeding i need script to check if user exists in tbl_users and NOT exist already in tbl_guild and if so proceed further with my script.
I'm new to php so i would appreciate some help here how to solve this problem.
I had a few ideas how to do so:
//Checking name in users is exists
$checkusername = mssql_query("SELECT name FROM tbl_users where name='$_POST[name]'");
$ccheckusername2 = mssql_fetch_array(checkusername)
//Checking name in _tblguild
$checkgname = mssql_query("SELECT name FROM tbl_guild where name='$_POST[name]'");
$checkgname2 = mssql_fetch_array($checkgname)
So how to put this in if statement together , if possible.
if ($checkgname2== ).....
And after that my mind blows
Thanks!