Danke
nun hab ich es so weit es geht aber leider noch immer nicht
kann mir wer helfen
wie rufe ich die mp3 datei in zweiteseite.php auf über einen link mit GET['zwei'] in songs.php
zweiteseite.php
PHP-Code:
<html>
<head>
<title>4HIA</title>
</head>
<body bgcolor = "#FFCC99" text = "#AABBFF" link = "#AABBFF" vlink = "#DDEEFF" alink = "#AACCDD">
<h1>NAVIGATION</h1>
<hr noshade = "noshade" width = "600" size = "3" align = "center">
<font face = "Castellar" color ="#AABBFF" size = "4">Michael Tomasitz</font></p>
<?php
error_reporting(E_ALL);
$db = mysql_connect("localhost", "root", "xxxxxx") or die(": " . mysql_error());
if(!mysql_select_db("php", $db))
{
die("Datenbank php konnte nicht ausgewählt werden");
}
srand((double)microtime()*1000000);
$randomnumber = rand(0,100);
$result = mysql_db_query("php", "select id, name, verzeichnis, rand($randomnumber) as rand from mp3s order by rand($randomnumber) limit 0, 100");
$number = mysql_num_rows($result);
for($i = 0; $i < $number; $i++)
{
$eins = mysql_result($result, $i, "id");
$zwei = mysql_result($result, $i, "name");
$drei = mysql_result($result, $i, "verzeichnis");
$vier = mysql_result($result, $i, "rand");
/*echo"<IFRAME src=\"songs.htm\" width=\"500\" height=\"700\""
echo"scrolling=\"auto\" frameborder=\"1\">"
echo"[Your user agent does not support frames or is currently configured"
echo"not to display frames. However, you may visit"
echo"<a href=\"songs.htm\">the related document.</a>]"
echo"</IFRAME>"*/
echo "<hr noshade = \"noshade\" width = \"600\" size = \"3\" align = \"center\">";
/*echo "
".$eins."-".$zwei."</p>";*/
echo "
".$eins." - <a href = \"./songs.php?zwei=$zwei\" target = \"zweiteseite\">".$zwei."</a></p>";
}
/*$a = array("0" => '0');
for($l = 1; $l < $number; $l++)
{
$a[] = '0';
}
$j = 0;
do
{
srand((double)microtime()*1000000);
$random = rand(0, $number - 1);
if($j != $number)
{
while($a[random] == '1')
{
srand((double)microtime()*1000000);
$random = rand(0, $number - 1);
}
}
$a[random] = '1';
$j++;
$eins = mysql_result($result, $random, "id");
$zwei = mysql_result($result, $random, "name");
$drei = mysql_result($result, $random, "verzeichnis");
echo "<hr noshade = \"noshade\" width = \"600\" size = \"3\" align = \"center\">";
echo "
".$eins."-".$zwei."</p>";
}while($j != $number);*/
//}while($i = 0; $i < $number; $i++);
mysql_free_result($result);
//falls der speicherverbrauch zu hoch ist
//wird er mit mysql_free_result(ergebniskennung)
//für andere anfragen wieder frei
mysql_close($db);
?>
</body>
<html>
songs.php
PHP-Code:
<html>
<head>
<title>4HIA</title>
</head>
<body>
<?php
if(isset($_GET['zwei']))
{
echo'<OBJECT';
echo'id="musik_1"';
echo'width="240"';
echo'height="200"';
echo'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"';
echo'codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0">';
echo'<param name="SRC"';
echo'value="http://localhost/php/".$_GET['zwei'].".mp3">';
echo'<param name="autoplay" value="true">';
echo'<param name="controller" value= "true">';
echo'<param name="type" value= "video/quicktime">';
echo'<param name="pluginspage"';
echo'value="http://www.apple.com/quicktime/download/index.html">';
echo'<param name= "cache" value= "true">';
echo'<param name= "loop" value= "palindrome">';
echo'<param name= "bgcolor" value= "663333">';
echo'<embed';
echo'name="musik_1"';
echo'width="240"';
echo'height="200"';
echo'cache = "true"';
echo'loop = "palindrome"';
echo'bgcolor="663333"';
echo'src="http://localhost/php/".$_GET['zwei'].".mp3"';
echo'type="video/quicktime"';
echo'autoplay="true"';
echo'controller="true"';
echo'enablejavascript="true"';
echo' pluginspage="http://www.apple.com/quicktime/download/index.html">';
echo'</embed>';
echo'</OBJECT>';
}
?>
</body>
</html>
ersteseite.htm
PHP-Code:
<html>
<head>
<title>4HIA</title>
</head>
<body bgcolor = "#FFCC99" text = "#AABBFF" link = "#AABBFF" vlink = "#DDEEFF" alink = "#AACCDD">
<h1>LINKS</h1>
<a href = "http://www.phpfriend.de" target = zweiteseite align = "left" alt =>PHP SEITE</a>
<font face = "Castellar" color ="#AABBFF" size = "4">Michael Tomasitz</font></p>
</body>
<html>
start.htm
PHP-Code:
<html>
<head>
<title>4HIA</title>
<!--
<?php
@session_start();
if(!isset($_SESSION['nutzer'] && !isset($SESSION_['kennung']))
{
echo "<html><head><title>4HIA</title></head><body bgcolor = "#FFCC99" text = "#AABBFF" link = "#AABBFF" vlink = "#DDEEFF" alink = "#AACCDD"><hr noshade = "noshade" width = "600" size = "3" align = "center"><center><font face = "Castellar" color = "#FFCC88" size = "4">Michael Tomasitz</font></center><hr noshade = "noshade" width = "600" size = "3">
<center>Falsches Passwort oder Benutzer
</center><center><font face ="Castellar" color ="#FFCC22" size ="-1"><a href ="form1.htm" align ="center" alt =>Zurück zum Login</a></font></center>
</body></html>"
exit;
}
?>
-->
</head>
<frameset cols = "250,*">
<frame src = "ersteseite.htm" name ="ersteseite" scrolling = "no" frameborder ="0">
<frame src = "zweiteseite.php" name ="zweiteseite" scrolling = "yes">
<noframes>
Ihr Browser verwendet keine Frames</p>
</noframes>
</frameset>
</html>