Extracting from a Database using PHP / Flash

The book that I have is the same one as Rena, and I love it. Very informative.

php is like any other language, it takes some getting used to, but it’s a lot like Flash action script too, so if you’re into that, you’ll have an easier time with php than a complete newbie.

My only complaint about the book is that it leaves out a really important hint that is provided in “Flash Developer’s guide”

the include statement.

PHP will allow you to have all of your information, like server name, database name, user name, and password, stored in a different location than the php script that is doing the action. This allows you to set a small php file in a folder that is inaccessable without a password, but which contains the password and such for the connection. I’m still looking for a working script that I can post here. Ignore the stuff below… I’m just testing to see if ezboard will let me post php stuff directly in these posts.
If you can see the below, I’ll let you know that this is a simple php script which can be used to create tables in a database.

<?php
$server=“localhost”;
$user=“upuaut”;
$pass=“nuggets”;
$flashbase=“centerspindb”;
$table=“guestbook”;
$hookup=mysql_connect($server,$user,$pass);
$debase=mysql_select_db($flashbase,$hookup);
$sql="CREATE TABLE $table (ename char(30), email char(40));
$result=@mysql_query($sql,$hookup);
if($result){
echo “Table has been created”;
}
?>