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

Renaming database tables with phpMyAdmin

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

Searching through a database with phpMyAdmin

This tutorial is about searching through a database using phpMyAdmin. We will assume that you are...

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...

Modifying fields in database tables with phpMyAdmin

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

Deleting fields from database tables with phpMyAdmin

This tutorial is going to teach you how to delete fields from database tables using phpMyAdmin....