allllsooo.
1. Tshculdigung ork ^^
2.
Die probleme gehen weiter also:
hier erstmal der link: http://sekar.se.funpic.de/Sekar/Admi...tor_voting.php
alles funktioniert aber wen ich nun was shrieben will komt der große fehler....
woran kann DAS nun wieder ligen=? (wen ein ***** da ist ^^. das ist nur zur sicherheit eine zensirung ^^)
hier der code:
PHP-Code:
<html>
<head>
<title>
Umfrage erstellen
</title>
</head>
<body>
<?php
error_reporting ( 0 );
$submit = $_GET [ "submit" ];
$frage = $_GET [ "frage" ];
$antwort1 = $_GET [ "antwort1" ];
$antwort2 = $_GET [ "antwort2" ];
$antwort3 = $_GET [ "antwort3" ];
// Das Formular wurde noch nicht gesendet
if (! $submit )
{
?>
<table border="0" cellspacing="5" cellpadding="5">
<tr>
<td>
<form action="editor_voting.php" method="get">
<table cellspacing="5">
<tr>
<td><div>Umfrage-Titel</div></td>
<td>
<input type="Text" name="frage" size="26" />
</td>
</tr>
<tr>
<td><div>Antwort 1</div></td>
<td>
<input type="Text" name="antwort1" size="26" />
</td>
</tr>
<tr>
<td><div>Antwort 2</div></td>
<td>
<input type="Text" name="antwort2" size="26" />
</td>
</tr>
<tr>
<td><div>Antwort 3</div></td>
<td>
<input type="Text" name="antwort3" size="26" />
</td>
</tr>
<td align="right" colspan="2">
<input type="submit" name="submit"
value="Umfrage erstellen" />
</td>
</table>
</form>
</td>
</tr>
</table>
<?php
}
// Das Formular wurde gesendet
else
{
// Verbindung zur Datenbank herstellen
include( "include.php" );
$connection = mysql_connect ( localhost , ******, *********)
or die ( "Konnte keine Verbindung zur Datenbank herstellen!" );
$query = "INSERT INTO `umfrage` (frage, antwort1, antwort2, antwort3)
VALUES (' $frage ' , ' $antwort1 ', ' $antwort2 ', ' $antwort3 ')" ;
// Überprüfung, ob der Eintrag erfolgreich war
if (@ mysql_query ( " $query " ))
{
echo 'Die Umfrage wurde eingegeben.
<a href="voting.php">jezt ansehen</a>' ;
}
else
{
echo 'Fehler! <a href="editor_voting.php">Bitte neu eingeben</a>' ;
}
// Verbindung zur Datenbank schließen
mysql_close ( $connection );
}
?>
</body>
</html>