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

  • Home
  • SEARCH
  • 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 7513019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:03:00+00:00 2026-05-30T00:03:00+00:00

This is the code that won’t work, when I try to view this page

  • 0

This is the code that won’t work, when I try to view this page in my browser (chrome), I get a 500 internal error. Could someone help?

<?php
$user = $_POST["user"];
$pass = $_POST["pass"];
$name = someuser;
$passw = somepassword;
if (!isset($_POST['login_button'])) {

} else {
if (&user == $name) {
      if ($pass == $passw) {
          setcookie('liamblogprox', 'hi', );
          header.location('http://liamwli.co.uk/proxy/proxy.php');
      } else {
      echo "Invalid User or Pass!"; }

}else {
echo "Invalid User or Pass!"; }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <link rel="stylesheet" type="text/css" href="style2.css" media="screen,projection" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="generator" content="GiffHost - http://www.giffhost.co.uk/" />
    <title>Private Proxy</title>
<style type="text/css">
#container #content center table tr td center h1 i b {
    color: #000;
}
</style>
</head>
<body>

    <div id="container">

      <div id="header">
        <h1>Private Proxy</h1>
            This is a paid super fast Proxy</div>

        <div id="subheader">
          <ul id="navigation">
                <li><a href="index.html">About</a></li>
                <li><a href="register.html">Register</a></li>
                <li class="active"><a href="login.html">Log In</a></li>
                <li><a href="contact.html">Contact</a></li>
          </ul>

      </div>

      <div id="content">

<center>
<table bgcolor="white" cellpadding="12" border="1">
<tr><td colspan="2" bgcolor="#FFFFFF"><center>
  <h1><i><b>Log In</b></i></h1></center></td></tr>
<tr><td><h1><i><b>UserName:</b></i></h1></td><td><form name="login" action="<?php echo $PHP_SELF;?>" method="post"><input
name="user" type="text"></td></tr>
<tr><td><h1><i><b>Password:</b></i></h1></td><td><input name="pass"
type="password"></td></tr>
<tr><td><center><input type="submit" value="Login"
name="login_button"></center></td><td><center><br><input
type="Reset"></form></td></tr></table></center> 
      </div>
        <div id="footer">

      Designed by<a href="http://www.giffhost.co.uk"> GiffHost </a></div>

    </div>

</body>
</html> 
  • 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-30T00:03:01+00:00Added an answer on May 30, 2026 at 12:03 am

    There are quite a few things wrong here.

    <?php
    // Are these actual login credentials? They should be quoted anyway.
    $name = "alex";
    $passw = "liamgoogle4530";
    
    // This is a better way of checking to see if the form has been posted
    if ($_SERVER['REQUEST_METHOD'] == 'POST') 
    {
        // The post variables are only likely to exist if the form has been submitted
        $user = $_POST["user"];
        $pass = $_POST["pass"];
    
        // $ sign, not & for $user variable, why not combine the check into one?
        if ($user == $name && $pass == $passw) 
        {
            // You need to set an expiry on the cookie, I've set it to one hour
            setcookie('liamblogprox', 'hi', time()+3600);
            // This is how you do redirects in PHP
            header('Location: http://liamwli.co.uk/proxy/proxy.php');
        }
        else 
        {
            echo "Invalid User or Pass!"; 
        }
    }
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code that works in a unit test but doesn't work when
I have this code that fetches some text from a page using BeautifulSoup soup=
I have the this code that will create excel file and work sheet then
I have this code that won't delete all of my cookies, any idea y?
I have a very simple bit of code that won't work, and have no
Okay, so I've had this code that used to work just fine. I recently
I have this code that performs an ajax call and loads the results into
So I have this code that takes care of command acknowledgment from remote computers,
Challenge: I have this code that fails to compile. Can you figure out what's
I have this code that I want to make point-free; (\k t -> chr

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.