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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:08:04+00:00 2026-05-15T00:08:04+00:00

I have 3 files: login.html login_check.php welcome.php In login.html when the username and password

  • 0

I have 3 files:

  • login.html
  • login_check.php
  • welcome.php

In login.html when the username and password is entered and submit button is clicked login_check.php checks whether the username entry is in the database on the basis of $_POST['username'] and some SQL query. Now I have put the following code at the bottom of login_check.php

login_check.php:

header('Location:welcome.php') 

But I want to pass $_POST['username'] from login_check.php to welcome.php so that I can make use of $_POST['username'] in my welcome page. Is there any way by which I can pass an argument like in the above case?

  • 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-05-15T00:08:05+00:00Added an answer on May 15, 2026 at 12:08 am

    Use session instead because you would be showing the user’s name everytime on the welcome page no matter which page you land at welcome page.

    You can set the session on login_check page like:

    session_start(); // this should be on top of login_check file
    
    // this goes just before redirect line
    $_SESSION['username'] = $_POST['username'];
    

    Now on the welcome page, you can show username like:

    session_start(); // this should be on top of welcome page.
    echo `Welcome ` . $_SESSION['username'];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Normally we have login page with username, password filed and signin button. Using the
I have a form with html browse type and a submit button. I chose
I have a php file that holds my login details named connect.php. $host =
In an HTML page: <a href=/files/getfile.php?name=abc.zip>file download</a> in PHP script(getfile.php): if('notlogged') { echo 'please,
I have a simple html login form, deployed on Xcode using phonegap framework. When
I have a website (my college website) for which each student has a username/password
I have a simple file-system-ed-login (not mysql) just to track number of users who
I'm using FormsAuthentication to allow users to login. However I have a Excel file
I have to login into a https web page and download a file using
I have the following rule in my current .htaccess file to redirect /videos/login/ requests

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.