You are here: Re: can't get variable into the query « All PHP « IT news, forums, messages
Re: can't get variable into the query

Posted by Geoff Berrow on 06/18/06 10:40

Message-ID: <1150623496.932057.286950@h76g2000cwa.googlegroups.com> from
cashmere@t-online.de contained the following:

>Hey Geoff,
>It now works - somehow a part of the form had got mysteriously
>swallowed up!! (input type=)
>Yippee! Now to get to work adding drop downs and checkboxes etc.
>Thanks A LOT. Now I know you can put 2 POST[variable]s on one line.

Not just two. As many as you want.

But you would do well to sanitise the user input first to prevent SQL
injection attacks

$id=mysql_real_escape_string($_POST['id']);
$id=mysql_real_escape_string($_POST['joketext']);
....
mysql_query("INSERT INTO `multiple` VALUES ('$id','$joketext')")
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011

 

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

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