Ok some success here: I've added another column to my table and called it titleID, I've altered the code on my php and added:
case 'write' :
// Receive Variables From Flash
$titleID = ereg_replace("&", "%26", $POST['titleID']);
$name = ereg_replace("&", "%26", $POST['yourname']);
$email = ereg_replace("&", "%26", $POST['youremail']);
$comments = ereg_replace("&", "%26", $POST['yourcomments']);
$submit = $_POST['submit'];
// Current system date in yyyy-mm-dd format
$submitted_on = date ("Y-m-d H:i:s",time());
// Check if its submitted from Flash
if($submit == 'Yes'){
// Insert the data into the mysql table
$sql = 'INSERT INTO ' . $table .
' (`ID`,
'titleID'
`name`,
`email`,
`comments`,
`time`
)
VALUES
(\'\','
. '\'' . $titleID . '\','
. '\'' . $name . '\','
. '\'' . $email . '\','
. '\'' . $comments . '\','
. '\'' . $submitted_on . '\'
)';
$insert = mysql_query($sql, $DBConn) or die("Error in GuestBook Application: " . mysql_error());
then I added another textInput component for the titleID and called it videoID and recoded the AS so now I'm able to send the titleID number from flash to my table using php.
Now I'd like to fetch back into the read area of my guestbook only entries that have this unique titleID number.
How do I alter the read code in the php form to do this?
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 time 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=";
any ideas?
cheers.