Hi Im having some trouble implementing info into a database
I got the line
$mxitid = $_SERVER["HTTP_X_MXIT_USERID_R"];
Which I'm importing to my database via
$sql = "INSERT INTO ".$dbTable." (StringyChat_ip,StringyChat_name,StringyChat_message,StringyChat_time,mxit_id) VALUES (\"$ip\",\"$name\",\"$message\",$post_time,$mxitid)";
$result = mysql_query($sql);
well its working perfectly, but the problem I'm experiencing is that if my value
$_SERVER["HTTP_X_MXIT_USERID_R"]
cannot be retrieved I can't insert any info to my database.
the
$_SERVER["HTTP_X_MXIT_USERID_R"]
is being used via a specific platform called mxit, so if I use any other platform it don't work. Is there maybe a way to change the line
$mxitid = $_SERVER["HTTP_X_MXIT_USERID_R"];
to a function if the info couldn't be retrieved to insert another default value like ADMIN rather in the place of it?