Jump to content


Photo

addslashes help


  • Please log in to reply
4 replies to this topic

#1 stlmike

stlmike
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 09 October 2006 - 05:25 AM

Im pulling some info from the database, and i want to add slashes to it. For some reason it's not adding them in. I got no idea why its not.

Is there certin trick i need to do for this?

#2 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 09 October 2006 - 05:44 AM

Please post an example of your code that you are using to add the slashes

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#3 stlmike

stlmike
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 09 October 2006 - 05:53 AM

Hopely i didnt mess this up typing it here
Thanks

$test = mysql_query("SELECT object from mytable");

while($asdf=mysql_fetch_array($test))

{  
$gobject = $asdf["object"];
$output .= addslashes($gobject);
}

echo $output;  


#4 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 09 October 2006 - 06:10 AM

I don't realy see why that would be working. Are there quotes in the text and do you have magic_quotes_gpc turned on?

EDIT
I meant wouldn't not would..lol

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#5 stlmike

stlmike
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 09 October 2006 - 06:14 AM

Edit n/m i feel like a moron now.

I got my problem resolved

Thanks for the help anyways!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users