Oprano Front Page


Go Back   Oprano Adult Industry Forums > The Business Of Porn - Closed For Posting > Legacy Archived Main Board

Notices

Legacy Archived Main Board Business chat and general industry chat. All participation is welcome. Dont post your fucking spam here.





Check Out YnotMail

The Original Oprano Flat Board (Thanks To Sarettah!)---
Oprano Swag Shop
"History Of Porn Timeline
Reply
 
Thread Tools Display Modes
Old 11-09-2008   #1
sarettah
Stay Out Of The Box
Want to see your own Advertising Here!
 
sarettah's Avatar
 
Join Date: Oct 2002
Location: Lost in the ozone
Posts: 10,318
Default Re: PHP gurus...help please!

Quote:
Originally Posted by sarettah View Post
Well that and if they are coming directly from the form she needs to protect against sql injection too, if that is not already happening.

I hate dealing with escapes, so I write my code to deal with them as little as possible..lol. It is the one thing about php that I don't like compared to the other languages I deal with.

My standard way of dealing with this shit if I have to is..

1. turn on mysql at the beginning of the script.
2. run all input vars through mysql_real_escape_string
3. run all input vars through addslashes
4. Stick them into the database

so.. like this

mysql_pconnect($mysql_host,$mysql_user,$mysql_ass) ;
mql_select_db($mysql_db);

$input_var=addslashes(mysql_real_escape_string($_P OST['input_var']));
$result=mysql_query("insert into database.tablename(field2insertinto)values(" . $input_var . ")");

But if the only thing I am dealing with is a single quote prob because it is a protected form or because I am doing an update routine that is not form fed then I just used the replace a single quote with 2 single quotes like I said orignally

I have that all fucked up dammit.

Helps to have coffee first.

Should not need the addslashes if I am using the mysql_real_escape as it will do the same fucking thing.

Hate when I screw that shit up.
__________________


Free Adult Webcams
sarettah is offline   Reply With Quote
Old 11-09-2008   #2
Nymph
Industry Member
 
Nymph's Avatar
 
Join Date: Mar 2003
Location: The Redneck Riviera
Posts: 739
Default Re: PHP gurus...help please!

I know I should switch to a new script, but this is the only way I get to talk with you sweetie
Nymph is offline   Reply With Quote
Old 11-09-2008   #3
Nymph
Industry Member
 
Nymph's Avatar
 
Join Date: Mar 2003
Location: The Redneck Riviera
Posts: 739
Default Re: PHP gurus...help please!

My knight in shining armour came through for me again.

I swear if I had a kid for him every time he has helped me with this stupid script, we'd have a basketball team by now!

Thanks again Sare...I'll love you forever & a day
Nymph is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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 On
Forum Jump


All times are GMT -4. The time now is 10:58 PM..


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright Evil Empire Inc. 2006-2022