Jump to content

Page won't load with PHP.

milo526
Go to solution Solved by milo526,

Used 2 variables in the if statement.

Don't know why that did work.... but it does

I have a page "quick.php"

This page should check if a cookie is stored by my login script.

Withouth the php code, both the form and button work perfectly fine, when i check if the cookie is set, and use an else statement, the page refuses to load.

The background and title of the page also won't load.

<html> <head>  <title>  <?php    include 'config.php';    echo $title;    ?> | Login    </title>  <!-- Latest compiled and minified CSS --><link rel='stylesheet' href='//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css'><!-- Optional theme --><link rel='stylesheet' href='//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css'><!-- Latest compiled and minified JavaScript --><script src='//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js'></script>  <link href='//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css' rel='stylesheet'>  <link href='css/global.css' rel='stylesheet'> </head> <body> <div id='fullscreen_bg' class='fullscreen_bg'/><div class='container'><?phpif (isset($_COOKIE['login'])){    echo"    <a href='logout.php' class='btn btn-lg btn-primary btn-block'>			Sign Out	</a>    "}else{    echo  "    <form class='form-signin' name='login' method='post' action='login.php'>		<h1 class='form-signin-heading text-muted'>Sign In</h1>		<input type='password' name='password' class='form-control' placeholder='Password' required='' autofocus=''>		<button class='btn btn-lg btn-primary btn-block' type='submit'>			Sign In		</button>	</form>     "}?></div>  </body></html>

Thanks for the help!

Although I try to use proper grammar as much as possible, I can't guarantee that my grammar is always correct.

Thank you for your help if you helped me!

Link to comment
Share on other sites

Link to post
Share on other sites

Used 2 variables in the if statement.

Don't know why that did work.... but it does

Although I try to use proper grammar as much as possible, I can't guarantee that my grammar is always correct.

Thank you for your help if you helped me!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×