sciencebear Posted September 3, 2009 Share Posted September 3, 2009 I'm trying to build an error system for my experimental website where users can report errors they encounter. I added a column in the MySQL table for the users browser, and was trying to use the get_browser function. My code looks a little like this: $error=$_POST['error']; $time=date("y-m-d : H:i:s", time()); $user=$username; $page=$_POST['page']; $status="Unaddressed"; $browser = get_browser(null, false); $set="INSERT INTO errors (error,time,user,page,status,browser) VALUES ('$error','$time','$user','$page','$status','$browser')"; mysql_query($set) or die(mysql_error()); However, doing this inserts "Object" into the column "browser". How can I insert it into the table in a readable format? Link to comment https://forums.phpfreaks.com/topic/172970-get_browser-and-mysql/ Share on other sites More sharing options...
PFMaBiSmAd Posted September 3, 2009 Share Posted September 3, 2009 It would really be to your advantage to read the documentation for the function you are trying to use - http://us.php.net/get_browser Link to comment https://forums.phpfreaks.com/topic/172970-get_browser-and-mysql/#findComment-911628 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.