Insert PHP in Form HTML Code

pm pmalicet 28 Apr, 2011
Hi

I've tried to insert php code in Form HTML code, like this :
<input type="hidden" name="destinataire" value="webmaster@<?php echo $_SERVER['SERVER_NAME'] ?> />

I've also tried with <?= tag.

When I try to save my form, I get an empty page with the error :
Method Not Implemented

POST to /reseau-greeneo.eu/administrator/index2.php not supported.
Apache Server at ecogreeneo.eu Port 80


and the part of code containig php isn't saved :
<input type="hidden" name="destinataire" />

Where am I wrong ?

Thanks
Gr GreyHead 28 Apr, 2011
Hi pmalicet,

Which version of ChronoForms is this?

The code should be OK; I use similar code very day in the Form HTML box.

The index2.php error is probably from an Apache security module and you may need the rules modified to include index2.php - if you search here on the error you'l find some similare threads.

Bob
pm pmalicet 28 Apr, 2011
Hi Bob,

thanks for your answer...

Which version of ChronoForms is this?


1.2.50 -> I think it is the last version, isn't it ?

I'll search similar errors in the forum...

Pierre
Gr GreyHead 28 Apr, 2011
Hi pmalicet ,

v1.2.50 doesn't look right. The latest versions are:[list]
  • ChronoForms v3.2 for Joomla! 1.5 without the MooTools plug-in enabled

  • ChronoForms v4 RC 1.8 for Joomla! 1.5 with the MooTools upgrade plug-in enabled

  • ChronoForms v4 RC 1.8 for Joomla! 1.6
  • [/list]

    Bob
    pm pmalicet 29 Apr, 2011
    Hi,

    I'm sorry, I got the wrong component version...
    My version of ChronoForms is 3.2..., JOOMLA 1.5.23 stable

    I searched other causes of this error and found nothing.
    Plugin MooTools is desactivated.
    I'll try to change index2.php for index.php.

    Thanks

    Pierre
    Gr GreyHead 29 Apr, 2011
    Hi Pierre,

    It's probably a problem with a mod_security setting. Unfortunately I don't know much about mod-security but if you take the ChronoSEarch link from the Tutorials menu above and search on index2.php mod_security you will find several threads.

    Bob
    pm pmalicet 29 Apr, 2011
    Hi,

    I searched in Forum and found the only solution would be to modify APACHE configuration by adding a virtual host without mod_security, what I cant do (My sites are on shared hosts)

    I finally resolved the problem : I've update the article directly in table jos_chrono_contact...

    If phpMyAdmin knows about updating this table without error, why are you not able to do the same ?

    Thanks

    Pierre
    Gr GreyHead 29 Apr, 2011
    Hi Pierre,

    Because your PHPMyAdmin isn't running inside Joomla! and probably isn't running with mod_security set. If you talk to your ISP, or check their help files then you should be able to edit the mod_security settings in use on your site.

    Bob
    This topic is locked and no more replies can be posted.