Ich bekomms einfach nicht hin.
...und der html Teil:
PHP:
<?php
include ('mysql.inc.php');
$connection = mysql_connect($sql['host'],$sql['uid'],$sql['pwd']);
if($connection)
{
mysql_select_db($sql['db']);
}
if ($_REQUEST['seite']. == "ja")
{
$var1 = 1;
}
if ($_REQUEST['seite']. == "nein")
{
$var1 = 2;
}
if ($_REQUEST['seite']. == "nr")
{
$var1 = 3;
}
mysql_query("INSERT INTO antworten VALUES('','$var1','".$_REQUEST['bemerkung']."');");
header('Location: main.php');
?>
...und der html Teil:
PHP:
<html>
<head>
<title>test</title>
</head>
<body>
<?php
include ('mysql.inc.php');
include ('ausgabe.php');
$connection = mysql_connect($sql['host'],$sql['uid'],$sql['pwd']);
if($connection)
{
mysql_select_db($sql['db']);
}
?>
<form method="post" action="radioausgabe.php">
<input type="radio" name="seite" value="ja"> ja<br>
<input type="radio" name="seite" value="nein"> nein<br>
<input type="radio" name="seite" value="nr"> nicht relevant<br>
Bemerkung:
<input type="text" name="bemerkung"><br>
<input type="submit" value="Senden">
</form>
<?php
anzeigen("antworten");
?>
</body>
</html>