Hier mal das script
Code:
<html><title>Eintragen</title></html>
<?php
$verbindung = mysql_connect ("localhost",
"root", "")
or die ("keine Verbindung möglich.
Benutzername oder Passwort sind falsch");
mysql_select_db("privates")
or die ("Die Datenbank existiert nicht.");
error_reporting(0);
//define variables
$xname = $_POST["xname"];
$xmail = $_POST["xmail"];
$dauer = $_POST["dauer"];
$beschreibung = $_POST["beschreibung"];
$genre = $_POST["genre"];
//insert values
mysql_query("INSERT INTO youtubevideos (videoname, videolink, dauer, beschreibung, genre)
VALUES ('$xname', '$xmail', '$dauer', '$beschreibung', '$genre')")
or die ("Fehler 2.");
?>
<body>
<center><form name="form1" method="post" style="padding:0px;margin:0px;">
<p>Videoname:</p> <input name="xname" type="text" id="xname" size="50" maxlength="255" >
<p>Videolink:</p> <input name="xmail" type="text" id="xmail" size="50" maxlength="255" >
<p>Videodauer:</p> <input name="dauer" type="time" id="xmail" size="50" maxlength="255" >
<p>Beschreibung:</p> <input name="beschreibung" type="text" id="xmail" size="50" maxlength="255" >
<p>Genre:</p> <select name="genre" size="1" ><option>Brutal</option> <option>Traurig</option> <option>Lustig</option> <option>Cool</option>
<input type="submit" name="Submit" value="Weiter"></td></center>
</form>
</body>






