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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.