Why does this happen? (pics inside)

Hello, can someone tell me why does this happen? I have no idea whatsoever.

This is how I see the code when its hosted online:
http://i40.tinypic.com/vgpf2q.png

This is how I see it in my localhost:

http://i39.tinypic.com/mmv4i9.png

And this happens with all pages, not just this one.

Theres the code in case you would need to see it
[php]<?php
ob_start();
// allows you to use cookies
$logn = 1;
//da ne redirecta
include(“config.php”);
//gets the config page
?>

Space Lords
<? if (!$_POST[register]) { // the form has not been submitted...so now we display it. ?> <? }

if (isset($_POST[register])) {
// the above line checks to see if the html form has been submitted

$username = clean($_POST[username]);
$password = clean($_POST[pass]);
$cpassword = clean($_POST[cpass]);
$email = clean($_POST[emai1]);
$rasa = clean($_POST[rasa]);

//referal
if (!$_GET[uid]) { $uid=0; }
if ($_GET[uid]) { $uid = $_GET[uid]; }
if (!is_numeric($uid)) { die(“Do NOT edit url!”); }

//username
if (preg_match(’/[^A-z0-9]+/’, $username)) {
die(“

”);
}

//mail
if (!eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)@[a-z0-9-]+(.[a-z0-9-]+)(.[a-z]{2,3})$", $email)){
die(“

”);
}

//username
if (preg_match(’/[^A-z0-9]+/’, $user_name)) {
die(“

”);
}

if ($rasa == 0) {
die(“

”);
}

if ($rasa < 0 OR $rasa > 7) {
die(“

”);
}

//the above lines set variables with the user submitted information
if($username==NULL|$password==NULL|$cpassword==NULL|$email==NULL) {
//checks to make sure no fields were left blank
echo “

”;
}else{
//none were left blank! We continue…
if($password != $cpassword) {
// the passwords are not the same!
echo “”;
}else{
// the passwords are the same! we continue…
$pwmail = $password;
$password = md5($password);
// encrypts the password
$checkname = mysql_query(“SELECT username FROM users WHERE username=’$username’”);
$checkname= mysql_num_rows($checkname);
$checkemail = mysql_query(“SELECT email FROM users WHERE email=’$email’”);
$checkemail = mysql_num_rows($checkemail);
if ($checkemail>0|$checkname>0) {
// oops…someone has already registered with that username or email!
echo “”;
}else{
// noone is using that email or username! We continue…

$username = htmlspecialchars($username);
$password = htmlspecialchars($password);
$email = htmlspecialchars($email);
// the above lines make it so that there is no html in the user submitted information.

//Vse stima dodamo v users tabelo
mysql_query(“INSERT INTO users (username,password,email,reg_time,rasa,referedby) VALUES(’”.$username."’,’".$password."’,’".$email."’,’".time()."’,’".$rasa."’,’".$uid."’)");

//army, nation, weapons
$usr_regQ = mysql_query(“SELECT id FROM users WHERE email=’”.$email."’ AND username=’".$username."’ LIMIT 1");
$usr_reg = mysql_fetch_array($usr_regQ);
$idnovga = $usr_reg[0];

$res1 = mt_rand(1,5);
$res2 = mt_rand(1,5);
while ($res1==$res2) {
$res2 = mt_rand(1,5);
}
$resource = $res1.$res2;

mysql_query(“INSERT INTO army (userid) VALUES(’$idnovga’)”);
mysql_query(“INSERT INTO nation (userid,resource) VALUES(’$idnovga’,’$resource’)”);
mysql_query(“INSERT INTO weapons (userid) VALUES(’$idnovga’)”);
$title = “Welcome to Space Lords!”;
$tekst = “Please check <a href=“TOS.php”>TOS and <a href=“FAQ.php”>FAQ/Help.
If you have any more questions you can ask them on Forum.
You are protected for 24hours.

Regards,
Space Lords crew”;
mysql_query(“INSERT INTO messages (to,from,subject,tekst,time) VALUES(’$idnovga’,‘0-SL crew’,’$title’,’$tekst’,’”.time()."’)") or die(mysql_error());

//poslemo mu email
$to = $email;
$subject = “Welcome to Space Lords”;
$message0 = “Welcome to the online game Space Lords,”;
$message1 = “You can now log in”;
$message2 = "Your username is: ".$username;
$message3 = "Your password is: “.$pwmail;
$signature = “Thanks for signing up to Space Lords, \n Regards \n The Crew”;
$body = " $message0 \n \n $message1 \n \n $message2 \n $message3 \n \n $signature”;
mail($to, $subject, $body);

echo “

”;
}
}
}
}
?>
 
Username (ONLY A-z, 0-9)
Password
Confirm Password
Email
Race choose race Alralahur Berrakra Chajajende Hialaem Mindassa Qarenyon Slarkaith
Select race to view description.

Best viewed with Mozilla Firefox and JavaScript.
Username ($username) you provided is not valid! <a href=“javascript: history.go(-1)”>try again
Email ($email) you provided is not valid! <a href=“javascript: history.go(-1)”>try again
Username ($username) you provided is not valid! <a href=“javascript: history.go(-1)”>try again
No race was selected. Please <a href=“javascript: history.go(-1)”>try again
Form modification detected. IP logged! <a href=“javascript: history.go(-1)”>try again
A field was left blank. <a href=“javascript: history.go(-1)”>try again
Passwords do not match! <a href=“javascript: history.go(-1)”>try again
The username or email is already in use <a href=“javascript: history.go(-1)”>try again
You have successfully registered! <a href=“login.php”>Login.

Your browser does not support JavaScript!
Alralahur - 25% less money needed for next level of Unit production
Berrakra - 25% attack bonus
Chajajende - 25% defense bonus
Hialaem - 35% spy & assassinate bonus
Mindassa - 60% cheaper residential,commercial,industrial and mining areas
Qarenyon - 30% more cash from mining area
Slarkaith - 25% more cash from commerce area
[/php]

Looks to me like your webhost doesn’t allow PHP.

The other way round, you don’t have php setup properly on your computer for localhost.

Sponsor our Newsletter | Privacy Policy | Terms of Service