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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:26:55+00:00 2026-06-12T06:26:55+00:00

here is the script that i’m using <?php $saving = $_REQUEST[‘saving’]; if ($saving ==

  • 0

here is the script that i’m using

<?php
$saving = $_REQUEST['saving'];
if ($saving == 1){ 

$Aname = $_POST['Aname'];

$name = $_POST['name']; 
$last = $_POST['last']; 
$mob = $_POST['mob']; 
$ext = $_POST['ext']; 
$email = $_POST['email']; 
$add = $_POST['add']; 
$com = $_POST['com']; 
$day = $_POST['day']; 
$text = $_POST['text'];
$date = date("M j, Y "); 

$data = "Date Sent: {$date}\n\nName: {$name} {$last}\nPhone : {$mob} ext: {$ext}\nCompany: {$com}\nAddress : {$add}\nE-mail : 

{$email}\nDay : {$day}\n\nNote :\n{$text}\n---------------------------------------\n";

$file = $Aname.'.txt';

file_put_contents ( $file, $data, FILE_APPEND ); 

}
?>

how can i prevent it from taking the user to another page after creation of the file, and also informing them that the file has been created?

  • 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-12T06:26:56+00:00Added an answer on June 12, 2026 at 6:26 am

    The user is not going to another page after the creation of the file, the user is probably already going to another page when he / she hits the submit or save button.

    To avoid that, you would have to use ajax:

    • Use javascript to cancel the default submit button action;
    • Use javascript / ajax to post to your current script;
    • Have your script return a message / json ;
    • Use javascript to show the message where you want it.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example, my goal is to test the code given here: PHP script that
I have a script that uploads an image using JavaScript, as seen here .
Here is the script that I want to run using git filter-branch : #!/bin/bash
I am working on a script that uploads a picture using PHP and I
I have a script that resizes called resize Here is the script: <? echo
I found a perl script that manages randomizing the wikipedia articles in Wikipedia here
If I use a here document in a shell script that contains multiple backslashes
I'm writing a script that will ping my ip range. Here's what I have
I am stuck with a peculiar issue here. I have a script that basically
I have a script on here that works fine in FF14 and Chrome20. A

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.