johntp Posted December 2, 2008 Share Posted December 2, 2008 Hey guys, You might be the wrong people to ask, but here goes. I have a flash document that i use a guest book with. I use php for flash to talk to mysql, and am currently in a bind. I am trying to figure out how to make flash take an HTML table from php i have tried but I'm not sure if it's possible for flash to recognize HTML tables. I guess my question is can you import a table structured sql query from php into flash? Here is my PHP Code for calling and printing the stuff i need <?php case 'read' : // Fetch all comments from database table $sql = 'SELECT * FROM `' . $table . '`'; $allComments = mysql_query($sql, $DBConn) or die("Error in GuestBook Application: " . mysql_error()); $numallComments = mysql_num_rows($allComments); // Fetch page-wise comments from database table $sql .= ' ORDER BY `id` DESC LIMIT ' . $_GET['NumLow'] . ', ' . $numComments; $fewComments = mysql_query($sql, $DBConn) or die("Error in GuestBook Application: " . mysql_error()); $numfewComments = mysql_num_rows($fewComments); // Generate Output for Flash to Read print '&totalEntries=' . $numallComments . '&'; print "<br>&entries="; if($numallComments == 0) { print "No entries in the guestbook, as yet.."; } else { while ($array = mysql_fetch_array($fewComments)) { $name = mysql_result($fewComments, $i, 'name'); $email = mysql_result($fewComments, $i, 'email'); $comments = mysql_result($fewComments, $i, 'comments'); $time = mysql_result($fewComments, $i, 'time'); $state = mysql_result($fewComments, $i, 'state'); print " <table width='293' border='0' cellpadding='0' cellspacing='0'> <tr> <td width='100'>$name</td> <td width='193'>$email</td> </tr> <tr> <td>$state</td> <td>$time</td> </tr> <tr> <td colspan='2'>$comments</td> </tr> </table>"; $i++; } } // Print this only when there aren't any more entries.. if($_GET['NumLow'] > $numallComments) { print 'No More Entries!&'; } break; ?> Link to comment https://forums.phpfreaks.com/topic/135164-php-and-flash/ Share on other sites More sharing options...
JNorman Posted December 2, 2008 Share Posted December 2, 2008 I'm not sure if this will be any help to you, but i do believe that you can include php files into a flash file however i cannot remember how to do this. A quick search on google will reveal to you how you can include a php file in flash. Link to comment https://forums.phpfreaks.com/topic/135164-php-and-flash/#findComment-704021 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.