I'm trying to incorporate the video egg player into my website but i can't get it working as far as individual IDs for the life of me. I don't even know if im on the right track but here are the codes.
<?
include ("connection.php");
$ID = (int)$_COOKIE['memberID'];
///record check
$query = "SELECT * FROM Video WHERE `IDMember` = $ID";
$custom_arr = db_arr( $query );
$record_created = $custom_arr['IDMember'] ? 'ok' : '';
///insert into FileName and Update
$FileName = $_REQUEST['VE_Path'];
mysql_select_db("mydatabase", $connection);
if ( !$record_created )
{
$query = "INSERT INTO Video (`IDMember`,`FileName`) VALUES ( '$ID', '$FileName')";
}
else
{
$query = "UPDATE Video SET `FileName` = '$FileName', `IDMember` = '$ID'";
$res = db_res( $query );
}
mysql_query($query);
?>
The above code of course sends the data to the database i have no real problems with that the only problem i have is retrieving data and sending it to individual ID's on my profile pages. here is the rest of the codes:
mysql_select_db("mydatabase" , $connection);
$query= mysql_query("SELECT * FROM `Video` WHERE `IDMember` = $ID ");
$row=mysql_fetch_array($query);
$ret = "<script type=\"text/javascript\" src=\"http://update.videoegg.com/js/Player.js\"></script>
<script type=\"text/javascript\">
var VE_api = VE_getPlayerAPI(\"1.2\");
var myMoviePath =\"" . $row['FileName'] . "\";
VE_api.embedPlayer(myMoviePath, 350, 330, false, \"\", \"\", false, \"\", \"\");
</script>";
return $ret;
If it looks weird and im completely off track i wouldn't be surprised because im so confused and been up all night reading documents can anyone please help.