Jump to content

Justinx89x

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Justinx89x's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Tried that, but still it is still giving me trouble when trying to access a file that has a single quote. Here is the error I am getting. Query failed: 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 've Got)', 'http://www.dxcr.com/audio/tones/A Tribe Called Quest Here is how I setup the code. [code]// Performing SQL query         $query = "INSERT INTO nuke_audio_audio (title, url, artist) VALUES ('$arrArtistTitle[1]', 'http://www.dxcr.com/audio/tones/$filename', '$arrArtistTitle[0]')";         $filename = "Nirvana - Jesus Doesn't Want Me For a Sunbeam";         $filename = mysql_escape_string($filename);         echo $result = mysql_query($query) or die('Query failed: ' . mysql_error());[/code]
  2. [!--quoteo(post=367800:date=Apr 23 2006, 06:53 PM:name=shimano55)--][div class=\'quotetop\']QUOTE(shimano55 @ Apr 23 2006, 06:53 PM) [snapback]367800[/snapback][/div][div class=\'quotemain\'][!--quotec--] Did you add the )???? Your code should look like: [code] // Performing SQL query         $query = "INSERT INTO nuke_audio_audio (title, url, artist) VALUES ('$arrArtistTitle[1]', 'http://www.dxcr.com/audio/tones/$filename', '$arrArtistTitle[0]')";         echo $result = mysql_query($query) or die('Query failed: ' . mysql_error());[/code] Is that how it looks? -shimano55 [/quote] Yeah that fixed the problem, I realized that right after I posted the message. It looks like it works now, but I am now faced with another problem. My script will malfunction when it sees a single quote(') in any filename. Any ideas how to make it ignore that?
  3. [!--quoteo(post=367798:date=Apr 23 2006, 06:44 PM:name=shimano55)--][div class=\'quotetop\']QUOTE(shimano55 @ Apr 23 2006, 06:44 PM) [snapback]367798[/snapback][/div][div class=\'quotemain\'][!--quotec--] Take out the single quotes around title, url, and artist. By the way, you also need to add another ) after '$arrArtistTitle[0]'. [/quote] Thanks for your help, but now I am recieving another error. It says... Query failed: 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 've Got)', 'http://www.dxcr.com/audio/tones/A Tribe Called Quest
  4. I am having problems with this line of my script... [code] // Performing SQL query         $query = "INSERT INTO nuke_audio_audio ('title', 'url', 'artist') VALUES ('$arrArtistTitle[1]', 'http://www.dxcr.com/audio/tones/$filename', '$arrArtistTitle[0]'";         echo $result = mysql_query($query) or die('Query failed: ' . mysql_error());[/code] I get an error that says... Query failed: 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 ''title', 'url', 'artist') VALUES The script I am making takes a bunch of music files and puts them into a database
  5. How can I modify my template file to put something like this... [img src=\"http://www.dxcr.com/whatiwant.JPG\" border=\"0\" alt=\"IPB Image\" /] here... [img src=\"http://www.dxcr.com/whatihave.JPG\" border=\"0\" alt=\"IPB Image\" /] The template file I am trying to change is the file that has the template for everytime a game is opened. I want my users to be able to see a code that they can copy and paste on to their site. Here is my template code...<br> [code] <?php $templates = array(); $templates['category'] = '<div class=\"header\">{$category[\'cName\']}</div> {$gamedata}'; $templates['game'] = '<div class=\"game\"> <p class=\"img\"> <img src=\"{$this->imgdir}/{$game[\'gThumb\']}\" alt=\"{$game[\'gName\']} - {$game[\'gDescription\']}\" /> </p> <p class=\"ic\"> <strong>{$game[\'gName\']}</strong> <br /> {$game[\'gDescription\']} <br /> <strong><a href=\"{$_SERVER[\'PHP_SELF\']}?act=play&id={$game[\'gId\']}\">Play</a></strong> </p> <div style=\"clear:both\"></div> </div>';                                   $templates['gdoublewrapper'] = '<div> {$games} <div style=\"clear:both\"></div> </div>'; $templates['list_wrapper_all'] = '<div class=\"header\">{$action}</div> <p class=\"general\" style=\"margin-bottom: 10px;\"> {$list} </p>'; $templates['list_repeat_all'] = '<a href=\"{$_SERVER[\'PHP_SELF\']}?act=play&id={$stat[\'gId\']}\">{$stat[\'gName\']}</a><em>{$extra}</em><br />'; $templates['game_play'] = ' <div class=\"playcenter\"> <p class=\"header\">{$game[\'cName\']} ยป {$game[\'gName\']}</p> <object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"{$game[\'gWidth\']}\" height=\"{$game[\'gHeight\']}\">   <param name=\"movie\" value=\"{$this->swfdir}/{$game[\'gSwfFile\']}\" />   <param name=\"quality\" value=\"high\" />   <embed src=\"{$this->swfdir}/{$game[\'gSwfFile\']}\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"{$game[\'gWidth\']}\" height=\"{$game[\'gHeight\']}\"></embed> </object> <p class=\"header\"> </p> <p class=\"general\"><strong>Description: </strong>{$game[\'gDescription\']}<br /> <strong>Player: </strong>You are player number {$this->gamedata[$game[\'gInCategory\']][\'games\'][$game[\'gId\']][\'Played\']}</p> <br> </div>'; ?>[/code]
×
×
  • 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.