simon551 Posted April 27, 2007 Share Posted April 27, 2007 getting this error: Fatal error: Can't use function return value in write context in C:\Program Files\xampp\htdocs\entries.php on line 96 this is the code, starting at line 95: $tsid_rsDetails_total = "-1"; if (isset($_COOKIE('timesheetid'))) { $tsid_rsDetails_total = (get_magic_quotes_gpc()) ? $_COOKIE('timesheetid') : addslashes($_COOKIE('timesheetid')); } mysql_select_db($database_conn_org, $conn_org); $query_rsDetails_total = sprintf("SELECT timesheet_entries.id_timesheets_main, (Sum(timesheet_entries.hours) + Sum((timesheet_entries.minutes)/60)) AS "rTotal" FROM timesheet_entries WHERE id_timesheets_main = '%s' GROUP BY timesheet_entries.id_timesheets_main ", $tsid_rsDetails_total); $rsDetails_total = mysql_query($query_rsDetails_total, $conn_org) or die(mysql_error()); $row_rsDetails_total = mysql_fetch_assoc($rsDetails_total); $totalRows_rsDetails_total = mysql_num_rows($rsDetails_total); ?> any ideas? Link to comment https://forums.phpfreaks.com/topic/48880-solved-cant-use-function-return-value-in-write-context/ Share on other sites More sharing options...
Psycho Posted April 27, 2007 Share Posted April 27, 2007 $_COOKIE is an array. It uses brackets [] not parensthesis (). Link to comment https://forums.phpfreaks.com/topic/48880-solved-cant-use-function-return-value-in-write-context/#findComment-239591 Share on other sites More sharing options...
simon551 Posted April 27, 2007 Author Share Posted April 27, 2007 gracias Link to comment https://forums.phpfreaks.com/topic/48880-solved-cant-use-function-return-value-in-write-context/#findComment-239765 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.