FuZzI Posted November 21, 2007 Share Posted November 21, 2007 I added a feature in the profile where they can add a link to a music file and it will play it in their profile. The only problem is that, when someone visits someone else profile, it plays their own song instead of the other members song. I know this is because I didn't add a script so it can play the other members song. So far, I only have this PHP script when someone views a profile: <embed src="<?PHP echo "$music"; ?>" width=0 height=0 play=true loop=true quality=high> </embed> I don't know the script that will allow to play only the members profile song and not their own. Quote Link to comment https://forums.phpfreaks.com/topic/78287-solved-make-members-listen-to-other-members-profile-music/ Share on other sites More sharing options...
Wes1890 Posted November 21, 2007 Share Posted November 21, 2007 what does the $music var consist of? you've not provided enough info Quote Link to comment https://forums.phpfreaks.com/topic/78287-solved-make-members-listen-to-other-members-profile-music/#findComment-396204 Share on other sites More sharing options...
FuZzI Posted November 21, 2007 Author Share Posted November 21, 2007 Sorry, The $music is the link to the music file (.mp3) that the member chooses. I am really new to this and very sorry if I don't provide enough information regarding my question. If you need more information in order to help me out, please let me know. Quote Link to comment https://forums.phpfreaks.com/topic/78287-solved-make-members-listen-to-other-members-profile-music/#findComment-396208 Share on other sites More sharing options...
premiso Posted November 21, 2007 Share Posted November 21, 2007 Your looking in the wrong spot. What really matters is how you pulled $music out of the database. It seems as though it is carried along with the viewing user and used that way instead of it being assigned to the current profile that is being viewed. Find where the data is being pulled out and store the user's profile who is being viewed music information in $music and it should work. Quote Link to comment https://forums.phpfreaks.com/topic/78287-solved-make-members-listen-to-other-members-profile-music/#findComment-396289 Share on other sites More sharing options...
FuZzI Posted November 22, 2007 Author Share Posted November 22, 2007 If I understood correctly, it was only playing the members music because the script only said to play his one and not the profile's one. After checking the script, I've realized that I had the fetch $music script on top of the $viewprofile. So, I tried changing it around a few times for a few hours but never got anything. It's not even playing any music now. Does this look good? <? $lijstGebruikers = "SELECT * FROM users WHERE username='$viewprofile'"; $resultLijstGebruikers = mysql_query($lijstGebruikers); while ($row = mysql_fetch_array($resultLijstGebruikers)) { ?> <html> <head> <div class="window"> <div class="mainTitle">View Profile</div> <div class="mainText"> <table border=1 width=95%><tr><td background="images/bgMainTitle.jpg"><center><b><? echo $username2 ?>'s Profile</b></center></td></tr></table> <table border=1 width=95%> </head> <embed src="<?php echo "$fetch->music"; ?>" width=0 height=0 play=true loop=true quality=high> </embed> <body> <tr><td width="90"><b>Name:</b></td><td><? echo "<a class=\"menuItem\" href=\"inbox.php?naampie=$username2\"> $username2</a>"; ?> <? if ($row[moderator] == 0) { echo " "; $i++; } else { if ($row[moderator] == 3) { echo "<font color=yellow>(Programmer)</font>"; $i++; } else { if ($row[moderator] == 2) { echo "<font color=red>(Admin)</font>"; $i++; } else { if ($row[moderator] == 1) { echo "<font color=green>(Helpdesk)</font>"; $i++; } } } } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/78287-solved-make-members-listen-to-other-members-profile-music/#findComment-396581 Share on other sites More sharing options...
FuZzI Posted November 22, 2007 Author Share Posted November 22, 2007 Could someone please help me, I'm really stuck ??? Quote Link to comment https://forums.phpfreaks.com/topic/78287-solved-make-members-listen-to-other-members-profile-music/#findComment-397126 Share on other sites More sharing options...
gtal3x Posted November 23, 2007 Share Posted November 23, 2007 <? $lijstGebruikers = "SELECT * FROM users WHERE username='$viewprofile'"; $resultLijstGebruikers = mysql_query($lijstGebruikers); while ($row = mysql_fetch_array($resultLijstGebruikers)) { ?> Were did you get the $row? Unless its diclared somewere else, the script is wrong.... Quote Link to comment https://forums.phpfreaks.com/topic/78287-solved-make-members-listen-to-other-members-profile-music/#findComment-397159 Share on other sites More sharing options...
FuZzI Posted November 24, 2007 Author Share Posted November 24, 2007 I found the problem. It's fixed. Thanks a lot for the support. Quote Link to comment https://forums.phpfreaks.com/topic/78287-solved-make-members-listen-to-other-members-profile-music/#findComment-398167 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.