help needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone!

I hope my request can be answered by someone. I'm new to PHP and whole 
server issue!

I'm trying to test my PHP scripts locally on my PC. It seems 
Apache/PHP/MySql and PhpMyAdmin are working correctly when I test simple php 
files.   Here's the problem :

I have two files:

"display_scores.php"  and  "db.php".

Here's the "display_scores.php"

----------------------------------------------------

<?php

include("db.php");

$table = 'high_score';

mysql_connect ($host, $user, $pass);

mysql_select_db ($database);

$result = mysql_query ( "SELECT * FROM 'high_score' ORDER BY score DESC 
LIMIT 10");

$row = mysql_fetch_array($result);

extract($row);

echo "$player : $score ";

?>

----------------------------------------------------

                            and here's the "db.php" file:

------------------------------------------------------

<?php

$host = '127.0.0.1.:3306';

$user = 'root';

$pass = '1234';

$database = 'cartoon_smart_courses';

$table = 'high_score';

-----------------------------------------------------

When I test the "display_scores.php" on my browser, following messages show:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result 
resource in 
D:\SERVER\Cartoon_smart_series\flash_php_mysql_part1\display_scores.php on 
line 12

Warning: extract() [function.extract]: First argument should be an array in 
D:\SERVER\Cartoon_smart_series\flash_php_mysql_part1\display_scores.php on 
line 13

---------------------------------

Where is the problem? Can someone help? Please?

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux