Reputation: 637
Hey guys so I had everything working perfectly on my old server with php 5.1.6 I had this script:
<? session_start(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<?
$name = $_SESSION['name'];
print $name;
if (empty($name)){
print "
<link rel=stylesheet href=css/screen2.css media=screen />
<form id=contactform class=rounded method=post action=panelBackend.php>
<h3>Login</h3>
<div class=field>
<label for=name>Username:</label>
<input type=text class=input name=name id=name />
<p class=hint>Minecraft Username.</p>
</div>
<div class=field>
<label for=password>Password:</label>
<input type=password class=input name=password id=password />
<p class=hint>Free Minecraft Host Password.</p>
</div>
<input type=submit name=Login class=button value=Login />
</form>";
} else {
header( 'Location: http://x.x.x.x/panelBackend.php' );
}
?>
And before it worked fine! Now when I goto it i get the form WITHOUT the style, and it prints out this php code at the bottom:
"; } else { header( 'Location: http://69.64.80.200/panelBackend.php' ); } ?>
Is there something that different in the PHP versions?
Upvotes: 0
Views: 129
Reputation: 798606
Yes. The new one doesn't have short tags enabled. Change all <?
to <?php
.
Upvotes: 1