Mailinglisten-Archive |
Hallo, Ich möchte zu einer db mit Artikeln Bildateien uploaden mit folgendem Script : <html> <head> <meta http-equiv="Content-Language" content="de"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>Bildtext</title> </head> <body link="#000000" vlink="#000000" alink="#000000" bgcolor="#d8d8df"> <font face="Arial" size="2" color="#FFFFFF"> <? require("wol_conf.inc.php3"); $hConnect=mysql_connect($host, $user, $pass); if(!$hConnect) { echo "error connecting db"; die(); } mysql_select_db("filemon", $hConnect); if ($vkz==1) { $result = mysql_query("DELETE from tbl_medien where medien_id=$medien_id"); } if ($bildvkz==1) { $result = mysql_query("SELECT * from tbl_medien where objekt_id=$objekt_id"); } if ($bildvkz==2) { $result = mysql_query("SELECT * from tbl_artikel where artikel_id=$artikel_id"); } if ($bildvkz==3) { $result = mysql_query("SELECT * from tbl_medien where medien_beschr=$medien_beschr"); } ?> </font> <form ENCTYPE="multipart/form-data" method="POST" action="bild_upload.php3"> <div align="left"> <table border="0" cellspacing="0" cellpadding="0" width="634"> <tr bgcolor="#C2C2CD"> <td width="392"> <p align="center"><font color="#000000"><b><font face="Arial" size="2">Bildtext</font></b></font> </td> <td width="137" align="center"><font face="Arial" size="2" color="#000000"><b>Bild</b></font></td> <td width="99" align="center"><font face="Arial" size="2" color="#000000">löschen</font></td> </tr> <tr> <td width="392" bgcolor="#FFCC66"> <b><font face="Arial" size="1" color="#FFFFFF"> </font></b></td> <td width="137" align="center" bgcolor="#FFC166"><font face="Arial" size="1" color="#FFFFFF"> </font></td> <td width="99" align="center" bgcolor="#FFC166"><font face="Arial" size="1" color="#FFFFFF"> </font></td> </tr> </table> </div> <div align="left"> <table border="0" cellpadding="0" width="635" cellspacing="0"> <font face="Arial" size="2"> <td height="17" width="389"> <font color="#FFFFFF"> <? while ($row = mysql_fetch_array($result)) { ?></font> <tr bgcolor="#c2c2cd"> <td width="389" valign="top" align="left"><font face="Arial" size="2" color="#FFFFFF"> <? echo $row["medien_beschr"] ?></font></td> <td width="135" align="center"><font face="Arial" size="2" color="#FFFFFF"><img src="../../bilder/<? echo $row["medien_link_gross"] ?><? echo $row["medien_link_gross"] ?>"></font></td> <td width="99" align="center"><a href="bilderupload.php3? vkz =1& objekt_id =<? echo $row["objekt_id"] ?>& artikel_id =<? echo $row["artikel_id"] ?>& medien_link_gross =<? echo $row["medien_link_gross"] ?>& medien_beschr =<? echo $row[medien_beschr] ?>& bildvkz =<? echo $bildvkz ?>& medien_id =<? echo $row["medien_id"] ?>"> <b><font face="Arial" size="2">[X]</font></b></a></td> </tr><font face="Arial" size="2"> <td height="18" width="389"><font color="#FFFFFF"><? } ?></font></font> </font></table> </div> <div align="left"> <table border="0" cellspacing="0" cellpadding="0" width="634"> <tr> <td valign="top" width="88"><font face="Arial" size="2" color="#FFFFFF"> </font> </td> <td colspan="2" width="542"></td> </tr> <tr> <td valign="top" width="88" align="left" bgcolor="#c2c2cd"><font face="Arial" size="2" color="#000000">Bildtext: </font> </td> <td colspan="2" align="left" width="542" bgcolor="#ffc166"><font face="Arial" size="2" color="#FFFFFF"> <textarea rows="2" name="txt" cols="55"></textarea></font></td> </tr> <tr> <td align="left" width="88" bgcolor="#c2c2cd"><font face="Arial" size="2" color="#000000">Bild</font>: </td> <td width="422" align="left" bgcolor="#ffc166"><font face="Arial" size="2" color="#FFFFFF"> <input type="hidden" name="MAX_FILE_SIZE" value="100000"> <input type="hidden" name="act" value="upload"> <input type="hidden" name="artikel_id" value="<? echo $artikel_id ?>"> <input type="hidden" name="anz_id" value="<? echo $anz_id ?>"> <input type="hidden" name="bildvkz" value="<? echo $bildvkz ?>"> <input type="hidden" name="medien_id" value="<? echo $medien_id ?>"> <input type="file" name="userfile" size="20"></font></td> <td width="118" align="left" bgcolor="#ffc166"></td> </tr> <tr> <td align="left" width="88" bgcolor="#c2c2cd"> <font face="Arial" size="2" color="#000000">von Artikel-ID:</font> </td> <td align="left" width="422" bgcolor="#ffc166"><font color="#FFFFFF"> <input type="text" name="artikel_von" size="20" value="<? echo $artikel_id ?>"></font></td> <td align="left" width="118" bgcolor="#ffc166"></td> </tr> <tr> <td align="left" width="88" bgcolor="#c2c2cd"> <font face="Arial" size="2" color="#000000">bis Artikel-ID:</font> </td> <td align="left" width="422" bgcolor="#ffc166"><font color="#FFFFFF"> <input type="text" name="artikel_bis" size="20" value="<? echo $artikel_id ?>"></font></td> <td align="left" width="118" bgcolor="#ffc166"></td> </tr> <tr> <td align="left" width="88" bgcolor="#c2c2cd"> </td> <td align="left" width="422" bgcolor="#ffc166"><font face="Arial" size="2" color="#FFFFFF"> <input type="submit" value="Ändern"> </font></td> <td align="left" width="118" bgcolor="#ffc166"></td> </tr> <tr> <td align="left" width="88"> <font color="#FFFFFF"> </font> </td> <td align="left" width="422"><font color="#FFFFFF"> </font></td> <td align="left" width="118"></td> </tr> </table> </div> </form> </body> </html> und folgender Fehlermeldung : Warning: Supplied argument is not a valid MySQL result resource in /web/sites/74/filemon/www.filemon.f2s.com/w_online/bilderupload.php3 on line 66 in Zeile 66 <? while ($row = mysql_fetch_array($result)) { ?> Es gibt irgendwie ein Problem mit dem $result. Zumindest auf dem lokalen Server. Wäre schön, wenn ich hier irgendwie weiterkäme. in der Url wird ?uid=&artikel_id=40064094&bildvkz=2 übergeben Die Url liegt unter http://www.filemon.f2s.com/w_online/artikel_change_neu.php3 Kann mir jemand helfen ? Axel
php::bar PHP Wiki - Listenarchive