PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
If this isnt supposed to be here im sorry, it has php and database.
I have this code, where it searches to see if the guild = the guild set in the user database. If it does, it checks the rank in the user database for that guild, so if the rank=leader, theyre leader of the guild. Right now i have the character set to recruiter, and it doesnt show up the add member section its supposed to, and im not seeing why. Ive tried not using variables and just putting the raw
Recruit : string(9) "Recruiter"
Rank : string(0) ""
Comparison : bool(false)
Welcome to SLX Cyril!
Rank:
Members
Notice: Use of undefined constant Leader - assumed 'Leader' in /hosted/subs/ulmb.com/c/y/cyril/public_html/guildcp.php on line 191
Edit Guild Info
Notice: Use of undefined constant Admin - assumed 'Admin' in /hosted/subs/ulmb.com/c/y/cyril/public_html/guildcp.php on line 195
Edit Members
Notice: Use of undefined constant Recruiter - assumed 'Recruiter' in /hosted/subs/ulmb.com/c/y/cyril/public_html/guildcp.php on line 199
Add Member
Notice: Undefined index: action in /hosted/subs/ulmb.com/c/y/cyril/public_html/guildcp.php on line 218
Notice: Undefined index: action in /hosted/subs/ulmb.com/c/y/cyril/public_html/guildcp.php on line 237
Notice: Undefined index: action in /hosted/subs/ulmb.com/c/y/cyril/public_html/guildcp.php on line 243
Notice: Undefined index: action in /hosted/subs/ulmb.com/c/y/cyril/public_html/guildcp.php on line 267
Notice: Undefined index: action in /hosted/subs/ulmb.com/c/y/cyril/public_html/guildcp.php on line 271
Notice: Undefined index: action in /hosted/subs/ulmb.com/c/y/cyril/public_html/guildcp.php on line 290
Notice: Undefined index: action in /hosted/subs/ulmb.com/c/y/cyril/public_html/guildcp.php on line 297
Notice: Undefined index: action in /hosted/subs/ulmb.com/c/y/cyril/public_html/guildcp.php on line 302
Notice: Undefined index: action in /hosted/subs/ulmb.com/c/y/cyril/public_html/guildcp.php on line 306
Notice: Undefined index: action in /hosted/subs/ulmb.com/c/y/cyril/public_html/guildcp.php on line 310
Notice: Undefined index: action in /hosted/subs/ulmb.com/c/y/cyril/public_html/guildcp.php on line 338
You must use single quotes to encapsulate array indices (e.g. $_POST['asdf'] and not $_POST[asdf]). Those "undefined constant" notices will magically disappear.
The "undefined index" notices indicate that you are referencing an array key that hasn't been set, presumably in your $row array. Have you checked that your query isn't returning and empty result set (mysql_num_rows())?