This is my code in update.php
file :
<?php
if(isset($_REQUEST['arr']))
{
if(isset($_REQUEST['var1']))
{
if(isset($_REQUEST['var2']))
{
if(isset($_REQUEST['var3']))
{
if(isset($_REQUEST['var4']))
{
if(isset($_REQUEST['var5']))
{
//echo $pid=$_REQUEST['var5'];exit;
$all_data=array();
$all_data=array_chunk($_REQUEST['arr'], 19);
foreach($all_data as $values)
{
//echo "inside loop";
$month=$_REQUEST['var1'];
$week=$_REQUEST['var2'];
$gtot_stu=$_REQUEST['var3'];
$gtot_otu=$_REQUEST['var4'];
$pid=$_REQUEST['var5']
//$sql_upd="update timesheet_entry set s_st=$values[0],s_ot=$values[1],m_st=$values[2],m_ot=$values[3],t_st=$values[4],t_ot=$values[5],w_st=$values[6],w_ot=$values[7],th_st=$values[8],th_ot=$values[9],f_st=$values[10],f_ot=$values[11],sa_st=$values[12],sa_ot=$values[13],job_code=$values[14],job_name='$values[15]',st_tot=$values[16],ot_tot=$values[17],pm='$values[18]',gtot_st=$gtot_stu,gtot_ot=$gtot_otu where id='143'";
// $sql_upd="update timesheet_entry set s_st=$values[0] where ='$pid'";
$sql_upd="update timesheet_entry set s_st=$values[0] where id='143'";
if(mysql_query($sql_upd))
{
echo "Updated..!";
}
else
{
echo "Updation failed";
}
} //foreach
} // var 5
}//var4
}//var3
} //var2
}//var1
} //if (arr)
?>
I am getting every variable here. I only need to update those values. But when I am trying to update I got an error like these. I do not understand what is going on... please, help me
<br />
<font size='1'><table class='xdebug-error xe-parse-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\sceptre_internal\update.php on line <i>63</i></th></tr>
</table></font>