i am connecting and saving useing this code , its not working , the result in db is ??????????????????????????????
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
$dbhost = '-------';
$dbuser = '-----------------';
$dbpass = '---------------';
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
if(! $conn ) {
die('Could not connect: ' . mysql_error());
}
$name=mysql_real_escape_ string($_GET['name']);
$phone=mysql_real_escape_ string($_GET['phone']);
$adress=mysql_real_escape_ string($_GET['adress']);
$besttimetocall=mysql_real_ escape_string($_GET[' besttimetocall']);
$sql = "INSERT INTO neww
(name,phone,adress, besttimetocall,date)
VALUES ('$name','$phone','$adress','$ besttimetocall',NOW())";
mysql_select_db('------------ ----------');
$retval = mysql_query( $sql, $conn );
mysql_query("SET NAMES UTF8");
if(! $retval ) {
die('Could not enter data: ' . mysql_error());
}
echo "Entered data successfully\n";
mysql_close($conn);
?>
--
댓글 없음:
댓글 쓰기