Jump to content

I thought it was right...


maxudaskin

Recommended Posts

<?php
  if(!$logged_in){
  echo 'You are not logged in';
  }else{
  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.';
  }}}
  ?>

 

It does not output anything, but it does not give an error either... no actions at all.

Link to comment
https://forums.phpfreaks.com/topic/90609-i-thought-it-was-right/
Share on other sites

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.