Jump to content

Something going wrong... no errors.


maxudaskin

Recommended Posts

<?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.

Link to comment
https://forums.phpfreaks.com/topic/89157-something-going-wrong-no-errors/
Share on other sites

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" />

...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.