Jump to content

Archived

This topic is now archived and is closed to further replies.

lordphate

Underscores = Problems?

Recommended Posts

Okay so...I'm getting an error :
Parse error: syntax error, unexpected T_STRING in /*/*/*/library/db.php on line 5

Okay now here's line five
$user='longlive_arshem';    //user name for MySQL database


Now im suspecting that The error is in the "_" part of the syntax...I cannot edit the PREFIX of the SQL username and/or databases..so how do i fix this?

Thanks in advance :D

Share this post


Link to post
Share on other sites
Please post about 10 - 15 lines above this line. An error like that usually indicates the error really occured in a previous line.

Please surround your code with [nobbc][code][/code][/nobbc] tags.

Ken

Share this post


Link to post
Share on other sites
Also, a file may have been included..

Share this post


Link to post
Share on other sites
[code]<?php
// MySQL Connection Variables
// Fill in your values for the next 4 lines
$hostname='*';
$user='longlive_arshem';    //user name for MySQL database
$pass='*******';    //Password for database
$dbase='longlive_users';    //database name

$connection = mysql_connect("$hostname" , "$user" , "$pass") or die ("Can't connect to MySQL");
$db = mysql_select_db($dbase , $connection) or die ("Can't select database.");
?>
[/code]

Share this post


Link to post
Share on other sites
All my pages include this page, but its doing it on Index.php....and the code is WAYYYYY to long to post lol...but i'll post 10-15 lines before and after
[code]or claim associated with the Service or the Provider, venue shall be

in the State of Nevada only and, in addition, you hereby consent to

the jurisdiction of the federal in the State of Nevada. You may not

assign your rights under this Agreement to any third party. The

Provider's failure to enforce any provision of these Terms of Use

shall not be construed as a waiver of any provision or the right to

enforce same. If any portion of these Terms of Use are held to be

invalid, such holdings shall not invalidate the other provisions of

these Terms of Use.<br /><br /><br /></div></body> </html> <? include 'footer.php'; } else {

// For register_global on PHP settings
$member = $_COOKIE['member'];
session_start(); // you must put this to read session variables
  if (empty($member) || !isset($member)) // fail to read the browser cookie
{                    include ('header.php'); include ('sidebar.php'); echo('
  <div id="main">

<h1> <center>Under Construction</center> <h1>

  '); include ('footer.php');  exit;

}
  else {

include ('header.php');
include ('sidebar.php');
include './library/sessions.php';

?>
      <div id="main">
<html>
<head>
<title>Long Live PS.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<p>Upload or Download by the links.<br /><br />
By Uploading and Downloading from this site you are agreeing to the <a href="./index.php?page=TOS">terms and conditions</a> </p>
<p>&nbsp;</p>

</body>
</html></div><?php
include ('footer.php'); exit;}
                          }
?>[/code]

Share this post


Link to post
Share on other sites
[quote]
Parse error: syntax error, unexpected T_STRING in /*/*/*/library/db.php on line 5
[/quote]

Well the error says it is in db.php, so we are going to need to see that.

Share this post


Link to post
Share on other sites
That's what the little code was...but i just re-wrote it to :
$dbh=mysql_connect ("localhost", "longlive_arshem", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("longlive_users");

Share this post


Link to post
Share on other sites

×

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.