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 8024269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:49:05+00:00 2026-06-04T22:49:05+00:00

I have the following code for a page where i am using a header

  • 0

I have the following code for a page where i am using a header function :

        <?php
        if (!defined('pagescope')) die('Please Try your Luck Somewhere else! Your IP Address has been logged!');
        define('pagescope', 'true');
        require'config.php';

                            *some Query processing with no echo command                                      

                            //$query1 = "select * from users";
                            if($query_run = mysql_query($query))
                            {                                                                    

                                $id=mysql_insert_id();

                                header("Location:     http://www.pingcampus.com/mysql/cropupload/jquery_upload_cropv1.2/upload_dp.php?id=$id&email=$contact_email&gender=$gender");
                                } else {
                                    echo mysql_error();

                                }                                               

                               ?>

*I Have made sure that there are no echo statements on the page, also there are no errors given! But it just doesn’t redirects! Also it works fine on my Localhost but not on my hosting *

  • 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-06-04T22:49:06+00:00Added an answer on June 4, 2026 at 10:49 pm

    try this

    $result = mysql_query($query) or die(mysql_error());
    if($result) {
        $id = mysql_insert_id();
        header("Location:http://www.pingcampus.com/mysql/cropupload/jquery_upload_cropv1.2/upload_dp.php?id=$id&email=$contact_email&gender=$gender");
    }
    

    UPDATE :

    your error states that header is already being sent, do a proper check in other part of script. or what you can do is use output buffering.

    place ob_start(); on top of your script.

    this will turn output buffering on. While output buffering is active
    no output is sent from the script (other than headers), instead the
    output is stored in an internal buffer.

    more information here. http://php.net/ob_start

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have the following code for EVERY page on my website. Please could
I have the following code in a php page <div class=vmenu> <div class=first_li><span >Add
I have the following php code: <?php session_start(); .... $result=$db->query($query); $row=$result->fetch_assoc(); $_SESSION['id']=$row['id']; header('Location: http://www.blabla.com/successLoginPage.php');
I have the following page layout using the 960 grid systm ---------------- header -----------------
I'm using socket.io and express and have the following code: io.set('authorization', function (data, accept)
I have the following code to layout the menu for my page: //Header Conainer
I have folowing code in which i am using some conditions on page to
i have following code to show div on page <div id=all_users> <div id=user11 userid=11
I have the following code on my page: <p align=justify style=font-size:10pt;display:block;height:200px;vertical-align:middle;> Content </p> I
I have the following code in a jsp page (Struts backed): <c:if test=${USERINFO.someproperty ==

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.