Code:
<?
$_POST['name'] = $name;
$_POST['homepage'] = $homepage;
$_POST['text'] = $text;
if(isset($_POST['action']))
{
if($name || $text == "")
{
echo "<center>Bitte Alle Eingaben tätigen!</center>";
}
else
{
$host = "localhost";
$user = "zserv10";
$pw = "galagos4ever";
$db = "usr_zserv10_1";
$conn = mysql_connect($host,$user,$pw);
mysql_select_db($db,$conn);
$date = mktime(0,0,0,date(m),date(d),date(Y));
$time = time();
$select = "SELECT * FROM gb";
$eintragen_conn = mysql_query($select);
$eintragen = "INSERT INTO gb (name,homepage,date,time,text) VALUES ('$name', '$homepage', '$date', '$time', '$text')";
$write = mysql_query($eintragen);
mysql_close($conn);
}
}
include 'input.php';
echo "<br>";
$host = "localhost";
$user = "zserv10";
$pw = "galagos4ever";
$db = "usr_zserv10_1";
$conn = mysql_connect($host,$user,$pw);
mysql_select_db($db,$conn);
$auslesen1 = "SELECT * FROM gb ORDER BY id DESC";
$auslesen2 = mysql_query($auslesen1);
while ($auslesen = mysql_fetch_array($auslesen2)) {
echo "<center>";
echo "<fieldset>";
echo "<legend>";
echo "<b>".$auslesen['name']."</b> ";
echo "schrieb um ".date("H:i:s", $auslesen['time'])." am ".date("d:m:Y",$auslesen['date']);
if($auslesen['homepage'] != "http://")
{
echo " // <a href=".$auslesen['homepage'].">Homepage</a> ";
}
else
{
echo "";
}
echo "</legend>";
echo "<ul>";
echo "<br>";
echo $auslesen['text']."<br><br></ul>";
echo "</fieldset>";
echo"</center>";
?>
Code:
Parse error: parse error, unexpected $ in /srv/www/htdocs/zserv10/html/gb/eintragen.php on line 68
Wo liegt mein fehler? ich finde ihn einfach nicht!