hallo zusammen,
ich habe mir mal ein script geschrieben, mit dem ich mir mysql-tabellen einrichten kann. nun meine frage: wie kann ich es einstellen, dass ich eine beliebige anzahl felder (anzahl muss eingegeben werden) mit unterschiedlichen feldnamen (welche ich auch in das formular eingeben kann) ertellt.
hier mal das script:
<?
echo '<!-- nur wo html draufsteht ist auch html drinn -->
<!-- aber wo php draufsteht ist auch html drinn -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>';
echo '<head>';
echo '<meta name="author" content="pat">';
echo '<meta name="keywords" content="pat, pat87, pat87.ch, patrick, buff, 87">';
echo '<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">';
echo '<link rel="stylesheet" type="text/css" href="style.css">';
echo '<title>pat87.ch</title>';
echo '<link rel="SHORTCUT ICON" href="
http://www.pat87.ch/...s/favicon.ico">'; echo '</head>';
echo '<body>';
echo '<form action="install.php" method="post">';
echo '<input type="text" size="17" name="database_table">';
echo '<input type="submit" value="OK">';
echo '</form>';
$db=mysql_connect(localhost,pat,*******);
mysql_select_db(pat);
$anfrage="CREATE TABLE $database_table (feld1 VARCHAR(50),feld2 VARCHAR(20), feld3 VARCHAR(50))";
mysql_query($anfrage);
mysql_close($db);
echo "tabelle '$database_table' erfolgreich eingerichtet";
echo '</body>';
echo '</html>';
?>
ich denke, dass es möglich ist, wenn ich das selbe script aufrufe.
mfg p@
---
mailto:admin@pat87.ch http://www.pat87.ch/