Parse error: syntax error, unexpected ',' in /home/sonyks/public_html/konfidenceonline.com/administrator/components/com_studentmarks/admin.studentmarks.php on line 42
Thats the error that i get when i replace my redirect statement in the following code with die..please help figure out what's wrong
<?php
defined ( '_JEXEC') or die( 'Restricted access' );
require_once(JApplicationHelper::getPath( 'admin_html'));
JTable::addIncludePath(JPATH_COMPONENT.DS.'tables');
switch($task)
{
case 'add':
editstudentmarks($option);
break;
case 'save':
savestudentmarks($option);
break;
}
function editstudentmarks($option)
{
$row =&JTable::getInstance('studentmarks','Table');
$lists =array();
HTML_studentmarks::editstudentmarks($row,$lists,$option);
}
function savestudentmarks($option)
{
global $mainframe;
$row=& JTable::getInstance('studentmarks','Table');
if(!$row->bind(JRequest::get('post')))
{
echo "<script>alert('".$row->getError()."');
window.history.go(-1);</script>\n";
exit();
}
$row->quicktake=JRequest::getVar('quicktake','','post','string',JREQUEST_ALLOWRAW);
$row->studentmarks=JRequest::getVar('studentmarks','','post','string',JREQUEST_ALLOWRAW);
if(!$row->Date_TimeUpdated)
$row->Date_TimeUpdated=date('Y-m-d H:i:s');
if(!$row->store())
{
echo "<script>alert ('".$row->getError()."');
window.history.go(-1);</script>\n";
exit();
}
$app = &JFactory::getApplication();
die('index.php?option'.$option,'Marks Saved');
}
?>