Reply to Re: why does this code not work...pulling my hair out...

Your name:

Reply:


Posted by Tom Thackrey on 10/05/70 11:19

On 23-Jun-2005, toedipper <send_rubbish_here734@hotmail.com> wrote:

> It inserts ok but the value for the last field userid is always written
> back as blank. The userid should be filled from the session id
> $_SESSION[MM_Username]
>
> Any ideas? On the same page that this is on I can echo
> $_SESSION[MM_Username] and that works ok.
>
> Thanks,
>
> td.
>
>
>
> $insertSQL = sprintf("INSERT INTO software (title, shortdesc, `desc`,
> version, minreqs, wareid, catid, hpage, dllink, dlsize, triallength,
> price, keywords, liveyn, submitdate, submittime, userid) VALUES (%s, %s,
> %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, 'N', current_date(),
> current_time(), '$_SESSION[MM_Username]')",
> GetSQLValueString($_POST['title'], "text"),
> GetSQLValueString($_POST['shortdesc'], "text"),
> ...

is MM_Username a literal or a constant? Try changing the coding to
> current_time(), '{$_SESSION[MM_Username]}')", if it's a constant


--
Tom Thackrey
www.creative-light.com
tom (at) creative (dash) light (dot) com
do NOT send email to jamesbutler@willglen.net (it's reserved for spammers)

[Back to original 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

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