Integrate a PHP Form
I have an accessible and secure form script for my site with instructions, Ok so far. I am not familiar with doing PHP.
My site currently composed of .shtml pages. I want to add a PHP enquiry form (configuration rules provided for the form I have so I can fiddle to get the fields I want: senders address, name and text field, really simple) to my Office page.
My server allows PHP so do I need to do anything to get it to run?
I need to know what I need to do to the office.shtml to get it to run the PHP. This installation instruction is given:
"5. Using the PHP include function, include the file gbcf_form.php
in any *.php page file where you want it to be. It must be
below the <body> tag and preferably below the main heading.
I recommend placing it in the main content area.
See Example 1, below.
<?php include("form-files-directory/gbcf_form.php"); ?>"
What do I do to my office.shtml file to get it to run the PHP. Change it to office.php?
Any other advice I've forgotten appreciated. Thanks.
Changing the file extension should do it.
It's just that I'd read that there might be problems getting the .shtml parsed as well. I shall try that.
What were you using the .shtml extension for? SSI includes can be replaced with PHP includes in that case.
Yes it was for includes, common header and footer for each page including js, css. What would be the php equivalent of:
<!--#include file="includes/head.html" -->?
Just as an aside (it looks from your post credentials as if you're an expert generally for websites), I want a domain name from a supplier (I think I will use UKreg) but the actual website is on another host (remote). Is it just the nameserver I change e.g. ns1/2 to get to the site pages for site and emails to that site?
Yes, point the nameservers to the hosting account. What else you need to do beyond that depends on the host.
The equivalent in PHP is <?php include('includes/head.html'); ?>.
Thanks, Dan. I will go away and try.