Hi there, i've got a flash based video site, i'm working on integrating a guestbook so users can leave comments about the videos.
this is my communication scheme:
flash->php->sql->php->flash
my write function works great and the user can leave a comment based on unique titleID (video number)
but i'm having a hard time fetching entries related to the current playing video. when i test the movie in flash i can see in the output window that the titleID number is stored in the videoID variable and is passed from flash to php using loadVars so i assume that i've got a problem with my php script. This is the code I'm using in php to fetch data from sql:
$id=mysql_escape_string($_GET['videoID']);
$sql = "SELECT * FROM $table WHERE titleID = $id";
when i test it in a browser i use safari activity window and i get this message:
Error in GuestBook Application: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?videoID=000000000' at line 1
any ideas?