SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: Database Connection & Extraction
-
May 7, 2003, 12:36 #1
- Join Date
- Jun 2001
- Location
- Harlow, Essex, UK
- Posts
- 426
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Database Connection & Extraction
At the moment, I am just trying to extract info from a MySQL database through Flash via a PHP script. The script is:
PHP Code:<?php
include ('include.inc');
mysql_connect($DBhost,$DBuser,$DBpass);
@mysql_select_db("$DBName");
$query = "SELECT value FROM content WHERE field = 'FrontPageNews'";
$result = mysql_query($query);
$value = mysql_result($result,0,"value");
print "&value=$value";
?>Code:loadVariablesNum("php/read.php", 0, "POST"); stop();
It does, however, work when I use the following PHP script, but it's not extracting the info from a database though:PHP Code:<?php
include ('include.inc');
mysql_connect($DBhost,$DBuser,$DBpass);
@mysql_select_db("$DBName");
$query = "SELECT value FROM content WHERE field = 'FrontPageNews'";
$result = mysql_query($query);
$value = mysql_result($result,0,"value");
$test_msg = "hello";
$test = "&value=$test_msg";
print "$test";
?>
Any Ideas?
-
May 12, 2003, 03:55 #2
- Join Date
- Apr 2003
- Posts
- 181
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
When you test in Flash, open up the variables window and have a look - do you see anything that's come back from the server?
If you're sure the PHP script is fine, then chances are that there is a character in the returned $value variable that is preventing the display of the text in Flash: ' for example.Check the latest on GeniusStartup.com
Affiliate Marketing for Beginners
How to Buy a Great Domain Name
How to Get a Kick-Ass Web Design for Under $99
Bookmarks