Data in a MySQL database is not showing, but I get no error.

This is most likely due to the PHP register_globals option being disabled. Register_globals allows one to use the same variables accross different web based programming languages. For example, form variables can be used as PHP variables, and PHP variables can be used as MySQL variables (IE: to call a specific row).

To fix this change the following (where the variables used is called 'id':

"SELECT * FROM properties WHERE id = $id"

To this:
"SELECT * FROM properties WHERE id = '" . $_GET['id']. "'"

This way it takes an action to retreive the PHP variables 'id' rather than assuming it already recognizes the variable 'id'.

Was this answer helpful?

 Print this Article

Also Read

Modifying fields in database tables with phpMyAdmin

The purpose of this tutorial is to teach you how to modify fields in database tables with...

Running SQL queries on a database with phpMyAdmin

This tutorial is to teach you how to run SQL queries on a database with phpMyAdmin. We will...

Creating tables in a database with phpMyAdmin

This tutorial is going to teach you how to create a table in a database with phpMyAdmin. We are...

Deleting tables in a database with phpMyAdmin

This tutorial is to teach you about specific operations in phpMyAdmin. We are going to learn how...

Renaming database tables with phpMyAdmin

The purpose of this tutorial is to teach you how to rename database tables with phpMyAdmin. We...