You are here: Re: DB cuts off data « All PHP « IT news, forums, messages
Re: DB cuts off data

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'

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация