Flash embeded in PHP file accessing Mysql database....HELP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jason

    Flash embeded in PHP file accessing Mysql database....HELP

    this is my code and what i get... i'm accessing this through this url



    it grabs the correct stuff from the database, but doesn't put it into
    flash.

    this is what i have in the flash file...

    onClipEvent (load) {
    // assuming you have a personal web server and PHP installed
    locally
    loadVariables(" http://192.168.0.2/php/test2/test.php", this,
    "GET");
    }

    named the textboxes, accordingly, 'name', 'email', and 'content'




    and the php....

    <html>
    <head><title>Fl ash Test</title></head>
    <body>

    <br><br>

    <?php

    //phpinfo();

    error_reporting (E_ALL);

    $user = $HTTP_GET_VARS['user'];
    $subject = $HTTP_GET_VARS['subject'];

    $link = mysql_connect(' localhost', 'mailer', 'mailer321')
    or die('Could not connect: ' . mysql_error());

    mysql_select_db ('mailer') or die('Could not select database');

    $query = "SELECT * FROM email where name = '$user' and subject =
    '$subject' order by id desc limit 1";
    $result = mysql_query($qu ery) or die('Query failed: ' .
    mysql_error());

    while ($rows = mysql_fetch_arr ay($result)) {

    $name = $rows['name'];
    $email = $rows['subject'];
    $content = $rows['content'];

    }

    print "&name=$nam e";
    print "&email=$email" ;
    print "&content=$cont ent";

    mysql_free_resu lt($result);

    mysql_close($li nk);

    ?>

    <div align="center">

    <OBJECT classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macrom edia.com/pub/shockwave/cabs/flash/swflash.cab#ver sion=6,0,0,0"
    WIDTH="760" HEIGHT="430" id="test" ALIGN=""><PARAM NAME=movie
    VALUE="test2.sw f"><PARAM NAME=quality VALUE=high>

    <param name="name" value="<? echo $name ?>">
    <param name="email" value="<? echo $email ?>">
    <param name="content" value="<? echo $content ?>">

    <PARAM NAME=bgcolor VALUE=#EEEEEE>< EMBED src="test2.swf" quality=high
    bgcolor=#EEEEEE WIDTH="760" HEIGHT="430" NAME="test" ALIGN=""
    TYPE="applicati on/x-shockwave-flash"
    PLUGINSPAGE="ht tp://www.macromedia. com/go/getflashplayer" ></EMBED>
    </OBJECT>



    </div>


    </body>
    </html>


    outputs this
    &name=me@test.c a&email=test&co ntent=test

    but no content in the flash text boxes....

    any ideas??
  • konsu

    #2
    Re: Flash embeded in PHP file accessing Mysql database....HEL P

    your variables are not loaded correctly into the flash movie. it has nothing
    to do with php. i would ask this on a flash list. for example, flashkit.com

    konstantin

    "Jason" <jason@winstorm .ca> wrote in message
    news:183f239a.0 412011039.7fa69 eb4@posting.goo gle.com...[color=blue]
    > this is my code and what i get... i'm accessing this through this url
    >
    > http://192.168.0.2/php/test2/test.ph...a&subject=test
    >
    > it grabs the correct stuff from the database, but doesn't put it into
    > flash.
    >
    > this is what i have in the flash file...
    >
    > onClipEvent (load) {
    > // assuming you have a personal web server and PHP installed
    > locally
    > loadVariables(" http://192.168.0.2/php/test2/test.php", this,
    > "GET");
    > }
    >
    > named the textboxes, accordingly, 'name', 'email', and 'content'
    >
    >
    >
    >
    > and the php....
    >
    > <html>
    > <head><title>Fl ash Test</title></head>
    > <body>
    >
    > <br><br>
    >
    > <?php
    >
    > //phpinfo();
    >
    > error_reporting (E_ALL);
    >
    > $user = $HTTP_GET_VARS['user'];
    > $subject = $HTTP_GET_VARS['subject'];
    >
    > $link = mysql_connect(' localhost', 'mailer', 'mailer321')
    > or die('Could not connect: ' . mysql_error());
    >
    > mysql_select_db ('mailer') or die('Could not select database');
    >
    > $query = "SELECT * FROM email where name = '$user' and subject =
    > '$subject' order by id desc limit 1";
    > $result = mysql_query($qu ery) or die('Query failed: ' .
    > mysql_error());
    >
    > while ($rows = mysql_fetch_arr ay($result)) {
    >
    > $name = $rows['name'];
    > $email = $rows['subject'];
    > $content = $rows['content'];
    >
    > }
    >
    > print "&name=$nam e";
    > print "&email=$email" ;
    > print "&content=$cont ent";
    >
    > mysql_free_resu lt($result);
    >
    > mysql_close($li nk);
    >
    > ?>
    >
    > <div align="center">
    >
    > <OBJECT classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000"
    > codebase="http://download.macrom edia.com/pub/shockwave/cabs/flash/swflash.cab#ver sion=6,0,0,0"
    > WIDTH="760" HEIGHT="430" id="test" ALIGN=""><PARAM NAME=movie
    > VALUE="test2.sw f"><PARAM NAME=quality VALUE=high>
    >
    > <param name="name" value="<? echo $name ?>">
    > <param name="email" value="<? echo $email ?>">
    > <param name="content" value="<? echo $content ?>">
    >
    > <PARAM NAME=bgcolor VALUE=#EEEEEE>< EMBED src="test2.swf" quality=high
    > bgcolor=#EEEEEE WIDTH="760" HEIGHT="430" NAME="test" ALIGN=""
    > TYPE="applicati on/x-shockwave-flash"
    > PLUGINSPAGE="ht tp://www.macromedia. com/go/getflashplayer" ></EMBED>
    > </OBJECT>
    >
    >
    >
    > </div>
    >
    >
    > </body>
    > </html>
    >
    >
    > outputs this
    > &name=me@test.c a&email=test&co ntent=test
    >
    > but no content in the flash text boxes....
    >
    > any ideas??[/color]


    Comment

    Working...