Jump to content

anthrt

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

anthrt's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm doing some work with the Discogs API trying to serialize the data of a release for use in another local application. A release on Discogs is something like a music album, so it contains the tracklisting, artists, remixers etc. Here is a sample track row returned from the API (xml) <track> <artists> <artist> <name>Ramirez</name> <join>And</join> </artist> <artist> <name>Tajada</name> </artist> </artists> <title>Listen To The Drums</title> <duration>8:10</duration> </track> Which more simply looks like this: Ramirez And Tajada - Listen To The Drums On this, I need to class the artist "Tajada" as a guest on this track, however, the "role" is defined in the previous artist's XML row: <name>Ramirez</name> <join>And</join> How can I sort through the rows to 'swap' these around? Ideally it would look like this: <track> <artists> <artist> <name>Ramirez</name> </artist> <artist> <name>Tajada</name> <join>And</join> </artist> </artists> <title>Listen To The Drums</title> <duration>8:10</duration> </track> Thanks for any help.
  2. Try putting $sub = 0; Outside of the loop
  3. echo strtoupper(substr(md5(rand().rand()), 0, 5));
  4. echo "<a href=\"index.php?p=articles&name=".data['name']."\">".data['name']"</a>"; You're missing $ before your data variables.
  5. You're commenting out all of the lines where $test is defined. That's why it's not working.
  6. graph = new Graph(300,200,"auto"); missing a $
  7. http://uk.php.net/manual/en/function.htmlspecialchars.php
  8. Looks fine to me, have you checked the source in Firefox/IE (or whatever your browser is) to make sure that the variables are being filled in correctly? Also, if you're putting a lot of HTML in with your PHP code, you might want to look at the heredoc syntax.
  9. <?php $check = substr($url, 0, 7); if($check != 'http://') { $errors[] = "Your URL looks invalid, does it start with http://"; } ?>
  10. http://www.skoogo.com/search.php?subsearchforum=
  11. You arent doing any validation on the seeSaved variable in regex_tester.php, you can use any character and it exposes your absolute path. http://nancywalshee03.freehostia.com/regextester/regex_tester.php?seeSaved=hello http://nancywalshee03.freehostia.com/regextester/regex_tester.php?seeSaved=../ Out of curiosity, how are you generating the sample script's variable names? i.e. 6fzm0zcc etc?
  12. http://www.mcatzone.com/testsetting.php You aren't doing any validation on the first 2 textboxes, you can type letters, punctuation in there etc. Error in query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ee' at line 1 You can also register with punctuation as your username, i.e. '''''"""!#@#@
  13. There are messages that are displayed, it's the $msg variable in the function. They are showing so obviously the condition is being met.
  14. Heh, good call. I never thought twice about that. Alas, it still doesn't seem to be working. I thought that would have been it, but I guess not. foreach ($songs as $song) { $song['Name'] = mysql_real_escape_string($song['Name']); $song['Artist'] = mysql_real_escape_string($song['Artist']); $song['Album'] = mysql_real_escape_string($song['Album']); $song['Genre'] = mysql_real_escape_string($song['Genre']); $song['Kind'] = mysql_real_escape_string($song['Kind']); $song['Size'] = mysql_real_escape_string($song['Size']); $song['Total Time'] = mysql_real_escape_string($song['Total Time']); $song['Year'] = mysql_real_escape_string($song['Year']); $song['Bit Rate'] = mysql_real_escape_string($song['Bit Rate']); $song['Sample Rate'] = mysql_real_escape_string($song['Sample Rate']); $song['Equalizer'] = mysql_real_escape_string($song['Equalizer']); $song['Play Count'] = mysql_real_escape_string($song['Play Count']); $song['Location'] = mysql_real_escape_string($song['Location']); if(checkrow($song, $msg)) { $sql = "query"; $query = $db->sql_query($sql); echo $msg; } The function is still the same as above.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.