Hi leutz wiso funktioniert folgendes nicht:
PHP-Code:
<?php
$username = "xxxxx";
$pw = "xxxxxxx";
$database = "xxxxxxx";
$table = "test";
$host = "localhost";
$connect = mysql_connect($host, $username, $pw);
mysql_select_db($database, $connect);
$result = mysql_query("SELECT text FROM $table");
echo $result;
?>
<?php
if ($los) {
$username = "xxxxxx";
$pw = "xxxxxxxx";
$database = "xxxxxxx";
$table = "test";
$host = "localhost";
$connect = mysql_connect($host, $username, $pw);
mysql_select_db($database, $connect);
$result = mysql_query("INSERT INTO $table (text) VALUES ('$text')");
}
?>
Folgender fehler erscheint bei der ausgabe:
Bitte helft mir bin noch ein SQL noob.