getting this error:

Parse error: syntax error, unexpected T_VARIABLE in index.php on line 3

here's the code:

<?php
include("budget.php");
include("user.php");
?>
<html>
<head>
	<link rel="stylesheet" type="text/css" href="style.css">
</head>

<body>
<div id="container">
<a href="user.php?action=register">Register</a><br/>
<a href="action.php?function=transaction" id="add"><img border="0" src="img/plus-icon_small.jpg" alt="+" width="30" height="30"/> </a><br/>

<?php
if(isset($_GET['month']))
	$month = $_GET['month'];
else
	$month = date('m');

if(isset($_GET['year']))
	$year = $_GET['year'];
else
	$year = date('Y');

listTransactions($month, $year);
?>

<a href="action.php?function=balance">Set Balance</a>
<a href="action.php?function=transaction">Add Transaction</a><br/>
</div>
</body>
</html>

.
I'm sort of new to working on an actual host (Hostgator.) This works just fine on my XAMPP setup on my home machine, not on the host. I'm guessing there's something in their ini files but I have no idea where to start looking.

getting this error:

Parse error: syntax error, unexpected T_VARIABLE in index.php on line 3

here's the code:

<?php
include("budget.php");
include("user.php");
?>
<html>
<head>
	<link rel="stylesheet" type="text/css" href="style.css">
</head>

<body>
<div id="container">
<a href="user.php?action=register">Register</a><br/>
<a href="action.php?function=transaction" id="add"><img border="0" src="img/plus-icon_small.jpg" alt="+" width="30" height="30"/> </a><br/>

<?php
if(isset($_GET['month']))
	$month = $_GET['month'];
else
	$month = date('m');

if(isset($_GET['year']))
	$year = $_GET['year'];
else
	$year = date('Y');

listTransactions($month, $year);
?>

<a href="action.php?function=balance">Set Balance</a>
<a href="action.php?function=transaction">Add Transaction</a><br/>
</div>
</body>
</html>

.
I'm sort of new to working on an actual host (Hostgator.) This works just fine on my XAMPP setup on my home machine, not on the host. I'm guessing there's something in their ini files but I have no idea where to start looking.

That error doesn't make a lot of sense pertaining to this script here. Are you sure that there isn't some type of confusion as to which script you are suppose to be debugging. If not and you are sure then I would contact hostgator, if that's even possible, and get them to tell you what is wrong with it. I don't see any syntax errors here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.