read: \"you fail at life =]\" yuh
is being put into the database from a form submit obviously i dont want the backslashes. how do i get the backslashes rom being inserted into the mysql db table?
my code is $code = mysql+real_escape_string($_POST[code]);
then insert it with mysql query. how do i make the backslashes disapear but it still be safe from mysql injections?
SKANK!!!!! 5 Posting Pro in Training
Recommended Answers
Jump to PostYou can also do:
$query = mysql_query("SELECT * FROM table"); while( $arr = array_map('stripslashes',mysql_fetch_array( $query )) ) { echo "ID: {$arr['id']} VALUE: {$arr['value']}\n"; }
All 4 Replies
FlashCreations 20 Posting Whiz
SKANK!!!!! 5 Posting Pro in Training
FlashCreations 20 Posting Whiz
somedude3488 228 Nearly a Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.