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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:14:53+00:00 2026-05-23T17:14:53+00:00

I was hoping to create a php script that allows me to provide a

  • 0

I was hoping to create a php script that allows me to provide a person a link and give them specific login credentials. When the user goes to the page and logins I would then like it to redirect them to an https site like gmail and have it auto login with my creditials. It’s kind of a round about way to allow someone to access my email without them knowing my password. I know this is probably a very dumb way of doing this but I’m new with php and am not sure how exactly I would accomplish this task or if its even php for that matter, haha.

This is the code I have to log in:

HTML:

<h1>Login</h1> 

<form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> 
    <p><label for="txtUsername">Username:</label> 
    <br /><input type="text" title="Enter your Username" name="txtUsername" /></p>

    <p><label for="txtpassword">Password:</label> 
    <br /><input type="password" title="Enter your password" name="txtPassword" /></p> 

    <p><input type="submit" name="Submit" value="Login" /></p> 

</form> 

PHP:

<?php 

// Define your username and password 
$username = "admin"; 
$password = "password"; 

if ($_POST['txtUsername'] != $username || $_POST['txtPassword'] != $password) { 

?> 


<?php 

} 
else { 

?> 

website html

<?php 

} 

?>

I apologize for the horrible style and butchering the code but this is literally the first thing i’ve written in php. Also I’ve seen a good amount of posts related to what i’m asking but doesn’t fully answer it. thanks!

  • 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-23T17:14:54+00:00Added an answer on May 23, 2026 at 5:14 pm

    Don’t do this!

    you’re adding insecurity to your account for no reason. Google already has this feature under settings > Accounts and Import > Grant access to your account

    If you were to set up a page for someone to go to to log in as you, anyone who stumbled across your page could then have full access to your account. Granting access instead would just allow another user limited privileges to your account, and you’d always be able to prevent them from accessing it in the future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using PHP, and am hoping to be able to create a regex that
I looking to create a custom calender with Zend Framework, I am hoping that
I'm using WP Alchemy to create a meta box in a post that allows
I am hoping that you can help me. I have created the following script,
What's the right way in Drupal to create reports? I was hoping to use
Hoping someone can provide an answer with this, although it's not 100% programming related.
Hoping that anybody here knows about a good one: I'm looking for a (free
Hoping that using something like this demo it is possible to drag items within
i hoping to create a recursive function which i don't have an idea yet
I've got a very old php application (1999) that has been worked on during

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.