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

**URL:** https://forum.kirupa.com/t/cant-get-mysql-data-to-show-up-on-php-page-locally/265811
**Category:** programming
**Created:** [July 12, 2008, 9:00pm UTC](https://forum.kirupa.com/t/cant-get-mysql-data-to-show-up-on-php-page-locally/265811 "2008-07-12T21:00:28Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![mrflume](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@mrflume](https://forum.kirupa.com/u/mrflume)
#### Post date: [July 12, 2008, 9:00pm UTC](https://forum.kirupa.com/t/cant-get-mysql-data-to-show-up-on-php-page-locally/265811/1 "2008-07-12T21:00:28Z")

</div>

I just went through this tutorial by Lee Brimelow [http://library.creativecow.net/articles/brimelow\_lee/php\_mysql/video-tutorial.php](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.

---

<div class="post-metadata">

### Author: ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)
#### Post date: [July 12, 2008, 9:15pm UTC](https://forum.kirupa.com/t/cant-get-mysql-data-to-show-up-on-php-page-locally/265811/2 "2008-07-12T21:15:03Z")

</div>

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! : )

---

<div class="post-metadata">

### Author: ![mrflume](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@mrflume](https://forum.kirupa.com/u/mrflume)
#### Post date: [July 12, 2008, 9:34pm UTC](https://forum.kirupa.com/t/cant-get-mysql-data-to-show-up-on-php-page-locally/265811/3 "2008-07-12T21:34:14Z")

</div>

> [@sekasi;2357594](#):
>
> 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:

```auto
<?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?

---

<div class="post-metadata">

### Author: ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)
#### Post date: [July 12, 2008, 9:40pm UTC](https://forum.kirupa.com/t/cant-get-mysql-data-to-show-up-on-php-page-locally/265811/4 "2008-07-12T21:40:57Z")

</div>

Make a php file that looks like this;

```php

<?php

echo "HAY WORLD";

?>

```

See if you get anything from it 😉

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

---

<div class="post-metadata">

### Author: ![mrflume](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@mrflume](https://forum.kirupa.com/u/mrflume)
#### Post date: [July 12, 2008, 9:56pm UTC](https://forum.kirupa.com/t/cant-get-mysql-data-to-show-up-on-php-page-locally/265811/5 "2008-07-12T21:56:24Z")

</div>

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

```php

<?php

echo "HAY WORLD";

?>

```

See if you get anything from it 😉

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?

---

<div class="post-metadata">

### Author: ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)
#### Post date: [July 12, 2008, 9:57pm UTC](https://forum.kirupa.com/t/cant-get-mysql-data-to-show-up-on-php-page-locally/265811/6 "2008-07-12T21:57:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![mrflume](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@mrflume](https://forum.kirupa.com/u/mrflume)
#### Post date: [July 12, 2008, 10:11pm UTC](https://forum.kirupa.com/t/cant-get-mysql-data-to-show-up-on-php-page-locally/265811/7 "2008-07-12T22:11:43Z")

</div>

> [@sekasi;2357619](#):
>
> 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.
