Grüß euch, will mittels den unten angeführten Quelltext ne neue PHP Datei öffnen. Anlegen könnte ich es per MYSQL. Das funkt auch nur ich stehe irgendwie auf der Leitung. Welchen Code muss ich einfügen, das auch eine neue PHP datei erstellt wird!! OHNE IHNALT!!!
Bitte um Hilfe! MFG CHRISTOPHER
<?php
// code that will be executed if the form has been submitted:
if ($submit) {
// connect to the database
// (you may have to adjust the hostname,username or password)
MYSQL_CONNECT("localhost","XX","XX");
mysql_select_db("afis");
$data = addslashes(fread(fopen($form_name, "w+"), filesize($form_name)));
$result=MYSQL_QUERY("INSERT INTO menu (art,name,link) ".
"VALUES (
'$form_art',
'$data',
'$form_name',
'$form_link')");
$id= mysql_insert_id();
print "<p>Produkteingabe mit der ID: <b>$id</b> war Erfolgreich <a href=new.php>Zurück zur Eingabe</a>";
MYSQL_CLOSE();
<form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000">
<font face="Verdana"><span style="font-size: 8pt">Location:<br>
<select size="1" name="form_art">
<option selected>Bitte Kategorie auswählen</option>
<option>menu-produkt.php</option>
<option>menu-aktuell.php</option>
<option>menu-contact.php</option>
</select> </span></font>
<p>
<font face="Verdana" style="font-size: 8pt">Titel</font><font face="Verdana"><span style="font-size: 8pt"><br>
<input type="text" name="form_name" size="59"> <br>
<br>
<br>
</span></font>
<font face="Verdana" style="font-size: 8pt">Titel</font><font face="Verdana"><span style="font-size: 8pt"><br>
<input type="text" name="form_link" size="59" value=".php"> </span></font>
<font face="Verdana" style="font-size: 8pt"><br>
</font></p>
<p><font face="Verdana"><span style="font-size: 8pt">
<input type="submit" name="submit" value="Eintragen"></span></font></p>
</form>
<?php
}
?>
} else {
// else show the form to submit new data:
?>