Old 7th June 2003, 15:34   #1
ctn|chrisw
Forum King
 
ctn|chrisw's Avatar
 
Join Date: Mar 2002
Location: Hell
Posts: 3,309
php help?

Im trying to make it so I can submit using the dosomething plugin for winamp, the current playing song, artist, and album that Im listening to. I got a script that submits the song and it works
PHP Code:
<?php
      
require_once('config.php');
      
mysql_connectlocalhostchrisw$password);
      
mysql_select_db(chrisw_at);
      
mysql_query("Update $table set artist = '".$_GET["artist"]."', title = '".$_GET["title"]."', album = '".$_GET["album"]."' WHERE name = '$_GET[name]'  ");
?>
but now im stumped to how to get it out of the db so that it will select from the where the name = song and will output it like
Artist: current artist's name
Title: Current song's title
Album: Current Album.
Does anyone have any idea cause Im stumped :\


ctn|chrisw is offline   Reply With Quote
Old 7th June 2003, 15:45   #2
fwgx
Rudolf the Red.
(Forum King)
 
fwgx's Avatar
 
Join Date: Nov 2000
Posts: 9,314
$query = "SELECT * from $table WHERE name = $song";
$result = mysql_query($query);
$num = mysql_affected rows();

if ($num == 0) {
echo "Artist: $result[0]";
echo "Song: $result[1]";
echo "Album: $result[2]";

} else {
do something else
}

"We think science is interesting and if you disagree, you can fuck off."
fwgx is offline   Reply With Quote
Old 9th June 2003, 05:20   #3
pma
Junior Member
 
Join Date: Jun 2003
Posts: 18
you can ger more help from phpbuilder.com
pma is offline   Reply With Quote
Old 9th June 2003, 08:03   #4
FesterHead
Alumni
 
FesterHead's Avatar
 
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
This thread might help some.

FesterHead is offline   Reply With Quote
Old 9th June 2003, 09:36   #5
ctn|chrisw
Forum King
 
ctn|chrisw's Avatar
 
Join Date: Mar 2002
Location: Hell
Posts: 3,309
I got it a day or two ago thanks
http://www.chrisw.us/np/w00t.php (b00n wrote the code for t3h bottom)


ctn|chrisw is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Community Center > General Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump