hab ein problem ich pastel grad an einer mottomaschine für meine page aber er zeigt mir immer fehler an ich weis nicht wieso
ps: PHP Script ist noch nicht an ilch angepasst soll erst mal ohne ilch laufen.
auswertung.php
<?php
/**
* @author
* @copyright 2008
*/
include("http://localhost/inc/mysql.inc");
$motto = trim($_POST['motto']);
$quelle = trim($_POST['quelle']);
$query = "Insert INTO motto "
."(motto, quelle)"
."VALUES "
."('$motto', '$quelle')";
$dummy = mysql_query($quelle);
mysql_close($dz);
?>
<html>
<head></head>
<body>
<p>Das folgende motto wurde eingetragen:</p>
<blockquote style="width: 500px; padding: 10px; border: 2px solid black;">
<? echo "$motto<br><i>$quelle</i>"; ?></blockquote>
<p><a href="eingabe.htm">Weitere Eingabe</a></p>
</body>
</html>
eingabe.htm
<html> <head></head> <body> <div align="center"><h1>Motto - Eingabe</h1></div> <form method="post" action="auswertung.php"> <p><textarea style="width: 400px; height: 150px;" name="motto"></textarea></p> <p><input type="text" name="quelle" style="width: 400px;" /></p> <p><input type="submit" value="Motto eintragen" /></p> </form> </body> </html>
motto_test.php
<?php
/**
* @author
* @copyright 2008
*/
include("http://localhost/inc/mysql.inc");
$query = "SELECT COUNT(*) FROM $motto";
$sql = mysql_query($query);
$max = mysql_result($sql, 0);
$id = rand(1, $max);
$query = "SELECT motto, quelle FROM motto WHERE id = $id";
$sql = mysql_query($query);
$ds = mysql_fetch_object($sql);
$motto = htmlentities($ds -> $quelle);
mysql_close($dz);
?>
<html>
<head>
<title>Testseite</title>
<style type="text/css">
p, body, h1 {font-family: Arial;}
</style>
</head>
<body>
<p style="width: 400px;">
<b><?php echo $motto;?></b><br /><i><?php echo $quelle;?></i>
</p>
<hr />
<h1>Wilkommen auf meiner Webseite</h1>
<p>Schon bemerkt? Das Motto am Kopf der Seite ändert sich mit jedem Aufruf!</p>
</body>
</html>


