I have a created template in html..

in this template i have a scrolling DIV

What i want to do is display the myqsl data in this DIV.

I have tried to use this:

<?php @ include ("index_random.php");?>

to display random products from the product listing
But it has no effect!!!.

I need to keep the files as .html becasue the site's existing format is such.

how can i do this?

thanks in advance

It's my understanding that if the file type is not .php (or one of it's variations) the php parser doesn't get invoked on the web server so the code gets treated like any other content and is displayed.

It's my understanding that if the file type is not .php (or one of it's variations) the php parser doesn't get invoked on the web server so the code gets treated like any other content and is displayed.

Right. You can edit your .htaccess file to parse html file as a php file. Check this link.

Good answer! I went looking and found the hook to accomplish that in H-sphere control panel too.

Thanks guys!!
I added the handler to the cpanel

It worked a treat!!

sample .htaccess file.

RewriteEngine On

RewriteRule ^\.htaccess$ - [F] 
RewriteRule ^\.jpg$ - [F]
RewriteRule ^\.html$ - [F]
RewriteRule ^\.css$ - [F]


RewriteRule ^([0-9]+),([0-9]+)$ /teknober.com/index.php?Language=$1&Index=$2 [L]
RewriteRule ^([0-9]+),([0-9]+),([0-9]+)$ /teknober.com/index.php?Language=$1&Index=$2&Category=$3 [L]
RewriteRule ^([0-9]+),([0-9]+),([0-9]+),([0-9]+)$ /teknober.com/index.php?Language=$1&Index=$2&Category=$3&State=$4 [L]
RewriteRule ^([0-9]+),([0-9]+),([0-9]+),([0-9]+),([0-9]+)$ /teknober.com/index.php?Language=$1&Index=$2&Category=$3&State=$4&Position=$5 [L]
RewriteRule ^([0-9]+),([0-9]+),([0-9]+),([0-9]+),([0-9]+),([0-9]+)$ /teknober.com/index.php?Language=$1&Index=$2&Category=$3&State=$4&Position=$5&SubCategory=$6 [L]
This article has been dead for over six months. Start a new discussion instead.