Jump to content

Underscores = Problems?


lordphate

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
Link to comment
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]
Link to comment
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]
Link to comment
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");
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.