[Help] FataL eRroR!!!!!

Newbie Spellweaver
Joined
Jan 30, 2009
Messages
39
Reaction score
0
i found this on my website can someone help?


this is it: Fatal error: Call to undefined function mysql_connect() in D:\appserv\www\config.php on line 9
 
open up config.php look on line 9
Code:
<?php
// By PeChU!! 
if(stristr($_SERVER['PHP_SELF'], "config.php")) die('asdada'); 
$host = "localhost"; // host mysql
$user = "root"; // mysql username
$pass = "1234"; // mysql password
$db = "flyff"; // mysql db

mysql_connect($host,$user,$pass) or die(mysql_error());
mysql_select_db($db) or die(mysql_error());

function nw($N, $C){
  $reg = mysql_query("INSERT INTO accounts (username, password, accesslevel) VALUES( '$N', '$C', '100')")or die(mysql_error());
  return $reg;
  }
function exi($user){
$check = mysql_query("SELECT * FROM accounts WHERE username = '$user'");
$check2 = mysql_num_rows($check);
return $check2;
}
  
  ?>
make shure it looks somthing like that
$host = "localhost"; // host mysql localhost is default
$user = "YOUR MYSQL USERNAME"; // mysql username
$pass = "YOUR MYSQL PASSWORD"; // mysql password
$db = "YOUR SQL DATABASE"; // mysql db
replace the capitals
 
Wrong.
Undefined function means the function does not exist. His PHP was not compiled with MySQL support. 10lols.
 
i found this on my website can someone help?


this is it: Fatal error: Call to undefined function mysql_connect() in D:\appserv\www\config.php on line 9

Wrong.
Undefined function means the function does not exist. His PHP was not compiled with MySQL support. 10lols.

im pritty shure its saying it cant define whats on line 9 and then it cant connect to mysql
 
Which program are you using to host? Most webhosts(if not all) have mysql functions integrated into php. Most people use xampp or another amp program. They are the easiest for beginners and I recommend them, but it is much better to install mysql as a service separately.
 
Back