MySQL Forums
Forum List  »  German

Formular encrypt
Posted by: hans klawun
Date: November 14, 2020 08:14AM

Code:
###

$db = new dbaccess();

//Felder aus dem Formular auslesen
if (isset($_POST["Vorname"]))
$form_vorname = $db->EscapeString($_POST["Vorname"]);
else $form_vorname = "";

if (isset($_POST["Name"]))
$form_name = $db->EscapeString($_POST["Name"]);
else $form_nachname = "";

if (isset($_POST["email"]))
$form_email = $db->EscapeString($_POST["email"]);
else $form_email = "";

//Erklärung:
//Vorname = Name des Feldes im Formular


//SQL-Befehl erstellen - formulardaten = Tabellenname aus MySQL
$sql = "INSERT INTO formulardaten (Vorname, Name, email)";
$sql .= " VALUES ('" . $form_vorname . "','" . $form_name . "','" . $form_email;
$sql .= "')";

$db->ExecuteSQL($sql);
###

Wie kann ich die Daten codiert AES-128 in der Datenbank speichern ?

Das scheint nicht zu funktionieren:

###
$sql = "INSERT INTO formulardaten (Vorname, Name, email)";
$sql .= " VALUES ('" . AES_ENCRYPT($form_vorname, "pass") . "','" . AES_ENCRYPT($form_name, "pass") . "','" . AES_ENCRYPT($form_email, "pass");
$sql .= "')";
###

Währe toll. wenn mir da jemand helfen könnte

Hans

Options: ReplyQuote


Subject
Views
Written By
Posted
Formular encrypt
158
November 14, 2020 08:14AM
41
November 14, 2020 11:21AM
41
November 14, 2020 12:15PM
43
November 14, 2020 04:01PM
1015
November 15, 2020 03:41AM
1068
November 15, 2020 10:59AM
44
November 15, 2020 12:53PM
47
November 15, 2020 02:27PM
44
November 15, 2020 04:07PM
47
November 15, 2020 06:15PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.