ich habe mir zuhause zum basteln xampp (XAMPP für Windows Version 1.5.5) installiert nur wenn ich jetzt mein script vom funpic server auf localhost installiere, funktioniert nicht alles.
z.B.eine kommentar-funktion aus einem news-script
mus ich mein server anderst configuieren?
hier die funktion als beispiel..
- Code: Select all
if( $action == "kommentare" )
{
$commentz = mysql_query("SELECT * FROM commentare WHERE zu='$zu'");
while( $row = mysql_fetch_object($commentz))
{
$row->text = nl2br($row->text);
echo"
<table width='70%'>
<tr>
<td style='border-bottom:1px solid #000000;'><em><strong>$row->autor</strong></em> schrieb am <strong>$row->date</strong></td>
</tr>
<tr>
<td>
$row->text
</td>
</tr>
</table><p>
";
}
if( $do == "send" )
{
$autor = $HTTP_POST_VARS[autor];
$text = $HTTP_POST_VARS[text];
$date = date("d.m.Y - H:i");
if( $autor != "" AND $text != "" )
{
$commm = mysql_query("INSERT INTO `commentare` (autor, text, date, zu) VALUES ('$autor', '$text', '$date', '$zu')");
echo"<strong>Danke</strong>, der Kommentar wurde eingetragen!<br>Um ihn zu sehen, klicke <a href=index.php?action=kommentare&zu=$zu'>hier</a>";
}
else{ echo"fehler"; }
}
echo"<p> </p>";
echo"<form name='loooool' action='index.php?action=kommentare&do=send&zu=$HTTP_GET_VARS[zu]' method='post'>
<input type='hidden' name='zu' value='$HTTP_GET_VARS[zu]'>
<table>
<tr>
<td><strong>User:</strong></td>
<td><input type='text' name='autor'></td>
</tr><tr>
<td><strong>Kommentar:</strong></td>
<td><strong><textarea name='text' cols='30' rows='5'></textarea></strong></td>
</tr>
<tr> <td> </td>
<td>
</tr></td>
</tr>
<tr>
<td> </td>
<td><strong><input type='submit' value='Senden'></strong></td>
</tr></table><p> </p>
<a href='index.php'>«Zurück</a>
";
}
Ich wollte mir nur das lästige hin und her koperen des scriptes sparen...