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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:34:42+00:00 2026-06-15T13:34:42+00:00

On my home page I have a login form. Can it be changed to

  • 0

On my home page I have a login form. Can it be changed to something else based on the the username that has been logged in?

For example

<form id="form1" name="form1" method="post" action="testconnect.php">
  <p>
    <label for="username">Username:</label>
    <input type="text" name="username" id="username" />
  </p>
  <p>
    <label for="password">Password:</label>
    <input type="text" name="password" id="password" />
  </p>
  <p>
    <input type="submit" name="login" id="login" value="Submit" />
  </p>
</form>

Can this be changed on the homepage to show

Welcome Back “Username”. Logout

  • 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-15T13:34:43+00:00Added an answer on June 15, 2026 at 1:34 pm

    So, if I understand correctly you want to hide the form if the user is already logged in and display their username in a message instead? Yes, you can do that. If you are using PHP sessions to store the user data, you could do something like this:

    <?php
    // Make sure to start a session first
    if(!session_id()) {
        session_start();
    }
    
    // If a username is set, display a welcome message.
    if(isset($_SESSION['username'])) {
        echo "Welcome back " . $_SESSION['username'];
    } else {
        // No login session found, output the form here instead
    ?>
    <form id="form1" name="form1" method="post" action="testconnect.php">
      <p>
        <label for="username">Username:</label>
        <input type="text" name="username" id="username" />
      </p>
      <p>
        <label for="password">Password:</label>
        <input type="text" name="password" id="password" />
      </p>
      <p>
        <input type="submit" name="login" id="login" value="Submit" />
      </p>
    </form>
    <?php
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The facebook home page (http://www.facebook.com/) has an login form on it. It does not
I have an ASP.NET home page where user provides his login ID. Depending on
On my home page i have roughly 10 grids that sit inside ajax tabs
I have an iPhone WebApp that is installed to the home page. When a
I have a login page. In my web.config I setup a loginUrl so that
i have two form, home and login .On home there is menu called file
I have a home page with ul li div the div is a square
I have one wordpress blog whose home page is showing a list of 10
I have a link button control on my home page side bar nav. When
I have built a site in wordpress and the home page is really screwed

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.