A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25

Thread: Flash and PHP Help

  1. #21
    Senior Member
    Join Date
    May 2010
    Posts
    178
    Sorry Whishper..

    Sorry Banshee10000...


    I feel stupid of myself by confusing you both by trying to give some stupid example...

    Please ignore all of my posts in this thread.

    It will be better to give solutions straight forward without giving examples.....

    Post the solutions......that also help me a lot.

    Also post the link what you are working for......

    Many more best wishes to you both.....


    Thanks

    Regards


    Poltuda

  2. #22
    Registered User
    Join Date
    Oct 2010
    Posts
    9
    Tried escaping the & characters also tried \"&"\ and '&' and and "&" and lastly '*'

    This is how I managed to get the Data to Display correctly in flash IF is don't use ahref's
    So I applied the \& as suggested but no luck... also i dont think this is using the XML way

    Here is how its Works Now:
    PHP Code:
    <?php

    error_reporting
    (E_ALL);
    ini_set('display_errors''on');
    $db sqlite_open("Databasenamehere.db"0666$sqliteerror)
       or die(
    $sqliteerror);
    //echo "<p>Recent Posts</p>";
    $sql "SELECT * FROM phpbb_posts ORDER BY post_time DESC LIMIT 15";
    //echo "<p>Query: " . $sql . "</p>";
    $recent sqlite_query($db$sql)
       or die(
    sqlite_error_string(sqlite_last_error()));


    $Passtoflash "<?xml version=\"1.0\"?>";
    //$Passtoflash .= "<posts>\n";


    while ($recent_row sqlite_fetch_array($recentSQLITE_ASSOC))
    {
            
        
    // get data
        
    $post_id $recent_row['post_id'];
        
    $topic_id $recent_row['topic_id'];
        
    $forum_id $recent_row['forum_id'];    
        
    $poster_id $recent_row['poster_id'];
        
    $post_time $recent_row['post_time'];

        
    // get topic name
        
    $topic_name sqlite_query($db"SELECT topic_title FROM phpbb_topics WHERE topic_id='$topic_id'");
        
    $topic_name sqlite_fetch_array($topic_name);
        
    $topic_name $topic_name['topic_title'];
        
        
    // get username
        
    $username sqlite_query($db"SELECT username FROM phpbb_users WHERE user_id='$poster_id'");
        
    $username sqlite_fetch_array($username);
        
    $username $username['username'];
        
        
    //var for flash txt box is "toflash"
        
    $Passtoflash .= "<b>$username</b> Posted in the $topic_name Forum Thread<br />";

    }
    //$Passtoflash .= "</posts>";
    echo "&toflash=$Passtoflash";

    ?>
    Here is the Problem when I add <ahref> tags with & in them

    PHP Code:
    While (commend for Sqlite DB is here (didnt change any code there))
    }
    //here is the actual line that needs to be used in the end
    $Passtoflash .= "<b>$username</b>  Posted in the <a href ='http://microfusion.mine.nu/forums/viewtopic.php?$forum_id\&$topic_id\&p=$post_id#p$post_id'>$topic_name</a>  Forum Thread<br />";
    {
    echo 
    "&toflash=$Passtoflash";
    ?> 
    basically PHPbb3 used this "&" in its forum structure, the idea is that if the users click on the Dynamically updated posts it will take them there. now it works in HTML if i load up the PHP page outside flash

    Flash parse "&" char's in the <ahref> as Variables LOL
    If I Can remember the XML way I couldn't get it to work that's why its commented out
    I don't mind going the XML route but My lack of XML knowledge will only make matters worse if I attempt it... soooo Any Idea's?

  3. #23
    Registered User
    Join Date
    Oct 2010
    Posts
    9
    poltuda your Input was appreciated but my overall knowledge limits me to try and apple your methods in this particular project, but in future your feedback mite still be of value. there is no such thing as a stupid example, just different methods... Thank you for trying to help me out

  4. #24
    Registered User
    Join Date
    Oct 2010
    Posts
    9
    Thank You Both for Everything, I've manage to get Everything working, URL's included

    I just Replaced the "&" char in the ahref URL with "%26"
    (Found it somewhere on this site but a different Thread )

    This way the "&" char is generated but after the variable is passed to Flash
    or PHP Echo info as UTF-8

    Maybe there is a better way but for now everything works

    TY - Banshee Out

  5. #25

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center