lordphate Posted July 7, 2006 Share Posted July 7, 2006 Okay so...I'm getting an error :Parse error: syntax error, unexpected T_STRING in /*/*/*/library/db.php on line 5Okay now here's line five$user='longlive_arshem'; //user name for MySQL databaseNow 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 Quote Link to comment https://forums.phpfreaks.com/topic/13975-underscores-problems/ Share on other sites More sharing options...
kenrbnsn Posted July 7, 2006 Share Posted July 7, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/13975-underscores-problems/#findComment-54513 Share on other sites More sharing options...
birdie Posted July 7, 2006 Share Posted July 7, 2006 Also, a file may have been included.. Quote Link to comment https://forums.phpfreaks.com/topic/13975-underscores-problems/#findComment-54514 Share on other sites More sharing options...
lordphate Posted July 7, 2006 Author Share Posted July 7, 2006 [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] Quote Link to comment https://forums.phpfreaks.com/topic/13975-underscores-problems/#findComment-54515 Share on other sites More sharing options...
.josh Posted July 7, 2006 Share Posted July 7, 2006 show the code that includes this file. Quote Link to comment https://forums.phpfreaks.com/topic/13975-underscores-problems/#findComment-54522 Share on other sites More sharing options...
lordphate Posted July 7, 2006 Author Share Posted July 7, 2006 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 bein the State of Nevada only and, in addition, you hereby consent tothe jurisdiction of the federal in the State of Nevada. You may notassign your rights under this Agreement to any third party. TheProvider's failure to enforce any provision of these Terms of Useshall not be construed as a waiver of any provision or the right toenforce same. If any portion of these Terms of Use are held to beinvalid, such holdings shall not invalidate the other provisions ofthese 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> </p></body></html></div><?php include ('footer.php'); exit;} }?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/13975-underscores-problems/#findComment-54527 Share on other sites More sharing options...
GingerRobot Posted July 7, 2006 Share Posted July 7, 2006 [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. Quote Link to comment https://forums.phpfreaks.com/topic/13975-underscores-problems/#findComment-54528 Share on other sites More sharing options...
lordphate Posted July 7, 2006 Author Share Posted July 7, 2006 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"); Quote Link to comment https://forums.phpfreaks.com/topic/13975-underscores-problems/#findComment-54529 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.