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

  • Home
  • SEARCH
  • 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 7838471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:07:04+00:00 2026-06-02T15:07:04+00:00

I have a small error handling function that informs should inform the user of

  • 0

I have a small error handling function that informs should inform the user of the error whilst on a redirect.

At present, it either redirects but does not pass through the variables $error and $prize or I can echo out the $error from the function.

I need to be able to redirect the user and then on the new page echo out the variable. Can i do this?

function error($error, $prize)
 {

    header('Location: ' . $form);
    echo $error . '<br />';
    echo $prize;

exit;
} // end error handler
  • 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-02T15:07:07+00:00Added an answer on June 2, 2026 at 3:07 pm

    You could do it through GET:

    $params = http_build_query(array('error'=> $error, 'prize'=>$prize));
    header('Location: '.$form.'?'.$params);
    

    destination page:

    if($_GET) {
       $vars = $_GET;
       echo $vars['error']; 
       echo $vars['prize'];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have small function that running on condintion, if text box value is not
I have this small function that is causing me headaches on RHEL6, and I
I have just read this [very nice] small tutorial about MYSQL error handling. I
I have a small script and it throws Unexpected token error on line 2
have small problem, and would very much appreciate help :) I should convert byte
I have small web app that generate PDF files as a report. I'm trying
I have a user that has, up until today, been called foo.bar . Now
I have a small script that copies files to a list of remote machines.
I have a small WPF application. This application has a button that when clicked,
I have small problem with http 404 error, after click on 'allow' on facebook

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.