displaying mysql database in php

proJ

Hi, just wondering where I seem to be going wrong? It looks ok to me, I'm fairly new to php so I'm using tutorials.

I keep getting this error:

Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in G:\xampp\htdocs\xampp\Assignment\reports.php on line 60

this is a small college project so I know about it being weak against mysql injection.

should be inserting field names from my table anywhere??

    <!DOCTYPE html>
<html lang="en">
<head>
<title> Exercise 3</title>
<meta charset="utf-8">
</head>
<body>
<?php
    $name = “Frank”;
    $age = “28”;
    var_dump($name);
    echo "<br>";
    print_r($name);
    echo "<br>";
    var_dump($age);
    echo "<br>";
?>
</body>
</html>
meagar

Check your return values.

mysql_query:

For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, mysql_query() returns a resource on success, or FALSE on error.

$userdata = mysql_query($order); has returned a boolean false, indicating an error occurred. You've then invoked mysql_fetch_row and passed that boolean false in, hence your error.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

php ,mysql image is not displaying from database

From Dev

Displaying Categories and Subcategories in PHP from MySQL database

From Dev

Fetching data from MySQL database using PHP, Displaying it in a form for editing

From Dev

Displaying results from mysql database in a html/php table

From Dev

Displaying results from mysql database in a html/php table

From Dev

Displaying data in table format from mysql database with php loop

From Dev

Fetching images from mysql database using php and displaying in gridview in android

From Dev

decoding json from mysql database and displaying it on a table php

From Dev

Displaying MySQL in PHP

From Dev

Address and Coordinates not displaying in Mysql database

From Dev

Address and Coordinates not displaying in Mysql database

From Dev

Displaying data from mysql database

From Dev

image url in database not displaying in php

From Dev

PHP/MYSQL not displaying like HTML

From Dev

Displaying an image in PHP from MYSQL?

From Dev

Mysql/PHP error: not displaying $username

From Dev

Displaying Products from Mysql PHP

From Dev

Displaying date from mysql in php

From Dev

Database logic advice needed for saving and displaying pages with sub-pages in Laravel / PHP / MySQL

From Dev

Need help displaying certain data in a MYSQL Database

From Dev

Prevent duplicates displaying categories from mysql database

From Dev

displaying a message when value is not found in mysql database

From Dev

PHP not displaying time from database correctly

From Dev

Avoid displaying duplicate results in PHP from database

From Dev

Displaying a PHP variable from Database along with HTML

From Dev

Php code not displaying the data right from database

From Dev

PHP MYSQL - Displaying multi threaded comments not working

From Dev

How to Simplify MySQL Error Before Displaying it in PHP?

From Dev

Retrieving and displaying data from MySql in PhP

Related Related

  1. 1

    php ,mysql image is not displaying from database

  2. 2

    Displaying Categories and Subcategories in PHP from MySQL database

  3. 3

    Fetching data from MySQL database using PHP, Displaying it in a form for editing

  4. 4

    Displaying results from mysql database in a html/php table

  5. 5

    Displaying results from mysql database in a html/php table

  6. 6

    Displaying data in table format from mysql database with php loop

  7. 7

    Fetching images from mysql database using php and displaying in gridview in android

  8. 8

    decoding json from mysql database and displaying it on a table php

  9. 9

    Displaying MySQL in PHP

  10. 10

    Address and Coordinates not displaying in Mysql database

  11. 11

    Address and Coordinates not displaying in Mysql database

  12. 12

    Displaying data from mysql database

  13. 13

    image url in database not displaying in php

  14. 14

    PHP/MYSQL not displaying like HTML

  15. 15

    Displaying an image in PHP from MYSQL?

  16. 16

    Mysql/PHP error: not displaying $username

  17. 17

    Displaying Products from Mysql PHP

  18. 18

    Displaying date from mysql in php

  19. 19

    Database logic advice needed for saving and displaying pages with sub-pages in Laravel / PHP / MySQL

  20. 20

    Need help displaying certain data in a MYSQL Database

  21. 21

    Prevent duplicates displaying categories from mysql database

  22. 22

    displaying a message when value is not found in mysql database

  23. 23

    PHP not displaying time from database correctly

  24. 24

    Avoid displaying duplicate results in PHP from database

  25. 25

    Displaying a PHP variable from Database along with HTML

  26. 26

    Php code not displaying the data right from database

  27. 27

    PHP MYSQL - Displaying multi threaded comments not working

  28. 28

    How to Simplify MySQL Error Before Displaying it in PHP?

  29. 29

    Retrieving and displaying data from MySql in PhP

HotTag

Archive