ik ben net begonnen met het leren van PHP dus zit ik al gauw vast als er een error is.
Ik probeer wat uit m'n database te halen maar ik krijgen een error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\domains\yilkee.com\wwwroot\pm\archief\test2.php on line 18
hier is mijn code
Heb naar mijn weten gedaan zoals de tutorial dat aangeef.
PLZ help php n00b
Ik probeer wat uit m'n database te halen maar ik krijgen een error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\domains\yilkee.com\wwwroot\pm\archief\test2.php on line 18
hier is mijn code
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| <?php // You just need to configure these 4 variables to match your server. $db_host = "localhost"; // mySQL database host $db_user = "pm"; // mySQL database user $db_password = "123456"; // mySQL database password $db_name = "proj8"; // the name of your mySQL database ?> <html> <head> <title>ophaal test</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php // Lets connect to our database. $db = mysql_connect($db_host,$db_user,$db_password) or die(mysql_error()); // Select the database. mysql_select_db($db_name) or die(mysql_error()); // Set the query as $query, and get the last 10 posts. $query = "SELECT * FROM projectlid order by id DESC"; $result = mysql_query($query); while($ophalen=mysql_fetch_array($result)) { // To modify the appearance, edit this : echo $ophalen[email]; } ?> </body> </html> |
Heb naar mijn weten gedaan zoals de tutorial dat aangeef.
PLZ help php n00b
Assume there are no rules and it's one big free for all