Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7539599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:25:37+00:00 2026-05-30T07:25:37+00:00

why on earth wont this work their is no spaces no outputs but yet

  • 0

why on earth wont this work their is no spaces no outputs but yet i put redirect just in before configuartion .php which just holds my db connections what gives

 <?php 
   require('configuration.php');
   $voucher = $_SESSION['voucher'] ;
   $result = mysql_query("SELECT used FROM codes where code='".$voucher."'");
   $row =mysql_fetch_row($result);
   if ( $row['used']  == "1" ) {
       header('Location: invalid.php');
       exit;
   }
   if ( $row['used']  == "0" ) { 
       header('Location: valid.php');
       exit;
   }
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:25:39+00:00Added an answer on May 30, 2026 at 7:25 am

    Chances are configuration.php has something being output. (Remember that require/include output anything at that point in time, so any white-space or characters would also be output at that time).

    out of curiosity, if you do the following does it work:

    <?php
      ob_start();
      require('configuration.php');
    
      // your code with header(...);
    
      ob_end_flush();
    

    If it works with the ob_start/ob_end_flush calls in place, configuration.php is outputting something. However, some things to note:

    • Never send data coming in from a client (via $_GET/$_POST/$_SESSION) directly to SQL. Even though you may be setting the session data, depending where it comes from (cookie for example) it’s very easy to start poking around your database.
    • Location should be a fully-qualified path (http://mydomain.com/myfile.php not just myfile.php)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How on earth do I make this work? I have a database with 3
This won't work: <select size=2> <option>Mars</option> <option>Earth</option> <option>Jupiter</option> </select> http://jsfiddle.net/uteb6/ It's not possible to
Why on Earth doesn't the interpreter raise SyntaxError everytime I do this: my_abc =
Spent a solid hour trying to sort out why on earth this (coffeescript) $.ajax
I have this code to show a map using the Virtual Earth API: <script
i am trying escape some data before it goes into my database, but i
Why on earth would this be allowed: ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// template<typename T> struct invisible {
This expression: sort words fire water earth fire --- gives this error --- Couldn't
Can't figure out what on earth this postgresql error is talking about. PGError: ERROR:
Can someone tell me why on earth this is not submitting to self? I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.