Er spuckt mir laufen die Fehlermeldung aus:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wampp2036\htdocs\osg\opd\new_project.put.php on line 11
Und hier kommt das Script:
Bin ich jetzt Blöd oder ist es nur zu heiß in B-?
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wampp2036\htdocs\osg\opd\new_project.put.php on line 11
Und hier kommt das Script:
PHP-Code:
<?php
include("../inc/db_data.inc.php");
$spe = join(',',$species);
$reg = join(',',$region);
echo "$spe<br>$reg<br>";
$res = mysql_query ("INSERT osg_projekt
(title, species, region, country, locality, researcher,
institution, contact, supervisor, cooperation,
sponsor, p_start, p_end, methods, publications, projekt)
VALUES ('$title', '$spe', '$reg', '$country', '$locality',
'$researcher', '$institution', '$contact', '$supervisor',
'$cooperation', '$sponsor', '$p_start', '$p_end',
'$methods', '$publications', '$project')")
or die(mysql_error());
$num = mysql_num_rows($res);//Zeile 11
if ($num == 0)
{
echo "<HTML>\n
<BODY>\n
<font face='Times New Roman' size='3' color='red'>
Opps, no input in database!</font>\n
</BODY>\n
</HTML>\n";
}
else
{
echo "<META HTTP-EQUIV='refresh' CONTENT='10;
URL=projekt.php'>\n
<HTML>\n
<BODY>\n
<font face='Times New Roman' size='2'>
Your projekt was delivered to OPD.</font>\n
</BODY>\n
</HTML>\n";
}
?>
Kommentar