Created
July 30, 2019 11:37
-
-
Save BMU-Verlag/d3b95c5653011e8f005c00b02697c927 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table width="400" border="0" align="center" cellpadding="3" cellspacing="0"> | |
<tr> | |
<td> | |
<strong> | |
<a href="viewgaestebuch.php">Gästebuch ansehen</a> | |
<a href="gastebuch.htm">Gästebuch unterschreiben</a> | |
</strong> | |
</td> | |
</tr> | |
</table> | |
<br> | |
<?php | |
$username = "gb"; | |
$password = "gb"; | |
$database = "gastebuch"; | |
$mysqli = new mysqli("localhost", $username, $password, $database); | |
$field1 = $mysqli->real_escape_string($_POST['gbName']); | |
$field2 = $mysqli->real_escape_string($_POST['gbEmail']); | |
$field3 = $mysqli->real_escape_string($_POST['gbEintrag']); | |
$query = "INSERT INTO guestbook (name, email, comment )VALUES ('{$field1}','{$field2}','{$field3}')"; | |
$mysqli->query($query); | |
$mysqli->close(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment