|
Posted by Arjen on 01/11/07 13:26
Geoff Berrow schreef:
> 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.
The $_FILES array was empty. My guess is that op is trying to pass
variables.
Arjen
http://www.hondenpage.com - Mijn site over honden
Navigation:
[Reply to this message]
|