Yeah its a mess. I hate escaping quotes as it tends to mess up the code.
I have 3 suggestions to go around that:
Solution 1 - use the php tags to echo vars:
<input type="Button" value="" style="background-image:url(img/complete_task_btn.gif); border:0px; width:150px; height:30px; cursorointer;"
onclick="daily_hours(<?php echo $_REQUEST["ticket_id"] ?>,<?php echo $_REQUEST["req_id"] ?>,'<?php echo $dow ?>','<?php echo $status_id ?>' ,'<?php echo $last_log_hours_date ?>','<?php echo $weekday ?>');
process_task(<?php echo $_REQUEST['ticket_id'] ?>,<?php echo $_REQUEST['req_id'] ?>,'<?php echo $_REQUEST['req_name'] ?>','complete','<?php echo $_SESSION['username'] ?>','<?php echo $_REQUEST['added_user'] ?>')">
Nah.. Still messy. Long variablenames dont look nice in there
Solution2 - Assign long variables shorter name and use short open tags
<?php
$req_id = $_REQUEST['req_id'];
$added_user = $_REQUEST['added_user'];
$ticket_id = $_REQUEST["ticket_id"];
$req_name = $_REQUEST['req_name'];
$username = $_SESSION['username'];
?>
<input type="Button" value="" style="background-image:url(img/complete_task_btn.gif); border:0px; width:150px; height:30px; cursorointer;"
onclick="daily_hours(<?=$ticket_id ?>,<?=$req_id ?>,'<?=$dow ?>','<?=$status_id ?>' ,'<?=$last_log_hours_date ?>','<?=$weekday ?>');
process_task(<?=$ticket_id ?>,<?=$req_id ?>,'<?=$req_name ?>','complete','<?=$username ?>','<?=$added_user ?>')">
Now thats much better. One tiny problem though as this requires the short open tags set to "on" on the server. Its not wrong to use them as they pose no threat what so ever but you just have to remember this if you change your app to somewhere else.
Solution 3 - Heredoc syntax
<?php
$req_id = $_REQUEST['req_id'];
$added_user = $_REQUEST['added_user'];
$ticket_id = $_REQUEST["ticket_id"];
$req_name = $_REQUEST['req_name'];
$username = $_SESSION['username'];
$var = <<<EOF
<input type="Button" value="" style="background-image:url(img/complete_task_btn.gif); border:0px; width:150px; height:30px; cursorointer;"
onclick="daily_hours($ticket_id,$req_id,'$dow','$status_id' ,'$last_log_hours_date','$weekday');
process_task($ticket_id,$req_id,'$req_name','complete','$username ','$added_user')">
EOF;
echo $var;
This is the cleanest one imho. I myself dont actually use heredoc much but here is one situation where it would seem suitable.