Jump to content

Unknown php error Oo


Tuck

Recommended Posts

this is my code i have no idea why it errors :(

 

<?php
   if ((isset($_GET['U'])) && (isset($_GET['P'])) && (isset($_GET['ID'])) && (Logins($_GET['U'],$_GET['P']))) {
      echo = "1";
      $referer = $_SERVER['HTTP_REFERER'];
      if (isset($referer)) {
         $con = mysql_connect('link', 'db', 'pw');
         if (!$con) { die('Error: ' . mysql_error()); }
         mysql_select_db('db', $con);
         mysql_query("DELETE FROM `Bump` WHERE `ID`='" . $_GET['ID'] . "'");
         mysql_close($con);
         header("Location: " . $referer);
      } else {
         die("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r<HTML><HEAD>\r<TITLE>403 Forbidden</TITLE>\r</HEAD><BODY>\r<H1>Forbidden</H1>\rYou don't have permission to access \rthis server.<P>\r</BODY></HTML>");
      }
   } else {
      die("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r<HTML><HEAD>\r<TITLE>403 Forbidden</TITLE>\r</HEAD><BODY>\r<H1>Forbidden</H1>\rYou don't have permission to access \rthis server.<P>\r</BODY></HTML>");
   }
   function Logins($Username,$Password) {
      if (strtoupper($Username) == strtoupper("js")) {
         if (strtoupper($Password) == strtoupper("uhg")) {
            return 1;
         }
      }
      if (strtoupper($Username) == strtoupper("blah")) {
         if (strtoupper($Password) == strtoupper("bahf")) {
            return 1;
         }
      }
      return 0;
   }
?>

Link to comment
Share on other sites

you have used way too many braces (Causes lots of confusion) also you had a syntax error here is some code which should work

 

<?php
   if (isset($_GET['U']) && isset($_GET['P']) && isset($_GET['ID']) && Logins($_GET['U'],$_GET['P'])) {
      $referer = $_SERVER['HTTP_REFERER'];
      
      if (isset($referer)) {
         $con = mysql_connect('link', 'db', 'pw');
         if (!$con) { die('Error: ' . mysql_error()); }
         mysql_select_db('db[b][/b]', $con);
         mysql_query("DELETE FROM `Bump` WHERE `ID`='" . $_GET['ID'] . "'");
         mysql_close($con);
         header("Location: " . $referer);
      } 
      else {
         die("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r<HTML><HEAD>\r<TITLE>403 Forbidden</TITLE>\r</HEAD><BODY>\r<H1>Forbidden</H1>\rYou don't have permission to access \rthis server.<P>\r</BODY></HTML>");
      }
   } 
   else {
      die("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r<HTML><HEAD>\r<TITLE>403 Forbidden</TITLE>\r</HEAD><BODY>\r<H1>Forbidden</H1>\rYou don't have permission to access \rthis server.<P>\r</BODY></HTML>");
   }
   
   function Logins($Username,$Password) {
      if (strtoupper($Username) == strtoupper("js")) {
         if (strtoupper($Password) == strtoupper("uhg")) {
            return 1;
         }
      }
      if (strtoupper($Username) == strtoupper("blah")) {
         if (strtoupper($Password) == strtoupper("bahf")) {
            return 1;
         }
      }
      return 0;
   }
?>

 

 

 

Link to comment
Share on other sites

It would help if we had the error message. This is the equivalent of..."It don't work"

 

white screen no html source happy?

 

you have used way too many braces (Causes lots of confusion) also you had a syntax error here is some code which should work

 

<?php
   if (isset($_GET['U']) && isset($_GET['P']) && isset($_GET['ID']) && Logins($_GET['U'],$_GET['P'])) {
      $referer = $_SERVER['HTTP_REFERER'];
      
      if (isset($referer)) {
         $con = mysql_connect('link', 'db', 'pw');
         if (!$con) { die('Error: ' . mysql_error()); }
         mysql_select_db('db[b][/b]', $con);
         mysql_query("DELETE FROM `Bump` WHERE `ID`='" . $_GET['ID'] . "'");
         mysql_close($con);
         header("Location: " . $referer);
      } 
      else {
         die("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r<HTML><HEAD>\r<TITLE>403 Forbidden</TITLE>\r</HEAD><BODY>\r<H1>Forbidden</H1>\rYou don't have permission to access \rthis server.<P>\r</BODY></HTML>");
      }
   } 
   else {
      die("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r<HTML><HEAD>\r<TITLE>403 Forbidden</TITLE>\r</HEAD><BODY>\r<H1>Forbidden</H1>\rYou don't have permission to access \rthis server.<P>\r</BODY></HTML>");
   }
   
   function Logins($Username,$Password) {
      if (strtoupper($Username) == strtoupper("js")) {
         if (strtoupper($Password) == strtoupper("uhg")) {
            return 1;
         }
      }
      if (strtoupper($Username) == strtoupper("blah")) {
         if (strtoupper($Password) == strtoupper("bahf")) {
            return 1;
         }
      }
      return 0;
   }
?>

 

could you atlest tell me what syntax error and stuff >_>

Link to comment
Share on other sites

 

white screen no html source happy?

 

 

And you actually expect a reply?  :wtf:

 

if i knew how to debug php i would but php sucks so much if 1 error it all errors.. and dosent tell anything about it >_>

 

<?php
   if (isset($_GET['U']) && isset($_GET['P']) && isset($_GET['ID']) && Logins($_GET['U'],$_GET['P'])) {
      echo = "<html></html>";
      $referer = $_SERVER['HTTP_REFERER'];
      if (isset($referer)) {
         $con = mysql_connect('', 'virus_clan_net', '');
         if (!$con) { die('Error: ' . mysql_error()); }
         mysql_select_db('virus_clan_net', $con);
         mysql_query("DELETE FROM `Bump` WHERE `ID`='" . $_GET['ID'] . "'");
         mysql_close($con);
         header("Location: " . $referer);
      } else {
         die("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r<HTML><HEAD>\r<TITLE>403 Forbidden</TITLE>\r</HEAD><BODY>\r<H1>Forbidden</H1>\rYou don't have permission to access \rthis server.<P>\r</BODY></HTML>");
      }
   } else {
      die("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r<HTML><HEAD>\r<TITLE>403 Forbidden</TITLE>\r</HEAD><BODY>\r<H1>Forbidden</H1>\rYou don't have permission to access \rthis server.<P>\r</BODY></HTML>");
   }
   function Logins($Username,$Password) {
      if (strtoupper($Username) == strtoupper("Tuck")) {
         if (strtoupper($Password) == strtoupper("")) {
            return 1;
         }
      }
      if (strtoupper($Username) == strtoupper("Jonny")) {
         if (strtoupper($Password) == strtoupper("")) {
            return 1;
         }
      }
      return 0;
   }
?>

 

the code code dosent work still :/

Link to comment
Share on other sites

if i knew how to debug php i would but php sucks so much if 1 error it all errors.. and dosent tell anything about it >_>

 

at the top of your script, try this:

 

ini_set('display_errors', 1);

 

Don't be so rude to people trying to help you, or you'll find your threads quickly go unanswered.

Link to comment
Share on other sites

if i knew how to debug php i would but php sucks so much if 1 error it all errors.. and dosent tell anything about it >_>

 

at the top of your script, try this:

 

ini_set('display_errors', 1);

 

Don't be so rude to people trying to help you, or you'll find your threads quickly go unanswered.

 

i'm mad at php not any person >_> but thanks will try

 

@thanks with the echo answer btw

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.