jojos Posted January 9, 2010 Share Posted January 9, 2010 I do not know what is wrong with this. Hope some one can help. I do nto want to post the entire site because it is to long. However, here is the few lines: $TPL_closed_auctions_list .= "</table>"; $TPL_closed_auctions_list .= " <a href='viewallclosedauctions.php'>" . $MSG_31_0046 . "</a>"; #// Get parameters from the URL $params = getUrlParams("="); if(empty($_GET['id'])) $_GET['id'] = $params['id']; else $params['id'] = $_GET['id']; $id = $params['id']; $_SESSION["REDIRECT_AFTER_LOGIN"] = "http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]; foreach($membertypes as $idm => $memtypearr) { $memtypesarr[$memtypearr['feedbacks']] = $memtypearr; } ksort($memtypesarr, SORT_NUMERIC); $BIDFILE = $SETTINGS['siteurl'] . "bid_classic.php"; if(!isset($_POST['id']) && !isset($_GET['id']) && isset($_SESSION["CURRENT_ITEM"])) { $id = $_SESSION["CURRENT_ITEM"]; }elseif(isset($_REQUEST['id']) && is_numeric($_REQUEST['id'])) { $_SESSION["CURRENT_ITEM"] = $_REQUEST['id']; }else { // error message $_SESSION["CURRENT_ITEM"] = ""; include "header.php"; print "<table WIDTH=100% border=0 CELLPADDING=5> <tr><td align=\"center\" class=errfont>" . $ERR_605 . "</td></tr> </table>"; include "footer.php"; exit(); } If you can help, please let me know. Link to comment https://forums.phpfreaks.com/topic/187893-parse-error-syntax-error-unexpected-t_elseif-in-homehtmlitemphp-on-l/ Share on other sites More sharing options...
premiso Posted January 10, 2010 Share Posted January 10, 2010 I do not see the error in the code you posted, perhaps the error is else where? Link to comment https://forums.phpfreaks.com/topic/187893-parse-error-syntax-error-unexpected-t_elseif-in-homehtmlitemphp-on-l/#findComment-992140 Share on other sites More sharing options...
redarrow Posted January 10, 2010 Share Posted January 10, 2010 The first else looks funky to me but there no errors lol <?php $TPL_closed_auctions_list .= "</table>"; $TPL_closed_auctions_list .= " <a href='viewallclosedauctions.php'>" . $MSG_31_0046 . "</a>"; #// Get parameters from the URL $params = getUrlParams("="); if(empty($_GET['id'])) $_GET['id'] = $params['id']; else $params['id'] = $_GET['id']; $id = $params['id']; $_SESSION["REDIRECT_AFTER_LOGIN"] = "http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]; foreach($membertypes as $idm => $memtypearr) { $memtypesarr[$memtypearr['feedbacks']] = $memtypearr; } ksort($memtypesarr, SORT_NUMERIC); $BIDFILE = $SETTINGS['siteurl'] . "bid_classic.php"; if(!isset($_POST['id']) && !isset($_GET['id']) && isset($_SESSION["CURRENT_ITEM"])) { $id = $_SESSION["CURRENT_ITEM"]; }elseif(isset($_REQUEST['id']) && is_numeric($_REQUEST['id'])) { $_SESSION["CURRENT_ITEM"] = $_REQUEST['id']; }else { // error message $_SESSION["CURRENT_ITEM"] = ""; include "header.php"; print "<table WIDTH=100% border=0 CELLPADDING=5> <tr><td align=\"center\" class=errfont>" . $ERR_605 . "</td></tr> </table>"; include "footer.php"; exit(); } ?> Link to comment https://forums.phpfreaks.com/topic/187893-parse-error-syntax-error-unexpected-t_elseif-in-homehtmlitemphp-on-l/#findComment-992143 Share on other sites More sharing options...
teamatomic Posted January 10, 2010 Share Posted January 10, 2010 The whole thing look a bit funky. That first if is suspect with the $id = $params['id']; statement after it. then farther on $id can be set to a _SESSION value. But nowhere do I see $id being used and doing anything. Huh...well. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/187893-parse-error-syntax-error-unexpected-t_elseif-in-homehtmlitemphp-on-l/#findComment-992147 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.