Request Vlaue

Discussion in 'PHP' started by BABUPATHAN, Jun 26, 2008.

  1. #1
    i am using a php script to get youtube values i am not understanding how can i run videos on browser when user click the video image or video title name

    the hyper link which php generate for image click or title click is:
    <?="<a href=\"player".".php?".$value['id']."\"><img src=\"".$value['thumbnail_url']."\" border=\"0\"></a>";?>


    and my player.php use these codes to play video:
    <object width="425" height="350"><param name="movie" value="http://www.youtube.com/watch?v=$value['id']">
    </param><param name="wmode" value="transparent"></param>
    <embed src="http://www.youtube.com/watch?v=$value['id']" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350">
    </embed>




    but http://www.youtube.com/watch?v=$value['id']" these line on my player.php are not getting youtube video id.

    any one can help me how can i get video id of that video which user want to play on my player.php page
     
    BABUPATHAN, Jun 26, 2008 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    Try $value = $_GET;
    This will set $value['id'] = $_GET['id'] if it's filled in.

    It's advised you run some validation on it though to stop XSS attacks.

    Also, make sure your within PHP for the player.php bit, looks like you aren't.
     
    Danltn, Jun 26, 2008 IP