Re: Php/Mysql
| From: | Michael Andersson | Date: | Fri, 12 Apr 2002 14:12:20 +0000 |
| Subject: | Re: Php/Mysql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92768@lists.php.net to get a copy of this message | ||
Myabe you should assign "some string to a variable:
$string = "some string";
insert into mytable values ($string)
/Just a noob trying to help out
"Torkil Johnsen" <torkil.johnsen@stud.hibo.no> skrev i meddelandet
news:INELIHOCKHFJNOPCOBKCMEBLDIAA.torkil.johnsen@stud.hibo.no...
> Just a noob php/mysql question... (I suppose)
>
> When I try just putting php code in my insert queries, it goes like this:
>
> insert into mytable values('<?php echo "some string"; ?>')
>
> select * from mytable, returns:
> <?php echo "some string"; ?>Some string
>
> So the insert-query inserts both the code AND the string that the code
> echoes...
>
> Any help would be greatly appreciated!
>