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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:33:04+00:00 2026-06-15T18:33:04+00:00

I am learning php. I am passing some values from one page to another

  • 0

I am learning php. I am passing some values from one page to another page, and letting the user enter form into this page and then storing into the database.

I would like to stay on the same page, so instead of this
first page-

<form method="post" action="update.php">
   <input type="text" name="name" value="value1" />
</form>

update.php

<?php
   $name= $_POST['name'];
?>

I want to be on the same page because i am getting some variables and arrays from a previous page with get()

<?php 

$count= $_GET['count'];
$sum= $_GET['Sum'];
for ($i=0;$i<$count;$i++){
echo unserialize($_GET['serialized_name'])[$i];
?>

Since I also need to send the form values so i am not sure how i can pass the values i am getting to the next page- which is why i was hoping to be on the same page instead of going to update.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-06-15T18:33:05+00:00Added an answer on June 15, 2026 at 6:33 pm
        <?php 
           @session_start();
           $_session['count']= $_GET['count'];
           $_session['sum']= $_GET['Sum'];
           for ($i=0;$i<$_session['count'];$i++){
    
              //make necessary changes here as well
             echo unserialize($_GET['serialized_name'])[$i];
    
             //use session to store your data from previous page
           ?>
         <?php
             //put this code above the form to process the submitted data which was previously sent to update.php
    
          if(isset($_POST[submit])){
                    //Your code
            e.g.
                  $name=$_POST['name']
               //whenever you want to access previous data just get it from session variable.
             e.g. $count=$_SESSION['count'];
    
          }?>
    
         <html>
                <!--Submit the data of the form to itself instead of update.php -->
           <form method="post" action="<?php echo $PHP_SELF;?>">
               <!--your html code -->
           </form>
         </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This one is killing me... I'm learning to develop SOAP servers in PHP at
I have been learning PHP for some time now and I wanted one clarification.
Actually I was learning PHP, so this question just came into my mind. How
So I'm learning PHP with MYSQL right now. Making a user registration and mail
I'm new to learning php and in one of my first programs I wanted
i just got some more questions while learning PHP, does php implement any built
I am working on a small project for learning PHP better. This project has
I am learning PHP and I am at this point learning how to validate
I'm currently learning PHP and MySQL and I have been working from a basic
I am learning php on my own. I am creating a new user register

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.