Hello Friends,I need your help.I need to insert details to Database if cookie is set.Below is the code: <?php if (@$cookie) { ?> Welcome User (I need to store the user to DB) <?php } else { ?> Welcome Guest <?php } ?> I need valid query to run this.I had try with common methods but it's not executing.Please help.... Thanks in Advance!
What clauseamsel was trying to say is... you obviously have no idea what you are doing so you should read a TUTORIAL on PHP and learn the language before diving in and attempting to make a script. If you were going on a 150 mile road trip would you first do your research and look at a map or would you just hop in your car and cross your fingers? Same with PHP... Before you head off to write a script...do your research so you know where you are going. And btw...noone can show you an SQL query because noone knows what you are doing or anything about this database that you probably don't have.
Also, read more into how PHP handles cookies: http://php.about.com/od/advancedphp/qt/php_cookie.htm, and how PHP communicates to MySQL in order to save data into the database: http://www.w3schools.com/php/php_mysql_insert.asp
yes davidason is right check that link out learn some more about php language then try to do something in php