Jump to content

Error please help


rydog

Recommended Posts

It means that you have an unexpected ';'. You need to look at the lines where it gives you the error and look for an extra ';' or some syntax error near that line.

 

If you can't find it your self, post the problem area.

 

e.g. if the error is on line 20, give us lines 15 through 25.

Link to comment
Share on other sites

ok well the line is 12 here is the whole thing

<?php

session_start();

require "global_func.php";

if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }

$userid=$_SESSION['userid'];

require "header.php";

$h = new headers;

$h->startheaders();

include "mysql.php";

global $c;

$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c)or die(mysql_error());

$ir=mysql_fetch_array($icheck_level();

$fm=money_formatter($ir['money']);

$cm=money_formatter($ir['crystals'],'');

$lv=date('F j, y, g:i a',$ir['laston']);

$h->userdata($ir,$lv,$fm,$cm);

$h->menuarea();

<h3>Search for a Business</h3>

<b>Stuck?, Need to find a business? Well look no further.</b>

<form action='businessview.php'>

<input type='text' name='ID' value=''>

<input type='submit' value='Go!'>

</form>

EOF;

$h->endpage();

?>

 

Link to comment
Share on other sites

Try this.

 

<?php
session_start();
require "global_func.php";

if($_SESSION['loggedin']==0) {
header("Location: login.php");
exit;
}

$userid=$_SESSION['userid'];
require "header.php";
$h = new headers;
$h->startheaders();
include "mysql.php";
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c)or die(mysql_error());
$ir=mysql_fetch_array($icheck_level();
$fm=money_formatter($ir['money']);
$cm=money_formatter($ir['crystals'],'');
$lv=date('F j, y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm,$cm);
$h->menuarea();

echo "<h3>Search for a Business</h3>";
echo "Stuck?, Need to find a business? Well look no further.";
echo '
<form action='businessview.php'>
<input type='text' name='ID' value=''>
<input type='submit' value='Go!'>
</form>';
EOF;
$h->endpage();
?>

Link to comment
Share on other sites

Ahh. I dont think the echo was the only problem, you forgot another ) on the end of the $ir=mysql.... line. Try this:

 

<?php
session_start();
require "global_func.php";
if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }
$userid=$_SESSION['userid'];
require "header.php";
$h = new headers;
$h->startheaders();
include("mysql.php");
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c)or die(mysql_error());
$ir=mysql_fetch_array($icheck_level());
$fm=money_formatter($ir['money']);
$cm=money_formatter($ir['crystals'],'');
$lv=date('F j, y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm,$cm);
$h->menuarea();
?>

<h3>Search for a Business</h3>
Stuck?, Need to find a business? Well look no further.
<form action='businessview.php'>
<input type='text' name='ID' value=''>
<input type='submit' value='Go!'>
</form>

<?php
EOF;
$h->endpage();
?>

Link to comment
Share on other sites

ok well that didnt work either grrrrrrrr. i have been up all night trying to figure this out.

Fatal error: Cannot redeclare money_formatter() (previously declared in /home/br4cutav/public_html/global_func.php:2) in /home/br4cutav/public_html/global_func.php on line 2

 

Link to comment
Share on other sites

Try this real quick... Just to check the include...

<?php
session_start();
require "global_func.php";
if($_SESSION['loggedin']==0) { header("Location: login.php");exit(); } // isn't exit a function?
$userid=$_SESSION['userid'];
require "header.php";
$h = new headers;
$h->startheaders();
//include("mysql.php");
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c)or die(mysql_error());
$ir=mysql_fetch_array($icheck_level());
$fm=money_formatter($ir['money']);
$cm=money_formatter($ir['crystals'],'');
$lv=date('F j, y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm,$cm);
$h->menuarea();
?>

<h3>Search for a Business</h3>
Stuck?, Need to find a business? Well look no further.
<form action='businessview.php'>
<input type='text' name='ID' value=''>
<input type='submit' value='Go!'>
</form>

<?php
EOF;
$h->endpage();
?>

 

 

Link to comment
Share on other sites

ok well that didnt work either grrrrrrrr. i have been up all night trying to figure this out.

Fatal error: Cannot redeclare money_formatter() (previously declared in /home/br4cutav/public_html/global_func.php:2) in /home/br4cutav/public_html/global_func.php on line 2

 

It would seem for every error corrected, there's a new one waiting. In my opinion, I would just go through each file again and make sure everything is correct.

Link to comment
Share on other sites

Is there a closing ?> after line 17 and before that?  If not, that'll cause a problem since h3 isn't valid php.

 

 

And remove the EOF; (an orphan in your closing php), since there's nothing wrong with the line reporting the error.

Link to comment
Share on other sites

1.<?php

2.session_start();

3.require "global_func.php";

4.if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }

5.$userid=$_SESSION['userid'];

6.require "header.php";

7.$h = new headers;

8.$h->startheaders();

9.include "globals.php";

10.global $c;

11.$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c)or die (mysql_error());

12.$ir=mysql_fetch_array($icheck_level());

13.$fm=money_formatter($ir['money']);

14.$cm=money_formatter($ir['crystals'],'');

15.$lv=date('F j, y, g:i a',$ir['laston']);

16.$h->userdata($ir,$lv,$fm,$cm);

17.$h->menuarea();

18.<h3>Search for a Business</h3>

19.<b>Stuck?, Need to find a business? Well look no further.</b>

20.<form action='businessview.php'>

21.<input type='text' name='ID' value=''>

22.<input type='submit' value='Go!'>

23.</form>

24.EOF;

25.$h->endpage();

26.?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.