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
691
November 14, 2020 08:14AM
273
November 14, 2020 11:21AM
304
November 14, 2020 12:15PM
297
November 14, 2020 04:01PM
1277
November 15, 2020 03:41AM
1301
November 15, 2020 10:59AM
305
November 15, 2020 12:53PM
299
November 15, 2020 02:27PM
331
November 15, 2020 04:07PM
270
November 15, 2020 06:15PM


Sorry, you can't reply to this topic. It has been closed.

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.