Jump to content

[SOLVED] Include form


Recommended Posts

I've noticed something with WAMP5 ver 1.6.1, is when I do an include on a form mail script I found, that it doesn't show up on localhost when I try to view the page but when I upload to my server it does.  I have Cartweaver & WAMP5 shows thoses includes ok. the form appears ok in Dreamweaver.  Its no big deal maybe its the differences between PHP versions or something.

 

Dave

Link to comment
https://forums.phpfreaks.com/topic/37344-solved-include-form/
Share on other sites

wildteen88

 

WAMP5 1.6.1 uses PHP 5.1.2.  I use the SpiceScript Contact Us Package and the include statement:

  "<? include ("guestmailer/guest_form.php");?>"

I looked at the script & the readme, it doesn't say what PHP it was written for. :(

 

Its in use on my contact us page & for my guestbook. http://candlesbythecreek.com/contactus.php & http://candlesbythecreek.com/guestbook.php . The guestbook doesn't auto post.

 

Dave

Link to comment
https://forums.phpfreaks.com/topic/37344-solved-include-form/#findComment-179907
Share on other sites

Does it work if you use the following code instead?:

<?php include ("guestmailer/guest_form.php");?>

 

If it does then its a configuration issue. Your host has a setting called short_open_tag turned on, which allows you to use <? ?> instead of <?php ?> and thus reaosn why the code works on your host and not your local dev server.

 

In order for <? ?> tags to work on your local dev server you need to edit php's config file (php.ini) to turn short_open_tag on.

Change short_open_tag = off to short_open_tag = on

Save the php.ini

 

When you have turned this setting on you must restart the server (click WAMP's icon in the taskbar and select restart All services from the menu to restart the server).

Link to comment
https://forums.phpfreaks.com/topic/37344-solved-include-form/#findComment-180045
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.