Bern42 Posted November 3, 2006 Share Posted November 3, 2006 <? include('config.php'); include('mysql.php'); include('inc_search.php');?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><TITLE>Player Search</TITLE><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><LINK href="nball.css" type=text/css rel=stylesheet><script src="nball.js" type=text/javascript></SCRIPT></head><body id="viewPlayer"><div id="mainbox"><div id="topheading">Player Search</div><div id="blackspacer"><center><img src=logo.gif></img></center><br><div id="box"><? include("menu.php"); ?></div></div><div id="contentbox"><? createSearchBox($HTTP_POST_VARS); if ($submit == 1) { $sql = createSQL($HTTP_POST_VARS); $db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false); $result = $db->sql_query($sql); $row = $db->sql_fetchrowset($result); createTeamLineup($row); }?></div><!-- div:contentbox--></div><!-- div:box --><? include('footer.php'); ?></body></html> Hi Im bern and Im new at PHP scripting I got this League Manager I did but I still have errors on some of my pages I think its on the connection of database. Could some one tell me what the problem and help me solve the script error... Thanks hope to hear it from you soon... Link to comment Share on other sites More sharing options...
shiftJIS Posted November 3, 2006 Share Posted November 3, 2006 You're using a user-defined function createSQL() that's probably defined in mysql.php - and we can only guess at what the contents are. What I mean is, other than giving you wild guesses - we can't help you at this point.If mysql.php isn't too long, consider posting that. MORE IMPORTANTLY, post the actual error message you get - or describe whatever deviant behavior you're seeing on the site. Link to comment Share on other sites More sharing options...
jlhaslip Posted November 3, 2006 Share Posted November 3, 2006 And quite possibly the config.php will contain the information you need for the connection as CONSTANTS, so list that, too, please. Link to comment Share on other sites More sharing options...
Bern42 Posted November 4, 2006 Author Share Posted November 4, 2006 <?$dbms = 'mysql';$dbhost = 'localhost';$dbname = 'databasename';$dbuser = 'username';$dbpasswd = 'password';$table_prefix = '';?> CONFIG.phpWill I change the dbhost, dbname, dbuser, dbpasswd preferneces to my Database fields? Thanks Link to comment Share on other sites More sharing options...
jlhaslip Posted November 4, 2006 Share Posted November 4, 2006 Yes. Make sure to CREATE a Database and db-user to match what you have editted this file to be, before running the script.Hope this helps. Link to comment Share on other sites More sharing options...
Bern42 Posted November 4, 2006 Author Share Posted November 4, 2006 But What will I put on the Table Prefix?Thanks.. It seems your a good PHP Programmer would you suggest any other books to learn more about PHP what i mean the complete.. Yeah W3School helped me on PHP scripting but I need some reference to read when Im in school or not online... Thanks.. Link to comment Share on other sites More sharing options...
MinusMyThoughts Posted November 5, 2006 Share Posted November 5, 2006 This book was recommended to me when i asked the same question.love,jason Link to comment Share on other sites More sharing options...
jlhaslip Posted November 5, 2006 Share Posted November 5, 2006 But What will I put on the Table Prefix?Thanks.. It seems your a good PHP Programmer would you suggest any other books to learn more about PHP what i mean the complete.. Yeah W3School helped me on PHP scripting but I need some reference to read when Im in school or not online... Thanks..You could use anything for the prefix, like "mydb" or "schwartz", just a text string to identify the tables for the application is required.Pick up a copy of : PHP and MYSQL for Dynamic Websites, by Larry Ullman, Author. I think it is Peachpit Press, or something. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now