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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:32:17+00:00 2026-06-11T05:32:17+00:00

How to popup a JavaScript confirmation window before executing: <form action=index.php method=get> <input type=hidden

  • 0

How to popup a JavaScript confirmation window before executing:

<form action="index.php" method="get">
  <input type="hidden" name="act" value="run">
  <input type="submit" value="Clear map">
</form>
<?php
  if (!empty($_GET['act'])) {
        mysql_query("TRUNCATE TABLE mapinfo");
        $page = $_SERVER['PHP_SELF'];
        header("Location: $page");
  } 
?>

User has to press OK to execute PHP or Cancel to not.

  • 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-11T05:32:18+00:00Added an answer on June 11, 2026 at 5:32 am
    <?php
      // mysql connection
      if ($_GET['act'] == 'run') {
            mysql_query("TRUNCATE TABLE mapinfo");
            $page = $_SERVER['PHP_SELF'];
            header("Location: $page"); // for this to work, script must not output something before, otherwise use echo '<script type="text/javascript">window.location = \''.$page.'\';</script>';
            die;
      } 
    ?>
    <form action="index.php" method="get" onsubmit="return confirm('Are you sure you want to truncate `mapinfo`?');">
      <input type="hidden" name="act" value="run">
      <input type="submit" value="Clear map">
    </form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Page1 : test.php (open in popup) <script type=text/javascript> function addFiles(aFiles) { if ($('#addfiles').length==0) $('#addfiles').html;
I'm creating a Drupal form with a datetime-based javascript popup calendar input that allows
I can get the name of the popup window in JavaScript by window.name .
I am looking to create a JavaScript function that will display a confirmation popup
Am Dispalying a crystal report using javascript Popup : window.open(reports_1_cox.aspx); Aspx : <CR:CrystalReportViewer ID=coxReportIdVw
I would like to open a popup window using javascript in my c#.net app.
I have a site using javascript popup effect like this: <script type=text/javascript> var GB_ROOT_DIR
Trying to get Facebook to authenticate my users via a javascript popup. Right now,
Does anyone know how can I close all popup windows (window popup by javascript)
I am trying get Javascript popup calendar control to work which doesnt work. 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.