Boxerman Posted October 26, 2011 Share Posted October 26, 2011 Hi guys, I'm trying to get a IF put into place, where it checks a database entry for the Username and if its there echo the ID of it... i.e If Boxerman has entered a news story in ID 4 echo 4 onto the page... Database is news, so it has title, text, postedby, timestamp etc.. I want it to check the postedby field for the username.. Can this be done? if so how? Quote Link to comment https://forums.phpfreaks.com/topic/249834-php-if/ Share on other sites More sharing options...
ZulfadlyAshBurn Posted October 26, 2011 Share Posted October 26, 2011 using php and mysql. look into mysql where function. www.tizag.com/mysqlTutorial/mysqlwhere.php Quote Link to comment https://forums.phpfreaks.com/topic/249834-php-if/#findComment-1282365 Share on other sites More sharing options...
Boxerman Posted October 26, 2011 Author Share Posted October 26, 2011 Thanks buddy! learnt that now! Quote Link to comment https://forums.phpfreaks.com/topic/249834-php-if/#findComment-1282374 Share on other sites More sharing options...
ZulfadlyAshBurn Posted October 26, 2011 Share Posted October 26, 2011 No prob Quote Link to comment https://forums.phpfreaks.com/topic/249834-php-if/#findComment-1282378 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.