You are here: Re: receive value $_POST « PHP Programming Language « IT news, forums, messages
Re: receive value $_POST

Posted by Peter van Schie on 11/29/06 17:47

Hi kirke,

> $result= mssql_query($sql) or die();
>
> while ($row = mssql_fetch_array($result))
> {
> $veh = $veh+","+$row[0]; }
>
> But it doesn't work.....
> Help me...
> thx.

Just use mssql_fetch_assoc instead of mssql_fetch_array, to only
retrieve the associative array.
Then you can use $row['A'] for instance to show the value of the current
row's A value:

$result= mssql_query($sql) or die();

while ($row = mssql_fetch_assoc($result))
{
echo $row['A'] . '<br />';
}

Also note that you should check the input value of the formfield L,
instead of just using it in the sql query. You should use
mysql_real_escape_string to escape the value, like:
mysql_real_escape_string($_POST['L'])

Peter.

--
http://www.phpforums.nl

 

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

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