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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:29:20+00:00 2026-06-15T23:29:20+00:00

in a.php I do: $a = hello,world; $_POST[‘a’] = $a; in b.php , i

  • 0

in a.php I do:

$a = "hello,world";
$_POST['a'] = $a;

in b.php, i want to get $a value, when i echo $_POST['a'], there is no value output. how do i do?

  • 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-15T23:29:21+00:00Added an answer on June 15, 2026 at 11:29 pm

    Page a.php:

    <?php
    session_start();
    $a = "hello,world";
    $_SESSION["name_anything"] = $a; // This will store $a value to the session
    //here i've given session name "name_anything"
    ?>
    

    Page b.php:

    <?php
    session_start(); //you need to initiate the session using this function
    //You need to session_start() on every page on which you want to use session.
    //Even on the page on which you are storing the session.
    echo $_SESSION["name_anything"]; //this will print the value of $a
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have a example.php file like that: <p> <?php echo _('Hello world') ?>
Here is my code <html> <body> <?php echo <b>Hello World</b> <br />; ?> </body>
For example, in foo.php: <?php echo 'hello'; ?> And in bar.php, I want to
If this is file_1.php <?php $_POST[test_message] = Hello, world; header(Location: http://localhost/file_2.php); ?> and this
I have a simple php test page as follows <?php if(isset($_POST['hitme'])) { echo hello
I have a simple PHP app that prints 'hello world'. When I run it
Given hello.php: <?php echo Hello; ?> rendering the page works fine and returns Hello
when I include vars.php: $var='hello'; in index.php: require 'vars.php'; echo $var; it works great,
<? class Contact { //protected $message = Hello World; function __construct($message){ echo $this ->message;
Here's what I am doing, <?php if(isset($_POST['submit'])){ $text_area= mysqli_real_escape_string($dbc, strip_tags(trim($_POST['text_area']))); echo $text_area; } ?>

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.