Two Rows Get Inserted with One INSERT statement?

oesose5kis

New Member
How is it possible that this function below inserts two rows in my database?\[code\]//called likesave_session_db($_SESSION['user_id']);function save_session_db($session){ include('includes/db-connect.php'); $connectionInfo = array( 'Database' => 'Belior'); $conn = sqlsrv_connect( $serverName, $connectionInfo); if($conn){ $date = date('l jS \of F Y'); $_SESSION['model_start_date'] = $date; $tsql = "INSERT INTO User_Session (user_id, date_created) VALUES ('$session', '$date')"; echo 'insert--<br>'.$tsql; if(sqlsrv_query($conn, $tsql)) { return true; }else{ return false; } }else{ return false; } sqlsrv_close($conn);}\[/code\]This function is not called from anywhere else. When I comment the function call above nothing gets inserted into DB. And PHP does not complain about invalid function call, meaning it doesn't get called from anywhere else.When I uncomment the function call two rows get inserted!!Thanks all for any help. I am sure its something simple, I just can't figure it out. It was working before, I can't remember what I tweaked.UpdateIt looks as if every single page that I have gets loaded twice?! Why? I don't have a htaccess file anywhere that does this?\[code\]127.0.0.1 - - [06/Jan/2010:18:34:00 +0000] "GET /webs/end/create.php HTTP/1.1" 200 44830127.0.0.1 - - [06/Jan/2010:18:34:06 +0000] "GET /webs/end/create.php HTTP/1.1" 200 44830\[/code\]
 
Back
Top