Jump to content

Request small code snippet


Pantho

Recommended Posts

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

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 ...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.