Jump to content
php.lv forumi

mysql_real_escape_string()


pleite

Recommended Posts

palidzat luudzu kad eju majaslapaa radaas shis te Warning

: mysql_real_escape_string() expects parameter 1 to be string, resource given in

C:\xampp\htdocs\include\function.php

on line

27

 

 

ko tas nozimee kaa to izlabot?]

 

 

php kods:

 

function smart($value){

if (get_magic_quotes_gpc()){

$value = stripslashes($value);

}

if (!is_numeric($value)){

$value = mysql_real_escape_string($value);

 

}

$securiy = htmlspecialchars($value);

return $securiy;

}

Link to comment
Share on other sites

1) Nemaisi HTML Kopā ar PHP (atdali kodu).

2) Liec kodam tabus (padara kodu lasāmāku).

3) Šajā failā nebūs rinda, kas padod datus priekš smart() funkcijas, pameklē no kura faila sūta tos datus uz smart() funkciju, un tad to faila kontentu ieliec iekš paste.php.lv .

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...