|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I took over the support of a website that is set up something like
this inside one of the pages: include_once("header.php"); <?php //to get the content of the page they do this: $content = mysql_query("select content etc...); echo $content; ?> include_once("footer.php"); I am having problems evaluating any php that is used in the mysql content. Is there a way to get the mysql withing the mysql to run? Thank you for your time, Mandragon |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Sep 17, 12:56 pm, Mandrago...@gmail.com wrote:
> I took over the support of a website that is set up something like > this inside one of the pages: > > include_once("header.php"); > > <?php > //to get the content of the page they do this: > $content = mysql_query("select content etc...); > > echo $content; > ?> > > include_once("footer.php"); > > I am having problems evaluating any php that is used in the mysql > content. Is there a way to get the mysql withing the mysql to run? > > Thank you for your time, > > Mandragon Sorry, The question should read: "Is there a way to get the php withing the echo $htmlcontent to run?" |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Of course you are, $content is a resource. The MySQL Query resource.
try this: $content = mysql_query('bla bla bla'); while ($row = mysql_fetch_assoc($content)) { $result[] = $row; } $content = $result; Now you can use $content . |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
In answer to your edit...
eval($content); -> This will parse as PHP. |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Sep 17, 12:59 pm, RageARC <rage...@gmail.com> wrote:
> In answer to your edit... > > eval($content); -> This will parse as PHP. On Sep 17, 12:59 pm, RageARC <rage...@gmail.com> wrote: > In answer to your edit... > > eval($content); -> This will parse as PHP. Thank you! It has been some time since I have done this. Thanks for the . Mandragon |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
..oO(Mandragon03@gmail.com)
>On Sep 17, 12:59 pm, RageARC <rage...@gmail.com> wrote: >> In answer to your edit... >> >> eval($content); -> This will parse as PHP. > >Thank you! > >It has been some time since I have done this. Thanks for the . Eval() is evil. Why does $content contain PHP code? Micha |
|
![]() |
| Outils de la discussion | |
|
|