943,078 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 791
  • PHP RSS
Mar 13th, 2010
0

Parse Error?

Expand Post »
getting this error:

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

here's the code:

PHP Syntax (Toggle Plain Text)
  1. <?php
  2. include("budget.php");
  3. include("user.php");
  4. ?>
  5. <html>
  6. <head>
  7. <link rel="stylesheet" type="text/css" href="style.css">
  8. </head>
  9.  
  10. <body>
  11. <div id="container">
  12. <a href="user.php?action=register">Register</a><br/>
  13. <a href="action.php?function=transaction" id="add"><img border="0" src="img/plus-icon_small.jpg" alt="+" width="30" height="30"/> </a><br/>
  14.  
  15. <?php
  16. if(isset($_GET['month']))
  17. $month = $_GET['month'];
  18. else
  19. $month = date('m');
  20.  
  21. if(isset($_GET['year']))
  22. $year = $_GET['year'];
  23. else
  24. $year = date('Y');
  25.  
  26. listTransactions($month, $year);
  27. ?>
  28.  
  29. <a href="action.php?function=balance">Set Balance</a>
  30. <a href="action.php?function=transaction">Add Transaction</a><br/>
  31. </div>
  32. </body>
  33. </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.
Last edited by dillyfresh; Mar 13th, 2010 at 9:51 pm.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dillyfresh is offline Offline
2 posts
since Mar 2010
Mar 14th, 2010
0
Re: Parse Error?
Click to Expand / Collapse  Quote originally posted by dillyfresh ...
getting this error:

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

here's the code:

PHP Syntax (Toggle Plain Text)
  1. <?php
  2. include("budget.php");
  3. include("user.php");
  4. ?>
  5. <html>
  6. <head>
  7. <link rel="stylesheet" type="text/css" href="style.css">
  8. </head>
  9.  
  10. <body>
  11. <div id="container">
  12. <a href="user.php?action=register">Register</a><br/>
  13. <a href="action.php?function=transaction" id="add"><img border="0" src="img/plus-icon_small.jpg" alt="+" width="30" height="30"/> </a><br/>
  14.  
  15. <?php
  16. if(isset($_GET['month']))
  17. $month = $_GET['month'];
  18. else
  19. $month = date('m');
  20.  
  21. if(isset($_GET['year']))
  22. $year = $_GET['year'];
  23. else
  24. $year = date('Y');
  25.  
  26. listTransactions($month, $year);
  27. ?>
  28.  
  29. <a href="action.php?function=balance">Set Balance</a>
  30. <a href="action.php?function=transaction">Add Transaction</a><br/>
  31. </div>
  32. </body>
  33. </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.
Reputation Points: 10
Solved Threads: 13
Junior Poster
OS_dev is offline Offline
108 posts
since Feb 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: POSTING variables with the Google Calendar API
Next Thread in PHP Forum Timeline: PHP coding for a Search Field on Drupal





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC