FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » values not changing
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
values not changing [message #181557] Tue, 21 May 2013 18:17 Go to previous message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma:
Senior Member
www.mroldies.net

I am attempting to change the play list given the year selected.
However, regardless of which year is chosen, the code selects only the
originally loaded playlist.

What am I missing?



<?php

$year=$_GET["year"];
if (empty($year)) {$year=1900;}
$year=(int)$year;

echo $year;

if ($year=1900)
{echo '<iframe width="800" height="800" src="test2.php"
frameborder="0"></iframe>';}

if ($year>1900)
{
/* connect to the db */
$con = mysql_connect('localhost','user','pass');


if (!$con){die("can not connect: " . mysql_error());}

mysql_select_db('richbull_top100',$con);

while ($number<=10):
$result = mysql_query("SELECT atitle,artist,avid FROM A$year WHERE id =
$number");
if (!$result) { echo 'Could not run query: ' . mysql_error(); exit; }
$vid = mysql_fetch_row($result);


echo "{";

echo 'image:';
echo '""';
echo ",";

echo "title:";
echo '"';
echo $vid[0];
echo '",';

echo 'file:"http://www.youtube.com/watch?v=';
echo $vid[2];
echo '",';

echo 'description:';
echo '"';
echo $year." # ".$number." - ".$vid[1];
echo '"';

echo "},";
echo "\n";
$number++;
endwhile;





}

?>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: insert PDF table in database
Next Topic: Got it working finally
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 12:12:12 GMT 2024

Total time taken to generate the page: 0.06270 seconds