php Suchformular

Get Started. It's Free
or sign up with your email address
Rocket clouds
php Suchformular by Mind Map: php Suchformular

1. Tabelle

1.1. Tabelle

1.2. Zugriff: http://www.ph-linz.at/zid/phpmyadmin

2. frameset.htm

2.1. frameset

2.1.1. <frameset rows="80,*" frameborder="no" border="0" framespacing="0"> <frame src="10_suchformular.htm" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" /> <frame src="10_start.htm" name="mainFrame" id="mainFrame" title="mainFrame" /> </frameset> <noframes><body> </body> </noframes></html>

2.1.2. http://www.ph-linz.at/mm-team/schulung/php2010/krma2/10_frameset.htm

2.2. ergebnis.php

2.2.1. <body> <?php extract ($_GET); //kann jetzt auf $suchfeld zugreifen $hostname_PHP = "www.ph-linz.at"; $username_PHP = "student"; $password_PHP = "student"; $PHP_CONN = mysql_pconnect($hostname_PHP, $username_PHP, $password_PHP) or die(mysql_error()); $rs_db=mysql_select_db("schulung"); //$sql="SELECT * FROM schueler_krma WHERE plz='$suchfeld';"; $sql="SELECT * FROM schueler_krma WHERE famname LIKE'%$suchfeld%';"; //wichtig!!! soid ma kinna! $rs_daten = mysql_query($sql); echo "<table border='1'>"; echo "<th>Familienname</th><th>Vorname</th><th>Ort</th><th>Bild</th>"; while ($row = mysql_fetch_object($rs_daten)) { echo "<tr>"; echo "<td>".$row->famname."</td>"; echo "<td>".$row->vorname."</td>"; echo "<td>".$row->ort."</td>"; echo "<td><img src='bilder/".$row->dateiname."' width='80'/></td>"; echo "</tr>"; } echo "</table>"; $rs_schliessen = mysql_free_result($rs_daten); ?> </body>

2.3. start.htm

2.3.1. Hinweistext auf notwendige Eingabe:

2.4. suchformular.htm

2.4.1. <body bgcolor="#FFFFCC"> <form action="10_ergebnis.php" method="get" target="mainFrame"> <table width="600" border="1"> <tr> <td>Familiennamen eingeben </td> <td><input name="suchfeld" type="text" id="suchfeld" size="30" maxlength="30" /></td> <td><input type="submit" name="Submit" value="Suchen" /></td> </tr> </table> </form> </html>

3. css Stylesheet

3.1. ... damit es schön wird!