Jump to content

biircoop

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

biircoop's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Please help! I am getting this error: Warning: mssql_query() [function.mssql-query]: message: Line 2: Incorrect syntax near '<'. (severity 15) in E:\Inetpub\wwwroot\securty_tracking\admin_task_daily.php on line 39. The value of $dow should be the day of the week: Sunday, Monday, etc. 'hours_spent' is input from a text box. Let me know if you need anything else. Here is the php code that I am trying to use. Line 39 is the execution of $sql_update. This causes a fail of the query. $sql_insert="INSERT INTO TICKETS_DAILY VALUES(".$ticket_id.",'".trim(strtoupper($_SESSION['username'])). "', ".$req_id.",0,0,0,0,0,0,0)"; mssql_query($sql_insert); $sql_update="UPDATE TICKETS_DAILY SET ".$_REQUEST['dow']."=".$_REQUEST['hours_spent']. " WHERE ticket_id=".$ticket_id. " AND accepted_by='".trim(strtoupper($_SESSION['username']))."' AND req_id=".$req_id; mssql_query($sql_update);
  2. I am having trouble parsing coding errors in my .php file. When I click on the first button, I want it to call two functions with the arguments specified. The first function is daily_hours() and the second is process_task() The current error that I am getting now is T_CONSTANT_ENCAPSED_STRING, but I have been messing around with it and changing it and have gotten many different errors. I think it might have something to do with how I am using quotes around my variables, but I can't figure it out. <input type=\"Button\" value=\"\" style=\"background-image:url(img/complete_task_btn.gif); border:0px; width:150px; height:30px; cursor:pointer;\" onclick=\"daily_hours(".$_REQUEST["ticket_id"].",".$_REQUEST["req_id"].","'".$dow."'","'".$status_id."'" ,"'".$last_log_hours_date."'","'".$weekday."'"); process_task(".$_REQUEST['ticket_id'].",".$_REQUEST['req_id'].",'".$_REQUEST['req_name']."','complete','".$_SESSION['username']."','".$_REQUEST['added_user']."')\"> Here is an example of the next button handler, which works fine on the function call, but doesn't have any variables other than the REQUESTS. <input type=\"Button\" value=\"\" style=\"background-image:url(img/cancel_task_btn.gif); border:0px; width:140px; height:30px; cursor:pointer;\" onclick=\"process_task(".$_REQUEST["ticket_id"].",".$_REQUEST["req_id"].",'".$_REQUEST["req_name"]."','cancel','".$_SESSION['username']."','".$_REQUEST['added_user']."')\">
×
×
  • 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.