|
|
|
การเพิ่มข้อมูลที่มีอักขระพิเศษพวก &,'," ทำไงค่ะ |
|
|
|
|
|
|
|
Code (PHP)
mysql_real_escape_string()
Code (PHP)
<?php
// Connect
$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
OR die(mysql_error());
// Query
$query = sprintf("SELECT * FROM users WHERE user='%s' AND password='%s'",
mysql_real_escape_string($user),
mysql_real_escape_string($password));
?>
|
|
|
|
|
Date :
2011-07-23 09:43:45 |
By :
thaicreate |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|