Jump to content

PHP $video = $_GET['v']; not working


beanymanuk

Recommended Posts

I am getting value from url using

$video = $_GET['v']

; but it is not working in this file below it just echo's blank

<?php
include('../core.php');
$video = $_GET['v'];
echo $video;
$sql2="SELECT tag, videoId FROM generaltags Where videoId = '$video' ORDER BY id DESC";
$result2 = mysql_query($sql2);
echo 'Tags: '; 
while($row2 = mysql_fetch_array($result2))
{
?>

<?php
echo $row2['tag'] . " ";	
?>

<?php
}
?>

 

but it is working in this file and is echoing the corrent value

<?php

//Get video id from url variable v
$video = $_GET['v'];
echo $video;
?>

 

Anyone got any idea's what this problem could be?

Link to comment
https://forums.phpfreaks.com/topic/199675-php-video-_getv-not-working/
Share on other sites

no I tried that and still nothing

I dont know if the problem is anything to do with the file being loaded by ajax

 

showpeople.php

<script type="text/javascript">
$(document).ready(function()
{

showrecords();

function showrecords()
{
	$("#display").load("http://www.peter-gosling.com/tagit/people/demo_show.php"); //Simple jquery load command, loads up demo_show.php
	document.getElementById('content').value='';
	$("#flash").hide();
    }
</script>

 

demo_show.php

<?php
include('../core.php');
include('../videoinfo.php');
$video = $_GET['v'];
echo $video;
?>

Code that does work is contained in videoinfo.php

<?php

//Get video id from url variable v
$video = $_GET['v'];
echo $video;
?>

 

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.