PEAR Packages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPEAR Packages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old February 14th, 2007, 11:33 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
MDB2 & mysql escape string ?

Hello everybody, thank you for letting me post onto your forums. This is my first project with PEAR & MDB2.

I don't really understand how to secure a variable to use within a database query string, like with mysql_real_escape_string.
Would the following code be considered as sane please ?

$res_username_password = $objMDB2->query('SELECT `iUserID`, `sPassword` FROM `users` WHERE `sName` = '.$objMDB2->quote($_POST['s_password'], 'text'));

Thank you in advance for your help

Reply With Quote
  #2  
Old May 10th, 2007, 05:49 PM
tim594 tim594 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: May 2007
Posts: 1 tim594 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m
Reputation Power: 0
That looks safe.

I use $objMDB2->escape( $input_here );

im not sure what the difference is....

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPEAR Packages > MDB2 & mysql escape string ?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT