I have been learning for pHP in few days and
I have problem. And the problem make me very confuse.
I want to show some data from MySQL into my browser Internet Explorer 6.0. But it can't make it.
The result is blank and dids't give me any message of my mistakes.
All the syntax is correct but it can't happen as i want.
This is the syntax.
$sql = "SELECT id, firstname, lastname, spouse_firstname, housenumber, streetname, city, state, zip
FROM $table_name ORDER BY lastname";
$result = @mysql_query($sql, $connection) or die(mysql_error());
$num = @mysql_num_rows($result);
if ($num < 1) {
$display_block = "
Sorry! No results.</p>";
} else {
while ($row = mysql_fetch_array($result)) {
$id = $row['id'];
echo $id;
$firstname = $row['firstname'];
echo $firstname;
$lastname = $row['lastname'];
echo $lastname;
$streetname = $row['streetname'];
echo $streetname;
$city = $row['city'];
echo $city;
$state = $row['state'];
echo $state;
$zip = $row['zip'];
echo $zip;
}
Is there anything mistake at PHP 5.0 ? I use it.
Anyone can help me? Please...
mariocs
Submit Your Article
Forum Rules

Reply With Quote