The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 3 of 3

Thread: Am I even close? (php, mySql)

  1. #1

    [Flash PHP] Am I even close?

    Iíve tried to work with the many tutorials out there but Iím still lost. My php seems to be working (connects to mySql) but I cant to get my query into flash. My fla has a movie clip that contains a text field with the variable name myText. Am I even close to getting this to work? Grateful for any input.

    PHP Code:
    <?php
    // Connect and select.
    if ($dbc = @mysql_connect ('localhost''username''password')) {
     
    if (!@
    mysql_select_db ('myblog')) {
    die (
    '<p>Could not select the database because: <b>' mysql_error() . '</b></p>');
    }
    } else {
    die (
    '<p>Could not connect to MySQL because: <b>' mysql_error() . '</b></p>');
    }
     
    // Define the query.
    $query 'SELECT * FROM blog_entries ORDER BY date_entered DESC';
     
    if (
    $r mysql_query ($query)) { // Run the query.
    // Retrieve and print every record.
    while ($row mysql_fetch_array ($r)) {
    print 
    "<p>{$row['date_entered']}<br />
    <b>
    {$row['title']}</b><br />
    {$row['entry']}<br /></p>\n";
    }
    } else { 
    // Query didn't run.
    die ('<p>Could not retrieve the data because: <b>' mysql_error() . "</b>. The query was $query.</p>");
    // End of query IF.
    mysql_close(); // Close the database connection.
    ?>
    Code:
     
    onClipEvent (load) {
    loadVariables("http://localhost/blog.php?", this, "GET");
    }

  2. #2
    jw06's Avatar
    657
    posts
    Registered User
    what kind of errors is it giving you?

  3. #3
    I'm getting this in the output window.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012