Jump to content

Sending mail


Recommended Posts

Hi,

 

Recently I have installed a simple send mail form on a host, but I cannot get it to run. I tried the same script on other 3 hosts and it works as it is, but on the host I need it to work it doesn't. May be you can look at it. Some parts of the php code appear in the form on that host , maybe there are some php or apache setting to be made to work... Here it works for example.

 

Thanks.

 

Already tried :

changing "<?" in "<?php

short_open_tag = On in php.ini[/url]

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/117929-sending-mail/
Share on other sites

Its because you're using short tags, on your host (quanticlab.com) short_open_tag is disabled, that is why you see your PHP in the source code.

 

When modifying the php.ini make sure its the same php.ini PHP is using, you can check this by running phpinfo

You might want to ask your host how to enabled short_open_tag and/or how to configure PHP.

 

You'll be better of converting all short tags (<? ?>, <?= ?>) to full PHP tags (<?php ?>, <?php echo ?>). If the script still doesn work after converting the tags then your Server may be mis-configured.

Link to comment
https://forums.phpfreaks.com/topic/117929-sending-mail/#findComment-606613
Share on other sites

I would guess that the host does not allow that setting to be changed using the method you are trying.

 

Why not take the easy way out and change any short tags <? and <?= to long tags <?php and <?php echo like wildteen88 already suggested. Then you will have code that will work with any short_open_tag setting and you won't have to mess with it any more.

Link to comment
https://forums.phpfreaks.com/topic/117929-sending-mail/#findComment-607300
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.