Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
RealScorp hat gesagt.:Entweder mit Javascript eine Überprüfung darauf, ob etwas im Feld steht, wenn man auf den Submit Button klickt (da biste aber im falschen Forum bzw ich kenn mich damit nicht aus), oder einfach in dem Script an das die Werte geschickt werden einbauen, dass es die Werte nicht annimmt wenn ein Feld leer ist, sondern den Benutzer mit "xyz nicht ausgefüllt <zurück>" wieder zum Eingabeform schickt.
if (!ereg("WAS MUSS HIER REIN?!", $account_password)){
echo ("<font face='Verdana' color=salmon size='1'><b>Type in a password!</b></font><br>");
$account_ok = false;
}
<form action='./register.php' method='POST'>
<table>
<tr><td><font face='Verdana' color='FFFFFF' size='1'>Password:</td><td><input type='password' name='account_password'></font></td></tr>
<tr><td colspan='2'><input type='submit' value='Register'></td></tr>
</table>
</form>
<?php
if( isset($_POST['senden']) ){
if( $_POST['wert'] == '' ){
echo "Bitte füllen Sie das Formularfeld aus!";
}
}
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>Unbenannte Seite</title>
</head>
<body bgcolor="#ffffff">
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post" >
<input type="text" name="wert" size="24">
<input type="submit" name="senden" value"senden">
</form>
<p></p>
</body>
</html>
Du bist super!RS9999 hat gesagt.:Meinst Du so etwas?
PHP:<?php if( isset($_POST['senden']) ){ if( $_POST['wert'] == '' ){ echo "Bitte füllen Sie das Formularfeld aus!"; } } ?>
HTML:<html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <title>Unbenannte Seite</title> </head> <body bgcolor="#ffffff"> <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post" > <input type="text" name="wert" size="24"> <input type="submit" name="senden" value"senden"> </form> <p></p> </body> </html>
if( $_POST['name'] == "" OR $_POST['passwort'] == "" OR $_POST['mail'] == "" ) {
echo "Nicht alle Felder ausgefüllt!";
}
if( empty($_POST['name']) OR empty($_POST['passwort']) OR empty($_POST['mail']) ) {
echo "Nicht alle Felder ausgefüllt!";
}