حقن قواعد البيانات SQL INJECTION
#2
هذا حل مؤقت
PHP كود :
function Escape_String( const str: string): string;
var
  i: Byte;
const
  oldChars : array[0..8] of string[4]= ('\\',  '\x00', '\n',  '\r',  '''',  '"', '\x1a','--',';');
begin
  Result 
:= str;
  for i := 0 to high(oldChars) do
    Result := StringReplace(Result, oldChars[i], '', [rfReplaceAll])
end; 


PHP كود :
'SELECT *  FROM `users` where username ="'+Escape_String(Edit1.text)+'" AND password="'+Escape_String(Edit2.text)+'"' 
[-] كل من 3 users say قال شكرا ل onexite على المشاركة المفيدة
  • أبو معاذ, S.FATEH, Lam.Abdeldjalil
الرد


الردود في هذا الموضوع
حقن قواعد البيانات SQL INJECTION - بواسطة onexite - 16-04-2019, 10:03 AM
RE: حقن قواعد البيانات SQL INJECTION - بواسطة onexite - 19-04-2019, 06:21 PM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم