note 127083 added to function.fopen
| From: | Wvss at gmail dot com | Date: | Sun, 15 May 2022 17:53:10 +0000 |
| Subject: | note 127083 added to function.fopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-218432@lists.php.net to get a copy of this message | ||
1.1
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
div {
margin: 0.3em;
padding: 0.3em;
}
.required {
background-color: #CCC;
}
input[name="lndkenn"] {
width: 2em;
}
input[name="ustidnr"] {
width: 5em;
}
</style>
</head>
<body>
<h1>Immobilienportal</h1>
<h2>Angebot aufgeben</h2>
<p>Die <span class="required">grau hinterlegten</span> Felder müssen
ausgefüllt
werden </p>
<form method="POST">
<div>
<fieldset>
<legend>Persönliche Daten</legend>
<div class="required"><label>Nachname: <input name="nachname"
required></label></div>
<div class="required"><label>Vorname: <input name="vorname"
required></label></div>
<div class="required"><label>Email: <input type="email"
name="email"
required></label></div>
<div> Ich verkaufe:
<label><input type="radio" name="status" value="P"
checked>privat</label>
<label><input type="radio" name="status" value="M">als
Makler</label>
</div>
<div>
<label for="ustidnr">USt-IdNr. (nur bei Maklern): </label>
DE <input id="ustidnr" name="ustidnr" placeholder="999999999"
pattern="[0-9]{9}"title="genau 9 Ziffern"></label>
</div>
</fieldset>
</div>
<div>
<fieldset>
<legend>Objektangaben</legend>
<div><label>Immobilienart:
<select name="art" size="6">
<option value="0" selected>keine Angabe</option>
<option value="1">Einfamilienhaus</option>
<option value="2">Mehrfamilienhaus</option>
<option value="3">Reihenhaus</option>
<option value="4">Doppelhaushälfte</option>
<option value="5">Eigentumswohnung</option>
</select></label>
</div>
<div class="required">PLZ: </label><input name="plz"
pattern="[0-9]{5}"
title="genau 5 Ziffern" placeholder="12345"
required></label><label> Ort:
</label><input name="ort" required></div>
</fieldset>
</div>
<div>
<fieldset>
<legend>Sonstiges</legend>
<div><label>Ihre Nachricht (optional): <textarea name="nachricht"
cols="50" rows="5"></textarea></label></div>
<div class="required"><label><input type="checkbox"
name="dsb" required>
Datenschutzbest. akzeptiert</label></div>
</fieldset>
</div>
<div>
<button>Senden</button>
</div>
</form>
</body>
</html>
1.2
<?php
if(!empty($_REQUEST)) {
$vorname=$_REQUEST["vorname"];
$nachname=$_REQUEST["nachname"];
$email=$_REQUEST["email"];
$status=$_REQUEST["status"];
$ustidnr = $_REQUEST["ustidnr"];
$art = $_REQUEST["art"];
$plz = $_REQUEST["plz"];
$ort = $_REQUEST["ort"];
$nachricht = $_REQUEST["nachricht"];
//Ãberprüfung, ob Verpflegungspauschale beantragt
if(isset($_REQUEST["dsb"]))
$dsb ="<p>Sie haben den Datenschutzbestimmungen zugestimmt.</p>";
else
$dsb ="<p>Sie haben den Datenschutzbestimmungen NICHT zugestimmt.</p>";
echo $dsb;
//Zufallszahl
$uid = strtoupper(bin2hex(random_bytes(3)));
//Angebots-ID
//$aid = M-1-12345-76124C;
$aid= $status."-".$art."-".$plz."-".$uid;
echo"<p>Ihre Angebots-ID:
<strong>".$aid."</strong></p>";
//echo "<p>".$meldung."</p>";
}
?>
</body>
</html>
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.47 (proxied: 78.42.131.181)
----
Manual Page -- https://php.net/manual/en/function.fopen.php
Edit -- https://main.php.net/note/edit/127083
Del: integrated -- https://main.php.net/note/delete/127083/integrated
Del: useless -- https://main.php.net/note/delete/127083/useless
Del: bad code -- https://main.php.net/note/delete/127083/bad+code
Del: spam -- https://main.php.net/note/delete/127083/spam
Del: non-english -- https://main.php.net/note/delete/127083/non-english
Del: in docs -- https://main.php.net/note/delete/127083/in+docs
Del: other reasons-- https://main.php.net/note/delete/127083
Reject -- https://main.php.net/note/reject/127083
Search -- https://main.php.net/manage/user-notes.php