Sherry Rzv
asked on
How to connect PHPmyadmin to Flash CS4 using localhost
I am using wampserver, to run phpMyadmin. Phpmyadmin is working fine, and i have created the website without any problem. But i have run into a problem. Im basically following the tutorial below:
http://library.creativecow.net/articles/brimelow_lee/php_mysql/video-tutorial.php
My aim is to create a PHP file that will link with Flash CS4. But when testing the PHP file in a browser, which is an instruction of the tutorial, the database does not dispaly.
Two reasons why I think it may not work, I am a bit new to this, so am unsure if this is correct;
I am running it of local host to connect the php file to a flash file using localhost is not possible???
The PHP coding is incorrect? although I have followed exactly what the tutorial said. NOTE: I have not used a password on the database on phpmyadmin, I tried to set it up a few times by going to privileges but this does not seem to work.
The code has been provided.
Kindly advise.
http://library.creativecow.net/articles/brimelow_lee/php_mysql/video-tutorial.php
My aim is to create a PHP file that will link with Flash CS4. But when testing the PHP file in a browser, which is an instruction of the tutorial, the database does not dispaly.
Two reasons why I think it may not work, I am a bit new to this, so am unsure if this is correct;
I am running it of local host to connect the php file to a flash file using localhost is not possible???
The PHP coding is incorrect? although I have followed exactly what the tutorial said. NOTE: I have not used a password on the database on phpmyadmin, I tried to set it up a few times by going to privileges but this does not seem to work.
The code has been provided.
Kindly advise.
<?PHP
$link = mysql_connect("localhost","root");
mysql_select_db("qof_codes");
$query = 'SELECT * FROM disease_type';
$results = mysql_query($query);
echo "<?xml version=\"1.0\"?>\n";
echo "<disease_type>\n";
while($line = mysql_fetch_assoc($results)) {
echo "<item>" . $line["product"] . "</item>\n";
}
echo "</products>\n";
mysql_close($link);
?>
ASKER
Thanks for your reply, so basically, I have to replace the above, into the the code? sorry for the q.
ASKER
Hi there, I followed the code you suggested.
This is what I got:
Not Found
The requested URL /Untitled-1.php was not found on this server.
Below is the reviewed code as I interpreted. Also inlcuded a screenshot of the PHP runnning in Dreamweaver. Kindly adivse
This is what I got:
Not Found
The requested URL /Untitled-1.php was not found on this server.
Below is the reviewed code as I interpreted. Also inlcuded a screenshot of the PHP runnning in Dreamweaver. Kindly adivse
<?PHP
$link = mysql_connect("localhost","root", "??password??");
mysql_select_db("qof_codes");
$query = 'SELECT * FROM disease_type';
$results = mysql_query($query);
echo "<?xml version=\"1.0\"?>\n";
echo "<disease_type>\n"; <<<<< <disease_type>
while($line = mysql_fetch_assoc($results)) {
echo "<item>" . $line["product"] . "</item>\n";
}
echo "</products>\n"; <<<<<< </disease_type> ??
mysql_close($link);
?>
PHP.doc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
2. echo "<disease_type>\n"; <<<<< <disease_type>
while($line = mysql_fetch_assoc($results
echo "<item>" . $line["product"] . "</item>\n";
}
echo "</products>\n"; <<<<<< </disease_type> ??