Error database
Автор: I. Swhere is the error in the code that gives me this error (Unable to connect to database. Check your connection paramenters.) on this site http://radiojazz.id1945.com/contact.php
<?php
$settings['imEmailForm_5_1'] = array(
"owner_email_from" => "",
"owner_email_to" => "",
"customer_email_from" => "",
"customer_email_to" => "",
"owner_message" => "",
"customer_message" => "",
"owner_subject" => "",
"customer_subject" => "",
"owner_csv" => False,
"customer_csv" => False,
"db_host" => "31.170.164.247",
"db_name" => "u995108557_jazz",
"db_table" => "my_base",
"db_username" => "u995108557_admin",
"db_password" => "youtET2356",
"confirmation_page" => "../contact.php"
);
if(substr(basename($_SERVER['PHP_SELF']), 0, 11) == "imEmailForm") {
include "../res/x5engine.php";
$answers = array(
);
$form_data = array(
array('label' => 'Nume', 'value' => $_POST['name']),
array('label' => 'Mesajul', 'value' => $_POST['mesaj'])
);
$database_data = array(
"my_base" => $_POST['name'],
"my_base" => $_POST['mesaj']
);
$files_data = array(
);
if(@$_POST['action'] != "check_answer") {
if(!isset($_POST['imJsCheck']) || $_POST['imJsCheck'] != "jsactive")
die(imPrintJsError());
if(isset($_POST['imSpProt']) && $_POST['imSpProt'] != "")
die(imPrintJsError());
$storage = new imDatabase($settings['imEmailForm_5_1']['db_host'], $settings['imEmailForm_5_1']['db_name'], $settings['imEmailForm_5_1']['db_username'], $settings['imEmailForm_5_1']['db_password'], $settings['imEmailForm_5_1']['db_table'], $settings['imEmailForm_5_1']['general']['dir']);
if (!$storage->test_connection())
die("Unable to connect to database. Check your connection paramenters.");
if ($storage->addData($database_data, $files_data)) {
@header('Location: ' . $settings['imEmailForm_5_1']['confirmation_page']);
} else
die("A error has occurred while storing your data.");
} else {
if(@$_POST['id'] == "" || @$_POST['answer'] == "" || strtolower(trim($answers[@$_POST['id']])) != strtolower(trim(@$_POST['answer'])))
echo "0";
else
echo "1";
}
}
// End of file
Warum veröffentlichen Sie ihre Zugangs Daten:
"db_host" => "31.170.164.247", "db_name" => "u995108557_jazz", "db_table" => "my_base", "db_username" => "u995108557_admin", "db_password" => "youtET2356",
In v10 z. Bsp. benötigen Sie keinen Code für den Eintrag aus ihrem Mail form, sie geben lediglich die Zugangsdaten zur Datenbank und die Funktion im Mail form ein und schon wird die Datenbank mit den Feldern ausgerüstet und die Mails gespeichert.
Da Sie keine WX5 Software in Ihrem Account hier registriert haben, ist unklar, welche Version sie verwenden.
Gruss JJ
Автор
I'm using version v9.0.10
Hello Ilie,
The first thing to do would be to update to the latest release.
Add your licence key to your profile as a member of this forum and then visit this link:
http://answers.websitex5.com/profile/downloads
Once you have updated to 9.1.12.1975 we can provide further support.
Best regards,
Paul
Автор
where I made a mistake at any step?
Hello Ilie,
Please verify your licence details before proceeding further.
Kind regards,
Paul