AC_FL_RunContent and php variable from recordset

Hi, can anybody point me to a resource on how to grab the
name of the .swf file from my db and pass it to the active content
javascript?
If I just replace the the movie name with a php echo that
grabs the file name from the db there is no playback.
TIA
-Frank

Should work fine.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"ronin701" <[email protected]> wrote in
message
news:gb9gll$lck$[email protected]..
> I'll have to strip the extension after I pull it out of
the record set,
> assign
> that value to a variable and echo that in the js where
there is no
> extension
> and use the standard echo in the areas where it need the
extension, very
> good,
> thanks for pointing me in the right direction.
>
> -Frank
>
http://www.roninwerks.com
>

Similar Messages

  • Slight roadblock in "DW 8 with ASP, ColdFusion, and PHP: Training from the Source"

    I'm working my way through Dreamweaver 8 with ASP,
    ColdFusion, and PHP:
    Training from the Source. I've come to the middle of Lesson 6
    and have hit
    my first obstacle in learning PHP. I'm following the
    instructions to format
    the output of the tour price calculator, but my issue is with
    where to place
    the following PHP code: <?php setlocale(LC_MONETARY,
    'en_US'); echo
    money_format('%i', $tourPrice); ?>
    I placed it before the DOCTYPE and when that didn't work, I
    tried inserting
    right before the code that retrieves the tour price (in the
    body of the
    page). That didn't work either.
    I also tried changing money_format to number_format and
    manually inserting
    the $, but when I tested everything, the output printed as
    follows:
    The estimated cost of your tour is
    $0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000500.
    I'm not quite sure where I've gone wrong.
    Thanks for any help,
    Heather

    Coach Bob wrote:
    > David,
    >
    > I would like to understand better your comment about the
    money_format. The
    > ability to use it is dependent on the host system's
    support of the C library
    > function strfmon(), correct? So if a user were
    developing on a windows box with
    > a local WAMP install it would not work while it may work
    on their *nix-based
    > Web host?
    Check the PHP documentation - it tells you all you need to
    know:
    http://www.php.net/manual/en/function.money-format.php
    > I will see to it that it gets corrected in the next
    version of the book!
    I've no idea what relationship you have with "Training from
    the Source",
    but I find it interesting - to say the least - that you need
    to the ask
    the author of a rival book.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Scripting - Passing and Enterprise variable from script to script

    Hello all,
    We are using UCCX 7.0_SR5
    I am looking to be able to pass a captured variable from one script to another.
    We use a message in queue where a caller waiting in queue can choose to leave a message and then that message is queued back into the sytem for the next available agent. When that agent recieves the message in queue they basically call back out to the customer leaving the message.
    We capture a variable in the first script when they decide to leave a message. The variable holds the call back number that they enter into the system. There is a second script that presents these message in queue calls to the agents. We would like to pass that variable that holds the number enterend by the customer to the second script so that that number appears on CAD in the enterprise data fields. The reason behind this is so the agent has a number to call back in the event they don't reach anyone when the system calls back out and the message left by the customer does not contain a call back number.
    How can I pass that variable from one script to another so it can be presented in CAD for the agents?
    Thanks for any help and let me know if you need any further information.

    You would use a "Get Call Contact Info" step to set your callerID variable, where the "Calling Number" attribute is set to your callerID variable.

  • How to select two variables from recordset

    Parse error: parse error in
    C:\wamp\www\dotweb\access\agreement_handbook.php on line 72
    I get the above error when I try to run the above page. I
    don't know how to select one variable which is the compid that I
    get from the url and a specific name from another column called
    documentname. I know that this is a very simple thing and I could
    do it just fine with ASP pages, but this is my first time with PHP.
    Please help!!!

    On Tue, 17 Feb 2009 20:56:30 +0000 (UTC), "kmlohr"
    <[email protected]> wrote:
    > $query_rsAgreements = sprintf("SELECT * FROM agreements
    WHERE CompId = %s and
    >DocumentName = "handbook"",
    GetSQLValueString($colname_rsAgreements, "int"));
    Change the above line to:
    $query_rsAgreements = sprintf("SELECT * FROM agreements WHERE
    CompId = %s
    and DocumentName = 'handbook'",
    GetSQLValueString($colname_rsAgreements,
    "int"));
    Gary

  • Expanding %1 and other variables from a command

    Hi!
    I need a simple command to open a specific file (rasphone.pbk) with whatever is the default program for opening text files.
    What I have so far:
    (Get-ItemProperty -Path 'Registry::HKEY_CLASSES_ROOT\txtfile\shell\open\command').'(Default)'
    Which gives me this output:
    "C:\Program Files\Sublime Text 2\sublime_text.exe" "%1"
    It will be executed for different machines/users. Some may only have the default notepad.exe, others may have different editors.
    So I now need to replace the %1 with
    %AppData%\Microsoft\Network\Connections\Pbk\rasphone.pbk
    while also expanding %AppData%. The default command is
    %SystemRoot%\system32\NOTEPAD.EXE %1
    where I would need to expand %SystemRoot% as well.
    It should be a 1-liner if possible because the command is stored in a database. If I need a script file I have to find a way to distribute that file to each client as well... and for simply opening a file that would be a bit too much.
    If it's easy in CMD that would be even better, but I thought Powershell is a capable tool for doing stuff like that in a simple way. I just can't wrap my head around it...
    thanks for any help! :)

    Use Exanded string to  store variable reference in the registry.
    You can do the easily with Regedit. You can export the key and import it on any machine with a click of the file.
    Indeed I can replace just the %1 and let the other variables be replaced by cmd.
    I actually got it working now without a script file (I really want to avoid using a file). this is the UI I have to work with:
    (Remote Desktop Manager)
    This is what I use now:
    cmd /K powershell -Command "((Get-ItemProperty -Path 'Registry::HKEY_CLASSES_ROOT\txtfile\shell\open\command').'(Default)').replace('%1','%AppData%\Microsoft\Network\Connections\Pbk\rasphone.pbk')" | cmd
    It is not pretty... calling cmd to call PowerShell and piping the output back to cmd to execute the command.
    I just can't find a way to execute the command including the parameters from a single string in PowerShell.
    If you can think of a better way please let me know...
    Thanks for the help!

  • Set variables from recordset

    I have an SQL table that I store OrderID, ItemID, Qty.  There are 15 possible ItemID's (will never be more).  I need to output the order into a single table row that shows the orderID and the qty for each item.
    For example:
    <cfquery name="orders" datasource="xyz"
    Select *
    From solditems
    Where orderid = 'Order1"
    </query>
    Would return something like:
    Order1, Item3, 6
    Order1, Item4, 7
    Order1, Item18, 10
    The table needs to look like:
    <tr>
    <td>#orderID#</td>
    <td>#item1qty#</td>
    <td>#item2qty#</td>
    <td>#item3qty#</td>
    <td>#item4qty#</td>
    <td>#item5qty#</td>
    <td>#item6qty#</td>
    <td>#item7qty#</td>
    <td>#item8qty#</td>
    <td>#item9qty#</td>
    <td>#item10qty#</td>
    <td>#item11qty#</td>
    <td>#item12qty#</td>
    <td>#item13qty#</td>
    <td>#item14qty#</td>
    <td>#item15qty#</td>
    </tr>
    I'm at a loss trying to figure out how to match the row from the results of the record set into the right #itemXqty#.
    Hope I explained this well and thanks in advance for pointers in the right direction!
    Gary

    You could do something like
    <cfoutput><table border="1"><tr><th>#orders.orderID#</th></cfoutput>
    <cfoutput query="orders">
        <td>#itemID##qty#</td>
    </cfoutput>
    </tr></table>
    For a start, your query would be more efficient using "select orderID, itemID, qty" instead of "select *" (assuming, of course, that the table has more than the 3 columns).

  • Passing variables from PHP to Flash

    I have a contact form that works. The user enters their info,
    hits submit, and their info is emailed to me. I need to figure out
    how to have the PHP script send back a confirmation that the email
    was actually sent. I can't get the php to echo just a "yes" or
    "no". Here is what I have so far:
    Flash code to bring in PHP variable to notify user if mail
    has been sent or not:
    function receive_response(e:Event):void
    var loader:URLLoader = URLLoader(e.target);
    var email_status = new URLVariables(loader.data).success;
    if(email_status == "yes")
    status_txt.text = "Success! Your message was sent.";
    timer = new Timer(500);
    timer.addEventListener(TimerEvent.TIMER, on_timer);
    timer.start();
    else
    status_txt.text = "Send failed! Please email or call us";
    and here is my entire PHP Code. The code in bold at the bottom
    is where it is supposed to pass the "yes" or "no" as the variable
    success
    <<meta http-equiv="content-type"
    content="text/html;charset=utf-8">
    <?php
    // Create local PHP variables from the info the user gave in
    the Flash form
    $senderName = $_POST['userName'];
    $senderEmail = $_POST['userEmail'];
    $senderMessage = $_POST['userMsg'];
    // Strip slashes on the Local variables
    $senderName = stripslashes($senderName);
    $senderEmail = stripslashes($senderEmail);
    $senderMessage = stripslashes($senderMessage);
    $to = "info@*******.com";
    // change this to reflect your site
    $from = "contact@*********.com";
    $subject = "Contact from ***********.com";
    //Begin HTML Email Message
    $message = <<<EOF
    <html>
    <body bgcolor="#FFFFFF">
    <b>Name</b> = $senderName<br /><br />
    <b>Email</b> = <a
    href="mailto:$senderEmail">$senderEmail</a><br
    /><br />
    <b>Message</b> = $senderMessage<br />
    </body>
    </html>
    EOF;
    //end of message
    $headers = "From: $from\r\n";
    $headers .= "Content-type: text/html\r\n";
    $to = "$to";
    if (mail($to, $subject, $message, $headers))
    echo “success=yes”;
    else
    echo “success=no”;
    exit();
    ?>
    Thanks

    I have a contact form that works. The user enters their info,
    hits submit, and their info is emailed to me. I need to figure out
    how to have the PHP script send back a confirmation that the email
    was actually sent. I can't get the php to echo just a "yes" or
    "no". Here is what I have so far:
    Flash code to bring in PHP variable to notify user if mail
    has been sent or not:
    function receive_response(e:Event):void
    var loader:URLLoader = URLLoader(e.target);
    var email_status = new URLVariables(loader.data).success;
    if(email_status == "yes")
    status_txt.text = "Success! Your message was sent.";
    timer = new Timer(500);
    timer.addEventListener(TimerEvent.TIMER, on_timer);
    timer.start();
    else
    status_txt.text = "Send failed! Please email or call us";
    and here is my entire PHP Code. The code in bold at the bottom
    is where it is supposed to pass the "yes" or "no" as the variable
    success
    <<meta http-equiv="content-type"
    content="text/html;charset=utf-8">
    <?php
    // Create local PHP variables from the info the user gave in
    the Flash form
    $senderName = $_POST['userName'];
    $senderEmail = $_POST['userEmail'];
    $senderMessage = $_POST['userMsg'];
    // Strip slashes on the Local variables
    $senderName = stripslashes($senderName);
    $senderEmail = stripslashes($senderEmail);
    $senderMessage = stripslashes($senderMessage);
    $to = "info@*******.com";
    // change this to reflect your site
    $from = "contact@*********.com";
    $subject = "Contact from ***********.com";
    //Begin HTML Email Message
    $message = <<<EOF
    <html>
    <body bgcolor="#FFFFFF">
    <b>Name</b> = $senderName<br /><br />
    <b>Email</b> = <a
    href="mailto:$senderEmail">$senderEmail</a><br
    /><br />
    <b>Message</b> = $senderMessage<br />
    </body>
    </html>
    EOF;
    //end of message
    $headers = "From: $from\r\n";
    $headers .= "Content-type: text/html\r\n";
    $to = "$to";
    if (mail($to, $subject, $message, $headers))
    echo “success=yes”;
    else
    echo “success=no”;
    exit();
    ?>
    Thanks

  • Reset a variable from flash in the parent php page

    I know how to pass vars from php to flash and from flash to a
    "new" php page but here is my question.
    I have a php page (page1.php) with some HTML and a php
    variable called $number. page1.php also has an embedded test.swf
    movie. While working with the test.swf movie, I want to send data
    back to the $number var on the page1.php without reloading the
    page1.php because then it would reload the test.swf movie.
    I have been able to use javascript to change background
    colors on page1.php from within the test.swf movie but cannot
    figure out how to set a php variable from within the test.swf
    movie.
    Is this possible?

    That's what I ended up doing.
    I wrote the var to a db from page1.php using a separate php
    page and then changed the data in the db from flash using the same
    separate php page.
    Doing this made the same var or data available to both
    page1.php and test.swf without changing state.
    Just wanted to know if there were another way without using a
    db or xml file.

  • Movie refuses to load variables from text file

    Hi,
    I'm sure you can solve my newbie problem in less than 1
    minute...
    I'm pulling my hair out on a template I bought 2 days ago
    from templatemonster.com
    I am using Flash 8 Pro.
    All I want to do is change an existing textfield that is
    Static to Dynamic and load variables from a text file.
    The Action Script I use to do so comes directly from
    Macromedia documentation (see attached)
    It works fine when I create a brand new movie, but doesn't do
    anything when inserted into the template.
    It doesn't even complain about not finding the text file if I
    rename or delete it!
    Here are the FLA and text file:
    Edit : Link to source file removed
    The textfield I would like to change is in the txt2 symbol.
    Here is how I proceed:
    When I open HEADER.FLA, Flash tells me I'm missing a font,
    ok, so I click on Use Default, I'll deal with this later.
    I open up the Movie Explorer, go to Layer 30, go to Frame 75
    and click once on txt2
    I name the instance "myMovie_mc" and save (converts from
    Flash MX to Flash 8)
    I double-click on the Movie Clip, select the word
    "Automobile" on the Stage, change from Static to Dynamic and call
    that instance "myText_txt"
    Still in the Movie Clip, I create a new layer I call
    "actions", and in Frame 1 I copy the attached Action Script:
    This script works when I create a new flash file, but it does
    absolutely nothing in this template.
    I know I'm doing something wrong, but I wonder what?
    Many thanks to any helping soul!
    Ferris.

    try this:
    // Load text as variable and assign it to the
    // dynamic text field
    var features_lv:LoadVars = new LoadVars();
    features_lv.onLoad = onText();
    features_lv.load("safetyFeatures.txt");
    function onText(success:Boolean) {
    if (success) {
    myText_txt.text = features_lv.safetyfeatures;
    } else {
    myText_txt.text = "unable to load text file.";
    or this
    // Load text as variable and assign it to the
    // dynamic text field
    var features_lv:LoadVars = new LoadVars();
    features_lv.onLoad = function(success) {
    if (success) {
    myText_txt.text = features_lv.safetyfeatures;
    } else {
    myText_txt.text = "unable to load text file.";
    features_lv.load("safetyFeatures.txt");

  • Passing variables from Captivate to HTML

    Hi All:
    I am trying to figure out how to export system and user variables from Captivate to the html wrapper. What I need to accomplish here is very simple. I want to capture a quizz score and pass that number back to the html file. Can anyone out there help me with this?
    I have been adding the following javascript code to my html file after publishing for testing:
         <script type="text/javascript">
         function SimpleTest()
                alert('I can call javascript');
         function ComplexTest(grade)
                alert('The grade you passed was: ' + grade);
         function ComplexAlternateTest()
                alert('The grade you passed was: ' + GradeVar);
         </script>
    I have successfully tested the first function SimpleTest() so I know that Captivate can communicate with the html file. However, I have not been able to successfully pass any system or user variables to either of the other two test functions. I suspect that I am not getting the syntax correct in the javascript call in Captivate.
    My approach has been to use execute javascript in the on slide exit. I have also tried creating an advanced action that stores a system variable to a user defined variable and then tried sending the user define variable with no success. In the javascript popup window I have been putting ComplexTest(variablename); . I don't know if this is the correct syntax or not??  I have tried using the cpQuizInfoPointsscored system varialbe with and without the $$ signs and I have tried using {score} on the quiz results page. So far no luck. I always get a "variable not defined" error message.
    Sorry for the lengthy message but you would think that something this simple would be more straight forward, but apparently it is not. Thanks in advance for your help.
    Vernon . . .

    Hi Vernon,
    I'm not a JavaScript ninja so I can't answer your question. However take a look at Philips site here http://pipwerks.com/
    He has a lot of interesting stuff in regards to Captivate and JavaScript integration so hopefully you can find the answer on his site.
    /Michael
    Visit my Captivate blog with tips & tricks, tutorials and Widgets.

  • Passing variables from php to flash and the opposite

    Hi guys, im trying weeks now to solve this problem but nothing yet
    If someone could just tell me how to pass variables from flash to php and the opposite i would be thankful!!! Please help!

    I have recently had to learn this, so this may not be the best way but it worked for me
    I suggest looking at the code below stripping out everything you don't need (e.g. the databse stuff) and just get a simple string going back and forward
    have a go and post any problems here and I'll try and help
    in flash i have
    private function getBalanceAndXP():void
              var request:URLRequest = new URLRequest("utils.php");
              request.method = URLRequestMethod.POST;
              var variables:URLVariables = new URLVariables();
              variables.func = "getBalance";
              variables.fbid = userID;
              request.data = variables;
              var loader:URLLoader = new URLLoader();
              loader.dataFormat = URLLoaderDataFormat.VARIABLES;
              loader.addEventListener(Event.COMPLETE, onBalanceComplete);
              loader.load(request);
    private function onBalanceComplete(e:Event):void
              var loader:URLLoader = e.target as URLLoader;
              loader.removeEventListener(Event.COMPLETE, onBalanceComplete);
              var variables:URLVariables = new URLVariables(loader.data);
              _balance = parseInt(variables.balance); // class variable
              _experience = parseInt(variables.experience); // class variable
    public function setBalanceAndXP(balance:int, experience:int):void
                _balance = balance;
              _experience = experience;
              var request:URLRequest = new URLRequest("utils.php");
              request.method = URLRequestMethod.POST;
              var variables:URLVariables = new URLVariables();
              variables.func = "setBalance";
              variables.fbid = userID;
              variables.balance = _balance;
              variables.experience = _experience;
              request.data = variables;
              var loader:URLLoader = new URLLoader();
              loader.dataFormat = URLLoaderDataFormat.VARIABLES;
              loader.load(request);
    and then I have my php file
    <?php
    $func = $_POST["func"];
    $fbid = $_POST["fbid"];
    $balance = $_POST["balance"];
    $experience = $_POST["experience"];
    $numVariables = 0;
    $link = mysql_connect("localhost","username","password");
    mysql_select_db("databaseName");
    if ($func == "getBalance")
              getBalance($fbid);
    else if ($func == "setBalance")
              setBalance($fbid, $balance, $experience);
    mysql_close($link);
    function getBalance($fbid)
              $query = "SELECT balance, experience FROM tableName WHERE fbid = '".$fbid."'";
              $result = mysql_query($query);
              $row = mysql_fetch_row($result);
              writeVariable("balance", $row[0]);
              writeVariable("experience", $row[1]);
    function setBalance($fbid, $balance, $experience)
              $query = "UPDATE tableName SET balance = ".$balance.", experience = ".$experience." WHERE fbid ='".$fbid."'";
              mysql_query($query);
    function writeVariable( $name, $value )
              global $numVariables;
              if ( $numVariables > 0 )
                        echo "&";
              echo $name . "=" . urlencode($value);
              $numVariables++;
    ?>

  • LoadVars-using send to pass a variable from flash to php

    For the life of me, I've tried everything:
    I've researched LoadVars on Adobe forum, used David Powers'
    books, googled 'flash to php', LoadVars, etc. and tried
    sendAndLoad, send, and using $_POST, $_GET, $_REQUEST.
    $HTTP_POSTVARS but I keep getting this same error. any advice
    please?
    I have a Unix server running Apache/PHP 4 - LoadVars worked
    to load name-value pairs into an array -see thread)
    My goal with this simple app is to prototype being able to
    pass a variable from flash to a variable in php.
    Parse error: syntax error, unexpected T_VARIABLE in
    flash_to_SQL.php on line 5
    Actionscript 2.0 code:
    var c :LoadVars = new LoadVars();
    c.testing = "123FOUR";
    c.send ("
    http://127.0.0.1/flash_to_SQL.php","_self","POST");
    php code: (I also tried $_POST, $_GET, $_REQUEST.
    $HTTP_POSTVARS)
    <?php
    //mysql 4.1.2, php 4 , NO mysqli
    ecbo $_REQUEST ['testing'];
    /?>

    var formData:LoadVars = new LoadVars();
    formData.fname = "Name";
    formData.send("
    http://www.website.com/flash_php.php",
    formData, "POST");
    <?php
    $name = $_POST['fname'];
    echo $name;
    ?>

  • Php variable and xml processing

    Hello there,
    I have a problem that is driving me crazy! I have a php file
    which creates an xml string from a sql query. The problem is that I
    need to use a variable from an swf file to create the query. All
    this should happen when i click a button on the swf page. The xml
    file is created no problem but the variable is not used. i am well
    able to use these POST variables in other php files. As you can see
    the php file is called twice in the action script. Is this the
    problem. The line: xmlData.load("get_max_sess.php"); is fine. I
    stuck the other on one in - loadVariablesNum ("get_max_sess.php",
    0, "POST"); after the fact and this doesn't work. is there a
    confilct in calling the same file twice? Is the sendAndLoad
    function an option? Also included below is my php file.
    Thanks so much. I really hope you can help me!
    ****************************************************ACTION
    SCRIPT**********************************
    call_btn.onRelease=function(){
    function processXMLData(success)
    {loadVariablesNum ("get_max_sess.php", 0, "POST");
    if (success)
    var rootNode=this.firstChild;
    var contentNode=findNode(rootNode, "guit_vol");
    guitVol=getValue(contentNode);
    var authorNode=findNode(rootNode, "guit_pan");
    guitPan=getValue(authorNode);
    var contentNode=findNode(rootNode, "guit_vis");
    visGuit=getValue(contentNode);
    _root.guitVis.gotoAndStop(visGuit);
    //assign xml info to musician objects
    _root.guitObj.drag._y=guitVol;
    _root.guitObj.drag._x=guitPan*2;
    else
    content="Today's news is not found";
    function getValue(node)
    if (node && node.firstChild)
    return node.firstChild.nodeValue;
    return "";
    function findNode(node, nodeName)
    if (node.nodeName==nodeName)
    return node;
    for (var i=0; node.childNodes &&
    i<node.childNodes.length; i++)
    var foundNode=findNode(node.childNodes
    , nodeName);
    if (foundNode!=null)
    return foundNode;
    return null;
    var xmlData=new XML();
    xmlData.ignoreWhite=true;
    xmlData.onLoad=processXMLData;//when xml data loads the
    function at the top executes
    xmlData.load("get_max_sess.php"); //loads the xml data from
    this location
    stop();
    ****************************************************PHP
    FILE**********************************
    <?php
    $user_id=$_POST['user_id'];
    // query database for records
    $connection = mysql_connect('localhost', 'm27849_martin',
    'Geraldine1') or die ("Unable
    to connect!");
    mysql_select_db('m27849_liveroom') or die ("Unable to select
    database!");
    $query = "
    SELECT a.guit_sess_id, a.guit_vol, a.guit_pan, a.guit_vis,
    b.bass_sess_id, b.bass_vol, b.bass_pan, b.bass_vis, c.drum_sess_id,
    c.drum_vol, c.drum_pan, c.drum_vis
    FROM guit_info a, bass_info b, drum_info c, users_sessions d
    WHERE d.session_id =(SELECT max(a.session_id) FROM
    users_sessions a WHERE a.user_id = '$user_id')
    AND a.guit_sess_id = d.session_id
    AND b.bass_sess_id =a.guit_sess_id
    AND c.drum_sess_id = b.bass_sess_id
    //(SELECT userid from auth WHERE username ='martin')
    //here a variable could be inserted to call the relevant row
    (session)
    $result = mysql_query($query) or die ("Error in query:
    $query. " .
    mysql_error());
    $doc = new DomDocument('1.0');
    //The first element we create in the XML document is known as
    the root element. Each XML document must have 1, and only 1, root
    element. In this example I have called it 'root', but you can use
    whatever name you like (such as the name of the PHP script which is
    executing). Note that you have to create the element and insert it
    into the document with two functions.
    // create root node
    while($row = mysql_fetch_assoc($result)) {
    $user = $doc->createElement('session');
    $user = $doc->appendChild($user);
    foreach ($row as $fieldname => $fieldvalue) {
    //Note that here I create a new element for the field and
    then insert it as a child to the current database row, as
    identified in $occ.
    $child = $doc->createElement($fieldname);
    $child = $user->appendChild($child);
    //Now I must add the field value as a text node, then insert
    it as a child element to the current field node, as identified in
    $child.
    $value = $doc->createTextNode($fieldvalue);
    $value = $child->appendChild($value);
    //These loops do not terminate until they have processed
    every column of every row which has been retrieved from the
    database.
    } // foreach
    } // while
    echo $doc->saveXML();
    //echo $doc->saveXML($child);
    mysql_close($connection);
    //from:
    http://www.tonymarston.net/php-mysql/dom.html
    ?>

    Hi there,
    I cracked it after a lot of to-ing and fro-ing! Apparently
    you CAN send a variable and then load xml. Thanks so much for your
    advice and interest. I am much obliged.
    Marty Party
    Check out my code below....
    user_id=147;
    submit_button.onRelease=function(){
    function processXMLData(success)
    if(success)
    {_root.status_id="Success"
    var rootNode=this.firstChild;
    var contentNode=findNode(rootNode, "guit_vol");
    guitVol=getValue(contentNode);
    var authorNode=findNode(rootNode, "guit_pan");
    guitPan=getValue(authorNode);
    var contentNode=findNode(rootNode, "guit_vis");
    visGuit=getValue(contentNode);
    status_id=visGuit;
    etc....
    else
    content="Today's news is not found";
    function getValue(node)
    if (node && node.firstChild)
    return node.firstChild.nodeValue;
    return "";
    function findNode(node, nodeName)
    if (node.nodeName==nodeName)
    return node;
    for (var i=0; node.childNodes &&
    i<node.childNodes.length; i++)
    var foundNode=findNode(node.childNodes
    , nodeName);
    if (foundNode!=null)
    return foundNode;
    return null;
    var xmlData=new XML();
    xmlData.ignoreWhite=true;
    xmlData.onLoad=processXMLData;
    //xmlData.load("get_max_sess.php");
    var id:LoadVars = new LoadVars();
    id.user_id = user_id;
    //id.username = _root.username;
    id.sendAndLoad("get_max_sess.php", xmlData, "POST");
    Basic idea from
    http://www.permadi.com/tutorial/flashXMLNewsExample/index.html
    - Thank you!!

  • Is it possible to load and send variables to php at the same time?

    Hello, with this line:
    request.method = URLRequestMethod.GET; you can receive
    variables from php.
    and with request.method = URLRequestMethod.POST you can send
    variables.
    But is it possible to do this simultaniously ?

    they both send and receive data sequentially. ie, data is
    sent (if there is any) and then data is received (if there is
    any).

  • Adding session variables from a recordset

    I'm trying to create a session variable from data from a
    recordset, can anyone help?
    this is what I want the session variable to be from the
    recordset:
    <?php echo $row_rsStrata_plan['plan_str']; ?>
    but I'm not sure where to go from here: $_SESSION[test] =?
    Thanks,

    Make sure you have <?php session_start(); ?> at the top
    of your page
    Then
    $_SESSION['test'] = $row_rsStrata_plan['plan_str'];
    Gareth
    http://www.phploginsuite.co.uk/
    PHP Login Suite V2 - 34 Server Behaviors to build a complete
    Login system.

Maybe you are looking for

  • Fields Missing in Parameter Setup Screen

    Using Crystal XI I want to set up a filter for a specific field that is on the report.  I right click on Field Explorer/Parameter Fields and click "New...".  Then I try to select the field, but it's not in the list available to me (see linked images)

  • Urgent help is needed - JSP & Java beans

    Hi, I am getting the following problem when trying to interact with Javabeans from JSP (DB I use is Cloudscape) : An exception occurred while interacting with the guestbook database. The error message was: Cannot create bean of class proj.beans.UserD

  • Bluetooth on new MacBook Aluminum and all MacBooks before

    I have a new Macbook Aluminum. Bluetooth frequently doesn't recognize my mouse and/or keyboard. Now that I have added a monitor the mouse and keyboard are connected but NOTHING happens on waking even though the bluetooth preferences shows it's connec

  • BADI to determine item categry in sale order

    Hi, I am looking for a BADI to controll determination of the item category of a sales-order-item. Is 'BAdI: General Processing of Item Data' is a recomended one? Can you recomend me of any other BADI or tip me on this one? Thank you, Uri

  • Adobe Flash Player Inhalte werden nicht angezeigt

    Hallo, ich bin hier gerade am verzweifeln. Bin gestern aus dem Urlaub zurück und wollte heute ein paar stream´s gucken. Diese funktionieren leider nicht und selbst der PC ist sich unsicher ob ich Flash Player installiert habe oder nicht. Auf diesem L