NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page real media and php with mysql

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 06-21-2003, 05:55 AM THREAD STARTER               #1 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer

real media and php with mysql


yo

ive got a file called test.php and when the user opens it they are presented with some links which go to test.php?url=*REALMEDIANAME* for example test.php?url=foamo.rm

ive then got my embed code for the real media

PHP Code:
<embed src="<? echo $url?>" width="321" height="71" autostart="true"></embed></p>
and it should echo the ?url=foamo.rm, it echos it fine but it only echos the first audio in the database (it echos id 1)
????: NamePros.com http://www.namepros.com/programming/14878-real-media-and-php-with-mysql.html

below is my code anyone know why it doesnt work?

cheers
PHP Code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<?php

$username 
"adam123";
$pass "adam123";
????: NamePros.com http://www.namepros.com/showthread.php?t=14878

mysql_connect("localhost""$username""$pass");
mysql_select_db("salaciou_audio");
$select "SELECT * FROM `audio`";

$resultmysql_query($select);
while(
$data mysql_fetch_array($result)){
$url$data["url"];
$title$data["title"];
echo 
"
<a href='test.php?url=
$url'>Play $title</a><br>
"
;
}

?>
<p>
  <embed src="<? echo $url?>" width="321" height="71" autostart="true"></embed></p>
</body>
</html>
adam_uk is offline  
Old 06-21-2003, 04:19 PM   #2 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



Wild guess here, but what happens if you change this:

$select = "SELECT * FROM `audio`";

to:

$select = "SELECT url FROM `audio`";
deadserious is offline  
Old 06-22-2003, 04:24 AM THREAD STARTER               #3 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
i thought i deleted this


thanks for the reply but ive sorted it now thanks
adam_uk is offline  
Closed Thread

« Layers | cgi help.. »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 04:40 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger