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
https://forums.phpfreaks.com/topic/13975-underscores-problems/
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
https://forums.phpfreaks.com/topic/13975-underscores-problems/#findComment-54515
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
https://forums.phpfreaks.com/topic/13975-underscores-problems/#findComment-54527
Share on other sites

Archived

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

×
×
  • 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.