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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:37:52+00:00 2026-06-11T22:37:52+00:00

I can pass values form one page to another but I need to pass

  • 0

I can pass values form one page to another but I need to pass value like this,

Page 1:

Page4.php

Page3.php

I need to pass the value in a text field in the Page1.php to a text field in Page2.php, since the form is not directly redirectly to page2, I am unable to pass the value, I tried session, form post method and few other methods but I am yet to succeed.

I would be very happy if you can help me with the code or some suggestions.

Thanks!

Edit……….

I found the answer, thanks for the help, it was actually a careless mistake on my part, I used $_post instead of $_session.

Its working now.

Thanks for the help.

  • 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-11T22:37:53+00:00Added an answer on June 11, 2026 at 10:37 pm

    Use something like this:

    page1.php

    <?php
    session_start();
    $_SESSION['myValue']=3; // You can set the value however you like.
    ?>
    

    Any other PHP page:

    <?php
    session_start();
    echo $_SESSION['myValue'];
    ?>
    

    A few notes to keep in mind though: You need to call session_start() BEFORE any output, HTML, echos – even whitespace.

    You can keep changing the value in the session – but it will only be able to be used after the first page – meaning if you set it in page 1, you will not be able to use it until you get to another page or refresh the page.

    The setting of the variable itself can be done in one of a number of ways:

    $_SESSION['myValue']=1;
    $_SESSION['myValue']=$var;
    $_SESSION['myValue']=$_GET['YourFormElement'];
    

    And if you want to check if the variable is set before getting a potential error, use something like this:

    if(!empty($_SESSION['myValue'])
    {
        echo $_SESSION['myValue'];
    }
    else
    {
        echo "Session not set yet.";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I pass values from one form to another in Asp.net? Can you
I'm generating a string of values (colors) like so: 'red|green|blue|yellow|orange|black' Can I pass this
Can I pass value to Navigation Context like this: NavigationContext.QueryString[param1] = PARAM1; Is it
Normally i use id to take database values from one page to another. like
I am solving how to pass values from one page to another without making
i am using query string method to pass the value form one page to
I use something like below to pass information from one unbound form to another
How can I pass one or more variables of type array to another page
Hi can some one point me some guidance, i pretend to pass the value
I have multiple slider forms in my page: like this one . For just

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.