dass der mir beim klick auf Speichern die Eingabefelder in conf.php speichert?
Mein erster Versuch:
Vorhandene Dateien:
Register.html:
test.php:
conf.php:
Mein erster Versuch:
Code:
$(document).ready(function(){ $('#button').click(function(){ alert($("#vorname").val()); });
Register.html:
Code:
<html> <head> <title> Register </title> <link rel="stylesheet" type="text/css" href="new2.css"> <script type="text/javascript" src="jquery-2.1.0.min.js"></script> <script type="text/javascript" src="scriptreg.js"></script> </head> <body> <div id="div12"> </br> <div id="div11">  <div id="zentral1"> <div id="uberschrift"> Registrieren<table><tr><td> </td></tr></table> </div> <table id="tabelle"> <tr> <th>Vorname:</th> <th><input type="text" name="vorname" id="vorname" placeholder="Max" class="normal" maxlength="10"></th> <th>       </th> <th>Adresse:</th> <th><input type="text" name="adresse" placeholder="Am Kirschbaum 1" class="normal" maxlength="30"></th> </tr> <tr> <th>Name:</th> <th><input type="text" name="name" placeholder="Mustermann" class="normal" maxlength="10"></th> <th>       </th> <th>Postleitzahl:</th> <th><input type="text" name="plz" placeholder="12345" class="normal" maxlength="5"></th> </tr> <tr> <th>Benutzername:</th> <th><input type="text" name="benutzername" placeholder="mm12345" class="normal"></th> <th>       </th> <th>Ort:</th> <th><input type="text" name="ort" placeholder="Los Angeles" class="normal" maxlength="20"></th> </tr> <tr> <th>Passwort:</th> <th><input type="password" name="passwort" placeholder="*********" class="normal" maxlength="10"></th> <th>       </th> <th>EMail:</th> <th><input type="text" name="email" placeholder="max@anbieter.de" class="normal" maxlength="20"></th> </tr> <tr> <th>Passwort wdh.:</th> <th><input type="password" name="passw" placeholder="*********" class="normal" maxlength="10"></th> <th>       </th> <th>EMail wdh.:</th> <th><input type="text" name="e-mail" placeholder="max@anbieter.de" class="normal" maxlength="20"></th> </tr> </table> </br> <div> <input type="button" name="button" id="button" class="button" value="Speichern"> </div> </div> </div> </div> </body> </html>
Code:
<?php include 'conf.php'; if(isset($_GET['benutzername']) && isset($_GET['passwort'])) { $benutzername = $_GET['benutzername']; $passwort = $_GET['passwort']; //echo $benutzername; //echo $passwort; if($benutzername == $user && $passwort == $pw) { echo "true"; } else { echo "false"; } } else { } ?>
Code:
<?php $user = "root"; $pw = "0000"; ?>
Kommentar