semaj4712 Posted February 11, 2007 Share Posted February 11, 2007 I am a newbie to php mysql integration, and i have a question, im using a a php file that was pre made im just editing it, i want to link a movie to youtube this is what i have so far function mostraRecensioni($row){ global $cinConfig, $mainframe, $option, $Itemid, $id, $_MAMBOTS, $params; ?> <object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/<?php echo $allvideosfonteid?>"</param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/<?php echo $allvideosfonteid?>" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object> i need it to recognize what jmovies id it is and then tell the code to insert that videos allvideosfonteid Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/ Share on other sites More sharing options...
semaj4712 Posted February 11, 2007 Author Share Posted February 11, 2007 anyone??? Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-182289 Share on other sites More sharing options...
trq Posted February 11, 2007 Share Posted February 11, 2007 Sorry, but your question is not at all clear. Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-182310 Share on other sites More sharing options...
semaj4712 Posted February 12, 2007 Author Share Posted February 12, 2007 ok i have a script where on the back end i put in the youtube code, like H48DSlku like that, and then that adds it to a mysql database and then from there i want to insert that part that into the code, and then open the movie, but i want to make sure it opens the right movie so it also has to know what movie id to open how do i do that? Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-182327 Share on other sites More sharing options...
semaj4712 Posted February 12, 2007 Author Share Posted February 12, 2007 bump Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-182448 Share on other sites More sharing options...
semaj4712 Posted February 12, 2007 Author Share Posted February 12, 2007 i guess what i am asking for is help with my open source script so that i can insert the youtube id on the backend and then based on that be able to show the video on the frontend by plugging that id into the script any help would be great Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-182621 Share on other sites More sharing options...
Cagecrawler Posted February 12, 2007 Share Posted February 12, 2007 You can insert it simply by using a mysql INSERT query. You can build a fancy form if others are going to be submitting the videos, or you can just do it via phpMyAdmin or similar. eg. INSERT INTO table(col1,col2,col3) VAULES(val1,val2,val3) You then need to query the database for the code, and simply plug it into the variable you already have. I don't know how you are going to differentiate between videos so the right video code is retrieved from the DB - you'll have to work it out yourself I think. Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-182646 Share on other sites More sharing options...
semaj4712 Posted February 12, 2007 Author Share Posted February 12, 2007 well i think based on the code allready there that it will differ between each video but could you give me an example of your php insert code Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-182792 Share on other sites More sharing options...
semaj4712 Posted February 13, 2007 Author Share Posted February 13, 2007 bump Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-183243 Share on other sites More sharing options...
semaj4712 Posted February 13, 2007 Author Share Posted February 13, 2007 can anyone help me? Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-183811 Share on other sites More sharing options...
semaj4712 Posted February 14, 2007 Author Share Posted February 14, 2007 well this sie has truned out to be extremly helpful Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184260 Share on other sites More sharing options...
semaj4712 Posted February 14, 2007 Author Share Posted February 14, 2007 Greaser9780 thanx for the pm, i cant reply to pms it says i dont have permission, but yes im still looking for help and any that your willing to answer would be greatly appreciated Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184279 Share on other sites More sharing options...
Greaser9780 Posted February 14, 2007 Share Posted February 14, 2007 I am a noobie myself but this is semi-similar to a recent prob I have had gimme a couple mins to think bout it. Could you post the code you have for this so far. I hope it is more than that lil bit U posted earlier. Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184285 Share on other sites More sharing options...
semaj4712 Posted February 14, 2007 Author Share Posted February 14, 2007 um ok its alot tho <?php /** * @Jmovies - Un componente per Joomla * @package Component for Joomla * @subpackage jmovies.php * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * @autor Vamba & Luscarpa **/ # Per non permettere collegamento diretto defined( '_VALID_MOS' ) or die( 'Accesso diretto non permesso.' ); if (defined('_CINEMA_HTML')) { return; } else { define('_CINEMA_HTML', 1); } class HTML_cinema { function cinHeader($title, $cattitleimg) { global $cinConfig, $option, $Itemid; ?> <!-- Stili CSS layout --> <style> legend{ <?php echo $cinConfig['legend']?> } fieldset{ <?php echo $cinConfig['fieldset']?> } #fieldset{ <?php echo $cinConfig['fieldset2']?> } .legendtitle{ <?php echo $cinConfig['legendtitle']?> } </style> more code <?php } function mostraRecensioni($row){ global $cinConfig, $mainframe, $option, $Itemid, $id, $_MAMBOTS, $params; ?> <object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/<?php echo $allvideosfonteid?>"</param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/<?php echo $allvideosfonteid?>" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object> <?php } } ?> the part im working on is right at the bottom Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184314 Share on other sites More sharing options...
Greaser9780 Posted February 14, 2007 Share Posted February 14, 2007 Maybe it's because I'm a noob. But it doesn't appear that any of your variables are registered. Such as $mainframe. Is the bottom part supposed to send the youtube info to your db? If so, I would approach it completely differently. Maybe something like: $sql = "INSERT INTO your table (place, table, rows, you, want, here) VALUES ($place, $table, $values, $you, $want, $here)"; $result = mysql_query($sql, $connection) or die(mysql_error()); of course to add this part you will need to include your database connection at the beginning of your script. Let me know if this is helpful at all. Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184322 Share on other sites More sharing options...
semaj4712 Posted February 14, 2007 Author Share Posted February 14, 2007 no its allready in the database at this point i just need to call it out from the data base and insert it into that code, my problem is getting it to actually write something to that code Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184326 Share on other sites More sharing options...
semaj4712 Posted February 14, 2007 Author Share Posted February 14, 2007 it adds that part to the db on a diff page Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184327 Share on other sites More sharing options...
Greaser9780 Posted February 14, 2007 Share Posted February 14, 2007 Oh my bad I thought you wanted to write it to the db. You can still use a mysql_query to call the information to your php script. Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184329 Share on other sites More sharing options...
semaj4712 Posted February 14, 2007 Author Share Posted February 14, 2007 yea thats fine im a complete newbie and dunno exactly how to do that tho Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184330 Share on other sites More sharing options...
Greaser9780 Posted February 14, 2007 Share Posted February 14, 2007 Try this to get the info: $sql = "SELECT someField from yourtable"; $result = mysql_query($sql, $conn) or die(mysql_error()); That will pull the info from your db. I still need to know what you want to do with the info after it gets pulled from the db. (Just displaying it on the page, sending it somewhere, making a link from the info,?) Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184332 Share on other sites More sharing options...
semaj4712 Posted February 14, 2007 Author Share Posted February 14, 2007 so say my table is jos_jmovies then and the field is allvideosfonteid i would put... $sql = "SELECT allvideosfonteid from jos_jmovies"; $result = mysql_query($sql, $conn) or die(mysql_error()); i want then to insert it into the code like this <object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/<?php echo $allvideosfonteid?>"</param> <param name="wmode" value="transparent"> </param><embed src="http://www.youtube.com/v/<?php echo $allvideosfonteid?>" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"> </embed></object> Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184336 Share on other sites More sharing options...
Greaser9780 Posted February 14, 2007 Share Posted February 14, 2007 So, you want the correct movie to play after it is called by the mysql_query? And you want that code inserted into your player info that you showed last post? Right? Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184391 Share on other sites More sharing options...
simcoweb Posted February 14, 2007 Share Posted February 14, 2007 I think after all your posts that what you are after is how do you get the video id number onto your link so when someone clicks on it the movie opens. Is that basically it? Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184393 Share on other sites More sharing options...
semaj4712 Posted February 14, 2007 Author Share Posted February 14, 2007 I think after all your posts that what you are after is how do you get the video id number onto your link so when someone clicks on it the movie opens. Is that basically it? yea thats exactly Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184521 Share on other sites More sharing options...
semaj4712 Posted February 14, 2007 Author Share Posted February 14, 2007 So, you want the correct movie to play after it is called by the mysql_query? And you want that code inserted into your player info that you showed last post? Right? yea both of u said it correctly yea how do i do that cuz what i have been using doesnt get me anything Link to comment https://forums.phpfreaks.com/topic/38068-solved-need-help/#findComment-184534 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.