Reply to Re: PHP insert

Your name:

Reply:


Posted by peter on 10/21/06 10:00

> Problem is that you use single quoutes twice ;-) Try this
>
> $name = $_REQUEST['name'];
> $query = "Insert into tbl_category (cat_description) Values
> ('%{$name}%')";

no he isn't he is using single quotes within double quotes which is
perfectly valid.

Just a note to the op however. You are currently using $_REQUEST I would
advise that you use either $_GET or $_POST although this is not cuasing the
error it is something that is frowned upon unless you really HAVE too. The
problem with using $_REQUEST is that you do not know where it has come from
properly.

As mentioned by another poster try using mysql_error to see what error
message mysql is outputting. it might also help as also mentioned to infact
show us the structure of your table.

[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

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