![]() |
php Hilfe
eingabe.html
<form method="post" action="eingabe.php"> <pre> Name: <input type="text" name="name" size="20" maxlength="30"> </pre> <input type="submit" name="absenden" value="Absenden"> <input type="reset" name="loeschen" value="Eingaben löschen"> </form> eingabe.php $name =$HTTP_POST_VARS['vorname']; $dbzugang = mysql_connect("localhost","user","pw"); mysql_select_DB("freunde",$dbzugang); mysql_query("INSERT INTO telefonliste (Name) VALUES ('$name')); mysql_close($dbzugang); ausgabe.php $dbzugang = mysql_connect("localhost","user","pw"); mysql_select_DB("freunde",$dbzugang); $sql = mysql_query("SELECT * FROM telefonliste",$dbzugang); while ($attribut=mysql_fetch_row($sql)){ echo " $attribut[0], $attribut[1], $attribut[2], $attribut[3]";} mysql_close($dbzugang); suchen.php (siehe eingabe.html) $dbzugang = mysql_connect("localhost","user","pw"); mysql_select_DB("freunde",$dbzugang); $suchname =$HTTP_POST_VARS['name']; $sql = mysql_query("SELECT * FROM telefonliste where name like '".$suchname."%'",$dbzugang); echo " "; while ($attribut=mysql_fetch_row($sql)){ printf("Nr: %s Name: %s Vorname: %s Telefon: %s ", $attribut[0], $attribut[1], $attribut[2], $attribut[3]);} mysql_close($dbzugang); Rechnen: $a = $_GET['a']; $b = $_GET['b']; $addi = $a + $b; echo "Addition: $addi "; |
Re: php Hilfe
1. Bitte verwende Code-Tags
2. Sag uns was nicht funktioniert und wo der Fehler auftritt! |
Re: php Hilfe
Und was ist deine Frage?
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:19 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz