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

The Archive Base Latest Questions

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

I am converting all the values from xml to CSV successfully in the 2nd

  • 0

I am converting all the values from xml to CSV successfully in the 2nd page(Export page). But i want to display a message “data converted successfully” in the first page(seat-matrix ).

I am failing to display the message in seat-matrix.php (1st page). Please help me.

In “Seatmatrix.php” file I have the following code.

<form name="export" action="export.php">
<input type="submit" name = "export"  value="Export" title ='Exports all the above info to excel'> 
</form> 

In export.php file I have alert function and included header function to redirect to seat-matrix page as show below.

<?php  
echo "
<html>
<head>
<SCRIPT LANGUAGE='javascript'>
function Result() {
alert (\"Data exported successfully\");
}
</SCRIPT>
</head>
<body>
";

// export feature code

echo "<SCRIPT LANGUAGE='javascript'>Result();</SCRIPT>\n";
header('location:Seat_matrix.php');

?>
  • 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-25T14:30:16+00:00Added an answer on May 25, 2026 at 2:30 pm

    A simpler way would be to post the result back to the original page and have it check. You would need to change your code to something like this:

    if (isset($_GET['result']) {
        if ($_GET['result'] == "success") {
            echo "Data exported successfully.");
        }
        else {
            echo "Error exporting data.";
        }
    }
    <form name="export" action="export.php">
    <input type="submit" name = "export"  value="Export" title ='Exports all the above info to excel'> 
    </form>
    

    And in the other code add the result variable to the url:

    header('location:Seat_matrix.php?result=success');
    

    Summary:

    The first time you call Seat_matrix.php, there is no result variable and it program runs at it does now. Once the second program is executed, it calls back Seat_matrix.php and passess the variable result. The second time Seat_matrix.php is called, it checks if the result variable was passed and shows the message. You will probably have to play a little bit with the location where you want the message.

    I hope this helps. Good luck!

    Edit

    To get rid of the $_GET variable after you write the success message, you could try something like:

    if (isset($_GET['result']) {
        if ($_GET['result'] == "success") {
            echo "Data exported successfully.");
        }
        else {
            echo "Error exporting data.";
        }
        unset ($_GET);
    }
    

    I haven’t tested the above method, but I believe it might work.

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

Sidebar

Related Questions

I'm converting database from Teradata to SqlServer. I've noticed all tables and procedures are
I am using NSURLConnection to fetch XML data from the server. I am parsing
I get this error when reading some data from an SQL column then converting
I am looking at converting an application from Oracle to Postrges that has all
I'm converting data from one schema to another. Each table in the source schema
I am converting a VB6 to C# and I want to make my data
I'm converting all of our Crystal Reports to use a home-built reporting system. Essentially,
I am converting all my SQL Server queries to MySQL and my queries that
I've been converting all kinds of other things, classes, interfaces, ASP.NET MVC apps, and
UPDATE: All of these problems was for converting a Website application to a Web

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.