{php}{/php} tags don't work
Posted: Wed Jun 01, 2011 10:38 am
Hello,
I've created an website using cmsms(v 1.9.4.1.) with quattro simple theme.
Managed to do everything ok whille developing it as a subdomain. Now I've done everything from the start on the actual hosting package.
The problem is that even if I've just copied the code from the previous site I'm not getting any response from the code in the pages.
I have to mention that I've disabled WYSIWYG editor to be sure that the code don't get altered and also edited config file and activated smarty tags.
Do you have any idea why the website is showing the code instead of running the scripts?
Is there any change that had been made in the way you deal with php code inside cmsms since the 1.9.3 version on which I firstly developed the website?
EXAMPLE:
this code:
---------------------------------------------------------------
{php}
session_start();
$data = mysql_query("SELECT * FROM evenimenteEMC");
$n=1;
echo "<table border=\"0\" >";
while($result = mysql_fetch_array( $data ))
{
echo "<tr><td rowspan=\"3\">";
$tip=$result['tip_eveniment'];
$value=$result['id'];
if($tip=="curs online"){
{/php}
<form action="index.php?page=descriere-eveniment" method="post" name={php} echo $result['id'] ; {/php}>
<input type="hidden" name="detalii" id="detalii" value= {php} echo $result['id'] ; {/php} >
<input type="image" src="uploads/images/p1.jpg" value="submit" ></td>
</form>
{php} etc.
---------------------------------------------------------------
returns this:
..................................................................
session_start(); $data = mysql_query("SELECT * FROM evenimenteEMC"); $n=1; echo ""; while($result = mysql_fetch_array( $data )) else if($tip=="simpozion")else if($tip=="congres")else if($tip=="curs rezidential")else if($tip=="conferinta")else if($tip=="expozitie")else if($tip=="workshop") echo ""; echo ""; echo ""; echo ""; echo ""; $n++;} echo "
"; echo ""; echo $result['nume_curs']; echo ""; echo " / "; echo $result['data_inceput']; echo "
"; echo $result['localitate']; echo " / credite:"; echo $result['nr_credite']; echo $result['acreditare']; echo "
"; echo $result['tel']; echo " / "; echo $result['web']; echo "
" ;
..................................................................
please let me know if you have any suggestions.
Regards,
Razvan
I've created an website using cmsms(v 1.9.4.1.) with quattro simple theme.
Managed to do everything ok whille developing it as a subdomain. Now I've done everything from the start on the actual hosting package.
The problem is that even if I've just copied the code from the previous site I'm not getting any response from the code in the pages.
I have to mention that I've disabled WYSIWYG editor to be sure that the code don't get altered and also edited config file and activated smarty tags.
Do you have any idea why the website is showing the code instead of running the scripts?
Is there any change that had been made in the way you deal with php code inside cmsms since the 1.9.3 version on which I firstly developed the website?
EXAMPLE:
this code:
---------------------------------------------------------------
{php}
session_start();
$data = mysql_query("SELECT * FROM evenimenteEMC");
$n=1;
echo "<table border=\"0\" >";
while($result = mysql_fetch_array( $data ))
{
echo "<tr><td rowspan=\"3\">";
$tip=$result['tip_eveniment'];
$value=$result['id'];
if($tip=="curs online"){
{/php}
<form action="index.php?page=descriere-eveniment" method="post" name={php} echo $result['id'] ; {/php}>
<input type="hidden" name="detalii" id="detalii" value= {php} echo $result['id'] ; {/php} >
<input type="image" src="uploads/images/p1.jpg" value="submit" ></td>
</form>
{php} etc.
---------------------------------------------------------------
returns this:
..................................................................
session_start(); $data = mysql_query("SELECT * FROM evenimenteEMC"); $n=1; echo ""; while($result = mysql_fetch_array( $data )) else if($tip=="simpozion")else if($tip=="congres")else if($tip=="curs rezidential")else if($tip=="conferinta")else if($tip=="expozitie")else if($tip=="workshop") echo ""; echo ""; echo ""; echo ""; echo ""; $n++;} echo "
"; echo ""; echo $result['nume_curs']; echo ""; echo " / "; echo $result['data_inceput']; echo "
"; echo $result['localitate']; echo " / credite:"; echo $result['nr_credite']; echo $result['acreditare']; echo "
"; echo $result['tel']; echo " / "; echo $result['web']; echo "
" ;
..................................................................
please let me know if you have any suggestions.
Regards,
Razvan