|
Posted by Dave Nash on 01/11/07 13:01
On Thu, 11 Jan 2007 12:47:12 +0000, Geoff Berrow
<blthecat@ckdog.co.uk> wrote:
>Message-ID: <i6bcq2t6ph91tg80pkovpsql8l0mfkrokk@4ax.com> from Dave Nash
>contained the following:
>
>>
>>heres the code I have. what needs changing.
>>
>>$query="UPDATE categories SET catname='$ud_catname',
>>image='{$ud_image["name"]}', parentid='$parentid' WHERE
>>catid='$ud_catid'";
>>@mysql_select_db($database) or die( "Unable to select database");
>>mysql_query($query);
>>var_dump($ud_image);
>>var_dump($_FILES);
>
>The name of the image will be in the following variable
>$_FILES['ud_image']['name']
>
>therefore
>
>$query="UPDATE categories SET catname='$ud_catname',
>image='".$_FILES['ud_image']['name']."', parentid='$parentid' WHERE
>catid='$ud_catid'";
>
>should work.
ive tried this code and the following comes up... And it also clears
the exisitng variable in the 'image" fields of the db.
send-out1.jpgstring(13) "send-out1.jpg" array(0) { } UPDATE categories
SET catname='No Parent Category', image='', parentid='43' WHERE
catid='44'
[Back to original message]
|