Can't get MySQL data to show up on php page locally

I just went through this tutorial by Lee Brimelow http://library.creativecow.net/articles/brimelow_lee/php_mysql/video-tutorial.php

I am using MAMP pro and followed everything step by step very carefully but when I go to view my products.php page locally nothing shows up on the page…nothing in the page source either. I’m not quite sure what exactly is wrong with what I did, I did use a blank php page in dreamweaver instead of his program that he used to write the php code but i feel like that shouldn’t have anything to do with it. I used a different database name than he did…everything else seems to be the same. Only I’m using dreamweaver, MAMP Pro, and viewing it locally.

Kinda have to give us some more to go on than that buddy. Make sure your local php server compiles properly with hello world echos and then show the code! : )

my bad, here’s the code:

<?PHP

$link = mysql_connect("localhost","root","root");
mysql_select_db ("store");

$query = 'SELECT * FROM products';
$results = mysql_query($query);

echo "<?xml version=\"1.0\"?>
";
echo = "<products>
";

while($line = mysql_fetch_assoc($results)) {
    
    echo "<item>" . $line["product"] . "</item>
";
}

echo "</products
";

mysql_close($link);

?>

How do i make sure it complies with hello world echos?

Make a php file that looks like this;


<?php

echo "HAY WORLD";

?>

See if you get anything from it :wink:

In addition; there’s a couple of typos in your code. Do you have any error reporting on? (error_reporting(E_ALL)) for example.

[quote=sekasi;2357613]Make a php file that looks like this;


<?php

echo "HAY WORLD";

?>

See if you get anything from it :wink:

In addition; there’s a couple of typos in your code. Do you have any error reporting on? (error_reporting(E_ALL)) for example.[/quote]

That worked…what typos do u notice?

Turn on error reporting and paste the error you get pls :o

i pasted (error_reporting(E_ALL)) in between the php tags in my products.php file. Still nothing showed up when i went to the page after i saved it.