i have created a database called u635743540_spell and a table called english.but when i add the following code in sql i get error
#1045 - Access denied for user ‘u635743540_spell’@‘localhost’ (using password: YES)
[php]LOAD DATA INFILE
‘http://pakiz.cixx6.com/english.txt’ INTO
TABLE u635743540_spell
.english
[/php]
plz help me in this i need help.
Can you paste in the lines for connecting to the database (PLEASE REMOVE THE PASSWORD).
Are you sure that the username and password that you are using are correct?
this code is used to acces db
[php]<?php
mysql_connect(‘mysql.cixx6.com’,‘u635743540_spell’,‘password’
mysql_select_db(‘u635743540_spell’)
?>[/php]
The code should look like this (you had two semi-colons and a bracket missing):
[php]<?php
mysql_connect(‘mysql.cixx6.com’,‘u635743540_spell’,‘password’);
mysql_select_db(‘u635743540_spell’);
?>[/php]
Do you get any errors from this part of the code or is the one that you posted the only one?
Thanks for correcting my code but when i paste the code in sql(the code which i have given above)i still get errors that i mentioned above.
The MySQL error states @‘localhost’ which is not correct - it should be using the host that you specified in mysql_connect. Can you post the full code?
it is my index of spell checker code
[php]<?php
error_reporting(E_ALL);
require ‘db.php’;
function spellcheck($word) {
$ourput = array();
$word = mysql_real_escape_string($word);
$word_exists= mysql_query(“SELECT COUNT(‘word’) FROM ‘english’ WHERE ‘word’ = ‘$word’”);
$words = mysql_query(“SELECT ‘word’ FROM ‘english’ WHERE SUBSTRING(‘word’, 1,1) = '”.mysql_real_escape_string(substr($word, 0, 1)."’");
if (mysql_result($word_exists, 0) == 0) {
while(($words_row = mysql_fetch_assoc($words)) !== false ) {
similar_text{$word,$words_row['word'], $percent);
if ($percent > 82) {
$output[] = $words_row['word'];
}
}
}
return (empty($output)) ? false : $output;
}
if (isset($_GET[‘word’]) && trim($_GET[‘word’]) !=null) {
$word = $_GET[‘word’];
$spellcheck = spellcheck($word);
if ($spellcheck !== false) {
echo ‘
’, print_r($spellcheck, true), ‘’;
} else if ($spellcheck == false) {
echo ‘
, $word, ’ spelled correctly,or no suggestions found.
’;}
}
?>
Check single word spelling:[/php]
plz help me
You could try resetting the MySQL password and then setting the mysql_connect to use that. That’s the only thing I can think of.