Click here to Skip to main content
15,887,244 members
Home / Discussions / Database
   

Database

 
AnswerRe: MySQL Silent Installation Pin
Richard Deeming6-Mar-14 9:49
mveRichard Deeming6-Mar-14 9:49 
GeneralRe: MySQL Silent Installation Pin
Jassim Rahma6-Mar-14 9:52
Jassim Rahma6-Mar-14 9:52 
GeneralRe: MySQL Silent Installation Pin
Garth J Lancaster6-Mar-14 9:55
professionalGarth J Lancaster6-Mar-14 9:55 
GeneralRe: MySQL Silent Installation Pin
Jassim Rahma6-Mar-14 9:57
Jassim Rahma6-Mar-14 9:57 
AnswerRe: MySQL Silent Installation Pin
jschell7-Mar-14 9:28
jschell7-Mar-14 9:28 
QuestionSSRS reports shrinks on chrome browser Pin
Kenn20026-Mar-14 2:32
professionalKenn20026-Mar-14 2:32 
AnswerRe: SSRS reports shrinks on chrome browser Pin
Snehasish_Nandy7-Mar-14 19:14
professionalSnehasish_Nandy7-Mar-14 19:14 
Questionarabic text is saved as unreadable characters Pin
Jassim Rahma5-Mar-14 23:49
Jassim Rahma5-Mar-14 23:49 
Hi,

I am having a problem saving from my php for to MySQL database. I am not sure if the problem is at the PHP level or database level.

here is the form:

http://www.jassimrahma.com/contactme[^]

and when submiting arabic characters... it will be saved as unreadable characters like this:

http://www.jassimrahma.com/arabic.png[^]

My database character set is UTF-8 Unicode and Collation is utf8_general_ci

here is my table DDL:

CREATE TABLE `mubadara_messages` (
  `message_id` int(11) NOT NULL AUTO_INCREMENT,
  `message_from_name` varchar(255) DEFAULT NULL,
  `message_from_email` varchar(255) DEFAULT NULL,
  `message_subject` varchar(255) DEFAULT NULL,
  `message_body` text,
  `message_ip_address` varchar(255) DEFAULT NULL,
  `created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`message_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;


and this is my PHP:

PHP
require 'PHPMailer/class.phpmailer.php';

$message_visitor_name = $_POST['txtName'];
$message_visitor_email = $_POST['txtEmail'];
$message_subject = $_POST['txtSubject'];
$message_body = $_POST['txtMessage'];
$message_ip_address = $_SERVER['REMOTE_ADDR'];

// save the message
$mysql_connection = mysql_connect('mysql.jassimrahma.com', 'jassimdb', 'Mujtaba2013');
mysql_select_db('jassimrahma_com', $mysql_connection);

// $mysql_connection = mysql_connect('localhost', 'root', 'xxxxxxxxxxxx');
// mysql_select_db('jassimrahma', $mysql_connection);

$mysql_command = "INSERT INTO mubadara_messages (message_from_name, message_from_email, message_subject, message_body, message_ip_address) VALUES ('$message_visitor_name', '$message_visitor_email', '$message_subject', '$message_body', '$message_ip_address')";
$mysql_result = mysql_query($mysql_command, $mysql_connection) or die(mysql_error());
// $mysql_result = mysql_query("SELECT project_name FROM projects WHERE project_id = 13");
// echo $mysql_result;
mysql_close($mysql_connection);

exit(header("Location: thankyou"));


can anyone help please


Thanks,
Jassim


Technology News @ www.JassimRahma.com


modified 6-Mar-14 5:57am.

AnswerRe: arabic text is saved as unreadable characters Pin
Bernhard Hiller7-Mar-14 2:48
Bernhard Hiller7-Mar-14 2:48 
QuestionSelecting a row with least creation time without using top Pin
Prasad A5-Mar-14 19:53
Prasad A5-Mar-14 19:53 
AnswerRe: Selecting a row with least creation time without using top Pin
Jörgen Andersson5-Mar-14 21:23
professionalJörgen Andersson5-Mar-14 21:23 
AnswerRe: Selecting a row with least creation time without using top Pin
Kornfeld Eliyahu Peter5-Mar-14 22:00
professionalKornfeld Eliyahu Peter5-Mar-14 22:00 
GeneralRe: Selecting a row with least creation time without using top Pin
Eddy Vluggen6-Mar-14 3:00
professionalEddy Vluggen6-Mar-14 3:00 
GeneralRe: Selecting a row with least creation time without using top Pin
Kornfeld Eliyahu Peter6-Mar-14 3:10
professionalKornfeld Eliyahu Peter6-Mar-14 3:10 
GeneralRe: Selecting a row with least creation time without using top Pin
Eddy Vluggen6-Mar-14 5:12
professionalEddy Vluggen6-Mar-14 5:12 
GeneralRe: Selecting a row with least creation time without using top Pin
Kornfeld Eliyahu Peter6-Mar-14 5:30
professionalKornfeld Eliyahu Peter6-Mar-14 5:30 
GeneralRe: Selecting a row with least creation time without using top Pin
Simon_Whale6-Mar-14 5:07
Simon_Whale6-Mar-14 5:07 
GeneralRe: Selecting a row with least creation time without using top Pin
Jörgen Andersson6-Mar-14 11:01
professionalJörgen Andersson6-Mar-14 11:01 
SuggestionRe: Selecting a row with least creation time without using top Pin
Eddy Vluggen6-Mar-14 7:31
professionalEddy Vluggen6-Mar-14 7:31 
AnswerRe: Selecting a row with least creation time without using top Pin
Yes Yes Yes7-Mar-14 1:30
Yes Yes Yes7-Mar-14 1:30 
QuestionInsufficient privileges : Dynamic View Creation ORACLE Pin
prathameshpitale5-Mar-14 0:06
prathameshpitale5-Mar-14 0:06 
AnswerRe: Insufficient privileges : Dynamic View Creation ORACLE Pin
Jörgen Andersson5-Mar-14 1:58
professionalJörgen Andersson5-Mar-14 1:58 
GeneralRe: Insufficient privileges : Dynamic View Creation ORACLE Pin
prathameshpitale5-Mar-14 22:23
prathameshpitale5-Mar-14 22:23 
GeneralRe: Insufficient privileges : Dynamic View Creation ORACLE Pin
Jörgen Andersson5-Mar-14 22:58
professionalJörgen Andersson5-Mar-14 22:58 
QuestionMS ACCESS ODBC Problem Pin
Aravinth Spirited1-Mar-14 6:28
Aravinth Spirited1-Mar-14 6:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.