Pantho Posted September 17, 2009 Share Posted September 17, 2009 Been working on my website all day, finally got everything working apart from for some reason I can't use the main smf1_members memberName field the 3rd party application. So, would anyone care to quickly throw out there something along the lines off... Basically I want to search table: cashuser1 in colunm: uid for value $user_info['username'] If it does not exist, create $user_info['username'] Any chance of some quick help ? global $user_info; $cuser = $user_info['username']; if ($ccatch== ""){ mysql_query("INSERT INTO cashuser1 (uid) VALUES (".$cuser."' LIMIT 1" ); } -edit Thank you Link to comment https://forums.phpfreaks.com/topic/174531-request-small-code-snippet/ Share on other sites More sharing options...
Pantho Posted September 17, 2009 Author Share Posted September 17, 2009 Been working on my website all day, finally got everything working apart from for some reason I can't use the main smf1_members memberName field the 3rd party application. So, would anyone care to quickly throw out there something along the lines off... Basically I want to search table: cashuser1 in colunm: uid for value $user_info['username'] If it does not exist, create $user_info['username'] Any chance of some quick help ? global $user_info; $cuser = $user_info['username']; if ($cuser== ""){ mysql_query("INSERT INTO cashuser1 (uid) VALUES (".$cuser."' LIMIT 1" ); } -edit Thank you -edit Grrr this quote was supposed to be a modify, sorry ... Link to comment https://forums.phpfreaks.com/topic/174531-request-small-code-snippet/#findComment-919864 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.