Hello,
I've been working on this script all day, but I'm getting the same failure
report each time:
Warning: Supplied argument is not a valid MySQL result resource in
c:\program files\apache group\apache\htdocs\motoerit\toon_alles.php on line
23
What could be wrong? This is the code I have:
line 23 is: while(list($ID, $Naam, $Adres, [......] $Bet_rest, $Overig_info)
= mysql_fetch_array ($result))
-----------------------------------
<HTML>
<HEAD><TITLE>Boekingen</TITLE>
<LINK HREF="motoerit.css" TYPE="text/css" REL="stylesheet">
<script language="JavaScript">
<!--
function openwin(location) {OpenWin = this.open(location, "nieuws",
"width=455,height=333,scrollbars");}
// -->
</script>
</HEAD>
<BODY>
<?php
include ("dburl.txt");
mysql_connect ($dbserver, 'username', 'password');
mysql_select_db('dbname');
if ($orderby == " ")
{$orderby == "ID";
}
$query = "SELECT * FROM boekingen order by $orderbyASC ";
$result = mysql_query($query);
while(list($ID, $Naam, $Adres, $Postcode, $Woonplaats, $Land, $Telefoon,
$Mobiel, $Fax, $Email, $Aantal_pers, $Voert_aantal, $Voert_soort,
$Voert_merk, $Voert_kent, $Voert_hoogte, $Voert_lengte, $Voert_aanhang,
$Party, $Dat_heen, $Tijd_heen, $Dat_terug, $Tijd_terug, $Maaltijd,
$Hut_soort, $Reiscode, $Reisdoel, $Maatschap, $Dat_voorschot, $Dat_rest,
$Bet_voorschot, $Bet_rest, $Overig_info) = mysql_fetch_array ($result))
print("<TABLE BORDER=0 CELLSPACING=1>");
print("<TR><TH bgcolor=\"#999999\"><FONT
COLOR=\"#FFFFFF\">ID:</FONT></TH><TH bgcolor=\"#999999\"><FONT
COLOR=\"#FFFFFF\">Naam:</FONT></TH><TH bgcolor=\"#999999\"><FONT
COLOR=\"#FFFFFF\">Reisdoel:</TH><TH bgcolor=\"#999999\"><FONT
COLOR=\"#FFFFFF\">Datum vertrek:</TH><TH bgcolor=\"#999999\"><FONT
COLOR=\"#FFFFFF\">Datum terugkomst:</FONT></TH><TH bgcolor=\"#999999\"><FONT
COLOR=\"#FFFFFF\">Datum betaling voorschot:</FONT></TH><TH
bgcolor=\"#999999\"><FONT COLOR=\"#FFFFFF\">Datum betaling
rest:</FONT></TH><TH> </TH><TH> </TH></TR>");
print("<TR><TD bgcolor=\"#999999\"><FONT
COLOR=\"#FFFFFF\">$ID</FONT></TD><TD bgcolor=\"#F5F5F5\"><div
CLASS=txtblack>$Naam</DIV></TD><TD>$Reisdoel</TD><TD>$Dat_heen</TD><TD>$Dat_
terug</TD><TD><a href=\"wijzig.php?ID=".$ID."\">Wijzigen</a></TD><TD><a
href=\"wis.php?ID=".$ID."\">Verwijderen</a></TD></TR>\n");
print("</TABLE>");
include ("footer.txt");
?>
-----------------------------------
Thanks in advance!
Kind regards,
Paul Sidler
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]