tittli
Erfahrenes Mitglied
hmm...mein Code sieht jetzt so aus:
Und es kommt folgende Fehlermeldung:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\apachefriends\xampp\htdocs\xampp\www\Voc-Trainer\abfrage.php on line 7
Was stimmt daran nicht?
gruss
PHP:
<?php
include("dbconnect.php");
srand ((double)microtime()*1000000);
$rand_id = rand();
$abfrage = "SELECT id, deutsch, english FROM table_voc WHERE id = '$rand_id' AND done = '0'";
$abfragen = mysql_query($abfrage);
while ($row = mysql_fetch_array($abfragen))
{
echo $row['deutsch'] . "<br>";
$english = $row['english'];
$id = $row['id'];
echo $id;
echo "<html>";
echo "<body>";
echo "<form action=\"abfrage_voc.php\" method=\"post\">";
echo "<input type=\"hidden\" name=\"english\" value=\"$english\">";
echo "<input type=\"hidden\" name=\"id\" value=\"$id\">";
echo "<input type=\"text\" name=\"eingabe\" size=\"20\" maxlength=\"30\">";
echo "<input type=\"submit\" name=\"submit\" value=\"Senden\">";
echo "</form>";
echo "</body>";
echo "</html>";
}
?>
Und es kommt folgende Fehlermeldung:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\apachefriends\xampp\htdocs\xampp\www\Voc-Trainer\abfrage.php on line 7
Was stimmt daran nicht?
gruss