I was using mandrake before as the computer that was hosting this file, and now I switched over to redhat 7.3 and updated to the newest version of php.
This code worked on my mandrake box, but now on this redhat one, it isn't passing the variables to the form. I have tried simple things like trying to just print the variable to see if it is being recognized and it isn't. When I click on one of the links, this is what I click on:
http://192.168.1.6/files.php?linker=1&id=14
You would think the variable would then be passed right back into the files.php, but it isn't showing up. If I hardcode the variables in to certain numbers it then works.
Please help!
<?php
mysql_connect("localhost","","**");
mysql_select_db("music");
if (!$linker == 1)
{
$filez = mysql_query("select from directory");
while ($row = mysql_fetch_assoc($filez))
{
$directorys[] = $row["direct"];
$ids[] = $row["num"];
}
$ii = count($directorys);
print "<B>Directorys:</b><BR>";
for($i=0; $i < $ii; $i++)
{
print "<a href=\"files.php?linker=1&id=$ids[$i]\">$directorys[$i]</a><BR>";
}
print "<BR>";
print "<B>Mp3's:</b><BR>";
$filez2 = mysql_query("select from filename where counter = '0' order by files");
while ($row = mysql_fetch_assoc($filez2))
{
$idnumber = $row["id"];
$filename = $row["files"];
$datapath = $row["datafield"];
$i++;
print " <a href=\"$datapath/$filename\">$filename</a><BR>";
}
}
else if ($linker == "1")
{
$direclist = mysql_query("select * from filename where counter = '$id'");
while ($row = mysql_fetch_assoc($direclist))
{
$idnumber = $row["id"];
$filename = $row["files"];
$datapath = $row["datafield"];
$i++;
print "id: $i";
print " <a href=\"$datapath/$filename\">$filename</a><BR>";
}
print "<BR><BR><a href=\"http://12.248.153.186/files.php\">Back</a>";
}
?>