Jump to content

Beginner!


mrjoaopereira

Recommended Posts

Hi guys, sorry for the beginner issues here.

after following a tutorial i come across a little problem!

Everything works just fine, no errors but my page source only shows the xml tags and not the actual products

 

<?php

 

$link = mysql_connect("localhost","Joao","password");

mysql_select_db("brimelow_store");

 

$query = 'SELECT * FROM products';

$results = mysql_query($query);

 

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

echo "<products>\n";

 

while ($line = mysql_fetch_assoc($results)); {

echo "<item>" . $line["product"] . "</item>\n";

}

 

echo "</products>\n";

 

mysql_close($link);

 

?>

 

source =

 

<?xml version="1.0"?>

<products>

<item></item>

</products>

 

I have checked the database names and they all match... im confused. can i get some help pls?

Link to comment
https://forums.phpfreaks.com/topic/216986-beginner/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.