Jump to content

Sorry


gvpm

Recommended Posts

ok im a very humble person Crayon Violent i didn't mean no disrespect but its just i know its probaly easy and its stressing me out lol i am patient person. but like anybody else if you trying to do something and the littlest blockage get in your way you ready to pull your hair up again im sorry :(

basically the url of the video link is inserted into the database. Say im Id 56 and i upload a video it will output id 56 video link is etc here is how it look for example:

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.
[code=php:0]<?

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);


?>[/code]
[COLOR=Red]
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:
[/COLOR]

[CODE]mysql_select_db("mydatabase" , $connection);
$query= mysql_query("SELECT * FROM `Video` WHERE `IDMember` = $ID ");
$row=mysql_fetch_array($query);

$ret = "<scr ipt type=\"text/javascript\" src=\"http://update.videoegg.com/js/Player.js\"></script>

<sc ript type=\"text/javascript\">
  var VE_api = VE_getPlayerAPI(\"1.2\");
  var myMoviePath =\"" . $row['FileName'] . "\";
  VE_api.embedPlayer(myMoviePath, 350, 330, false, \"\", \"\", false, \"\", \"\");
</sc ript>";
return $ret;[/CODE]

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.


[CODE]SQL result

Host: localhost
Database: Mydatabase
Generation Time: Dec 13, 2006 at 12:07 PM
Generated by: phpMyAdmin 2.7.0-pl2 / MySQL 4.0.16
SQL query: SELECT `IDMember` , `FileName` FROM `Video` LIMIT 0, 30 ;
Rows: 1
IDMember FileName
1 /gid342/cid1110/1104/2U/IA/11659687366RMzIcZs4VIi71sNQ5Io[/CODE]

And i want it to return to my profile page with the link "if" the user id is 57 i hope i explained it better.

if you look at an example profile page [url=http://gvpm.net/hangoutspot/profile.php?ID=47]http://gvpm.net/hangoutspot/profile.php?ID=47[/url] you will notice the video player won't load becuase the url isn't inserted
Link to comment
https://forums.phpfreaks.com/topic/30609-sorry/#findComment-140953
Share on other sites

That won't work i didn't list everything but thanks..this is becuase

is a function that the html calls for example

in say "page 3" __videoplayer__ will call from video.php the function and thats what returns in my css div. i will list some parts of the php

[code]################################################

// --------------- page variables and login

$_page['name_index'] = 7;
$_page['js'] = 1;
$_page['css_name'] = 'profile_view.css';
$dir['gallery']            = "{$dir['root']}gallery/";
$dir['tmp']                = $TMP_DIR;
$site['gallery']            = "{$site['url']}gallery/";
$site['tmp']                = $TMP_URL;

if ( !( $logged['admin'] = member_auth( 1, false ) ) )
if ( !( $logged['member'] = member_auth( 0, false ) ) )
if ( !( $logged['aff'] = member_auth( 2, false )) )
$logged['moderator'] = member_auth( 3, false );

foreach ($_REQUEST as $key => $value)

$_page_cont[0]['Description'] = _t("_Description");

// --------------- GET/POST actions

$ID = getID( $_REQUEST['ID'] );
$member['ID'] = (int)$_COOKIE['memberID'];

// If ID is not specified then show random 10 profiles
if ( !$ID )
{
$_page['header'] = "{$site['title']} ". _t("_Member Profile");
$_page['header_text'] = _t("_View profile");
$_page['name_index'] = 0;
$_page_cont[0]['page_main_code'] = profile_view();
$_page['css_name'] = 'gallery.css';
    $dir['gallery']            = "{$dir['root']}gallery/";
$dir['tmp']                = $TMP_DIR;
$site['gallery']            = "{$site['url']}gallery/";
$site['tmp']                = $TMP_URL;
PageCode();
exit;
}

switch ( $_REQUEST['action'] )
{
case 'view_objects':
$_page_cont[$_ni]['page_main_code'] = PageCompListObjects();
break;
case 'view_object':
echo PageCompViewObject();
exit();
}
########################################################[/code]

[code]########################################################

$_page_cont[$_ni]['videoplayer'] = videoplayer();

function videoplayer( $ID )
{

$Videoquery= "SELECT * FROM Video WHERE `IDMember` = '$ID'";
$Videolink = db_arr("$Videoquery");
while ( $test_arr = mysql_fetch_assoc( $Videolink) )
{
echo $test_arr['IDMember'];
}
$ret = "<sc ript type=\"text/javascript\" src=\"http://update.videoegg.com/js/Player.js\"></script>

<scr ipt type=\"text/javascript\">
  var VE_api = VE_getPlayerAPI(\"1.2\");
  var myMoviePath =\"" . $row['FileName'] . "\";
  VE_api.embedPlayer(myMoviePath, 290, 270, false, \"\", \"\", false, \"\", \"\");
</scr ipt>";
return $ret;

}[/code]

i hope this helps
Link to comment
https://forums.phpfreaks.com/topic/30609-sorry/#findComment-140960
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.