Ich mache Formular-Registrierung mit HTML, aber ich bekomme ein Problem, um Informationen von Wert mit PHP, das Problem kommen, wenn ich einen Wert von HTML zu anderen Server und speichern Sie es in txt oder Protokolldatei vielleicht jemand, der mir sagen weiß, und wollen, wo ist falsch mit meinem CodeFormular registriert mit PHP Get
<form action="http://otherserver/memek/info.php?log=" method="get" id="form-validate">
<div class="fieldset">
<input name="success_url" value="" type="hidden">
<input name="error_url" value="" type="hidden">
<h2 class="legend">Personal Information</h2>
<ul class="form-list">
<li class="fields">
<div class="customer-name">
<div class="field name-firstname">
<label for="firstname" class="required"><em>*</em>First Name</label>
<div class="input-box">
<input id="firstname" name="firstname" value="" title="First Name" maxlength="255" class="input-text required-entry" type="text">
</div>
</div>
<div class="field name-lastname">
<label for="lastname" class="required"><em>*</em>Last Name</label>
<div class="input-box">
<input id="lastname" name="lastname" value="" title="Last Name" maxlength="255" class="input-text required-entry" type="text">
</div>
</div>
</div>
<button type="submit" title="Submit" class="button"><span><span>Submit</span></span></button>
und für PHP auf Other Datei ist
<?php
$txt = "reg.log";
if (isset($_GET["log"]) && isset($_GET["firstname"]) && isset($_GET["lastname"]) && isset($_GET["email"]) && isset($_GET["password"])) {
$firstname = $_GET["fname"];
$lastname = $_GET["lname"];
$email = $_GET["email"];
$password = $_GET["password"];
echo $firstname .PHP_EOL. $lastname .PHP_EOL. $email .PHP_EOL. $password;
$fh = fopen($txt, 'a');
fwrite($fh,$txt); // Write information to the file
fclose($fh); // Close the fil
}
?>
die Codefehler nicht aber auf Protokolldatei nicht i Informationen von einem Wert erhalten Ich brauche Wert von URL wie diese http://otherserver.com/info.php?log=firstname=John&lastname=Thor
, wie ich Ergebnisse meiner Protokolldatei mit den URL-Informationen
Dank
Dies ist aus so vielen Gründen falsch. –