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.
Navigation:
[Reply to this message]
|