Jump to content

get_browser and MySQL


sciencebear

Recommended Posts

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

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.