Page 1 of 1

Php in html error

Posted: Tue Feb 10, 2009 10:27 pm
by ansoft
Hi,

Here is my problem.

I have a site which has installed a content management script. And the script has a template to show the contents in a lower right side of the page and it only process HTML codes.

But I want to use a php script to show the query results in that particular space. but the php script has interpreted as HTML code and showing error. (If I called php file directly it is working and showing the results in a seperate page-script is OK)

My php Script is like...

<?php
/*set varibles from form */
$searchterm = $_POST['searchterm'];

...

...

...

...


?>


And it has lines like...


$result = $dbconn->query($query);


I think the phrase '->' makes trouble.


What can I do for this?

Please anybody help me.

I am a beginner to PHP.

Thank you for your time reading this. I appreciate it.