Print and execute the query in phpmyadmin / mysql console. Check the error message.
OR
Use
$rsSelectOnomata=mysql_query("SELECT * FROM titloslimmatos WHERE LimmatikosTypos='$getLima'") or die(mysql_error());
This will print the error message on failure. This is good for testing purpose (and not in the production environment as it exposes your table structure and all that!)
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
Yeah. You don't have mysql_select_db("Databasename"); in your script.
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
Why oh why did I even bother writing the FAQ that answers this very issue if no one is going to read it? It never stops baffling me when I see these posts.
ShawnCplus
Code Monkey
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268
Why oh why did I even bother writing the FAQ that answers this very issue if no one is going to read it? It never stops baffling me when I see these posts.
;) Newbies prefer to skip the first post I believe ! Sigh.
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
sorry.. that was by mistake...
the code of connect.php is:
<?php
$link = mysql_connect('localhost', 'root', '');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_select_db("annadb");
//mysql_close($link);
?>
i run again the file index.php and the result was:Connected successfully
whay it doesn't show me the word that i insert?
Okay! Now I am totally lost. Where are you inserting the values ? Check this link. I hope that link will answer your question.
And pleaseee(eee). Wrap your code in [code=php] code here [/code] tags.
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
Line 16 has echo, but lines 17 to 26 not. if php is in safe mode the error not appear, only show a blank page. May be this help.
This actually isn't an error, it just won't do anything. Those are completely valid statements (like I said, they just don't do anything)
ShawnCplus
Code Monkey
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268