maxudaskin Posted February 3, 2008 Share Posted February 3, 2008 <?php if($_SESSION['type'] != 1){ $action = $_GET['action']; $pirep = $_GET['pirep']; $user = 'OOM'.$_SESSION['username'].' '.$_SESSION['name']; $date = ''; if(!empty($action) && !empty($pirep)){ if($action = 'accept'){ $acceptsql = mysql_query("UPDATE `zoomdb`.`pireps` SET `type` = '0' WHERE `pireps`.`pirepid` ='{$pirep}' LIMIT 1"); if($acceptsql){ echo 'Application Accepted'; }else{ die('ERROR: Application not accepted due to internal error.'); } }elseif($action = 'deny'){ $denysql = mysql_query("UPDATE `zoomdb`.`pireps` SET `type` = '2' WHERE `pireps`.`pirepid` ='{$pirep}' LIMIT 1"); }else{ echo 'You have specified an unknown action.'; } }else{ echo 'You do not have either an action or a pirep specified or both.'; }} ?> I finished the accept part, but when I call it, it echo's nothing. Quote Link to comment https://forums.phpfreaks.com/topic/89157-something-going-wrong-no-errors/ Share on other sites More sharing options...
trq Posted February 3, 2008 Share Posted February 3, 2008 I see no call to session_start(). Quote Link to comment https://forums.phpfreaks.com/topic/89157-something-going-wrong-no-errors/#findComment-456570 Share on other sites More sharing options...
maxudaskin Posted February 3, 2008 Author Share Posted February 3, 2008 The session_start(); is called waaaaaaaayyyyy before this part, the rest it template HTML. Quote Link to comment https://forums.phpfreaks.com/topic/89157-something-going-wrong-no-errors/#findComment-456862 Share on other sites More sharing options...
revraz Posted February 3, 2008 Share Posted February 3, 2008 Is the waaaaaaaayyyyy before part the 1st line of code on the page? The session_start(); is called waaaaaaaayyyyy before this part, the rest it template HTML. Quote Link to comment https://forums.phpfreaks.com/topic/89157-something-going-wrong-no-errors/#findComment-456888 Share on other sites More sharing options...
Aureole Posted February 3, 2008 Share Posted February 3, 2008 session_start() must be the very first thing... it needs to come before anything else. Quote Link to comment https://forums.phpfreaks.com/topic/89157-something-going-wrong-no-errors/#findComment-456892 Share on other sites More sharing options...
maxudaskin Posted February 3, 2008 Author Share Posted February 3, 2008 This is the very first part of the page. <?php session_start(); include("../include/loginscript.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" --><head> <link href="../styles.css" rel="stylesheet" type="text/css" /> ... Quote Link to comment https://forums.phpfreaks.com/topic/89157-something-going-wrong-no-errors/#findComment-456901 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.