Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hey, the {$e('$value')} idea is interesting.

old way:

  $sql_email=mysql_real_escape_string($email);
  $sql="UPDATE t WHERE id=123 SET email='$sql_email'";
your idea:

  $sql="UPDATE t WHERE id=123 SET email='{$e($email)}'";
Im not yet sure, which one I like more.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: