Virtual Mechanics: Community Forums and FAQs
Virtual Mechanics: Community Forums and FAQs
WebDwarf, SiteSpinner, SiteSpinner Pro 'How do I...'
Need a solution for this Problem with PHP code|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Junior Mechanic |
Hi There
I am having a problem getting my coding to work. I do not understand this html or php stuff so asked a friend to develop this for me. I have loaded this page using sitespinner pro http://www.selfhypnosis.co.za/htdocs/js09.html To give you a comparison The same page but on a site built using Gobal Cute http://www.jasonsandler.co.za/id46.php This is how the form should look Here is the view code print out I have highlighted the bit of code, in yellow that I need to get to work. The script loaded to each page, is in PHP and will appear on about 45 pages on this web site. <?php include('form.php'); ?> The rest of the script is housed on the domain server, somehow the form when filled in gives me the URL of the page that it is sent from, with the rest of the clients particulars as shown on the GobalCute built site link. <!-- Start HTML generated by IMS from Virtual Mechanics Inc.--> <div id="Oobj2062"> <img id="Ggeo1769" src="./geometry/obj2062geo1769shd8pg10p42.png" alt=""></div> <div id="Oobj2061"> <img id="Ggeo1768" src="./geometry/obj2061geo1768pg10p42.jpg" alt=""></div> <div id="Oobj99"> <div id="Grtf43" class="dfltt"> <a href="http://www.webwork.co.za"><span><span class ="">© WebWork. All rights reserved without limitation under copyright</span></span><span><span class ="">.</span><br> <br> <br> </span></a> </div> </div> <div id="Oobj101"> <img id="Ggeo62" src="./geometry/obj101geo62pg10p42.jpg" alt=""></div> <div id="Oobj333"> <div id="Grtf382" class="dfltt"> <span>Healing Power of Hypnotism<br> <br> </span><span>Hypnosis is proving to be a potent healing tool as it can influence subconscious physiological mechanisms in the body. <br> <br> </span><span><span class ="">Hypnotherapy can be used to treat:</span> <br> </span><span> Irritible Bowel Syndrome<br> </span><span> Anxiety <br> </span><span> Depression <br> </span><span> Asthma <br> </span><span> Stop Smoking <br> </span><span> Skin Conditions <br> <br> </span><span><span class ="">Hypnotherapy is also very effective for treating pain such as: <br> </span></span><span> Chronic Pain <br> </span><span> Burn Pain <br> </span><span> Migraines <br> </span><span> Arthritis<br> <br> </span><span>To request further information <br> </span><span>Please fill in the form completely making sure your e-mail address is correct <br> <br> </span></div> </div> <div id="Oobj337"> <div id="Gcode383" class="dfltc"> <?php include('form.php'); ?></div> </div> <div id="Oobj670"> <img id="Ggeo504" src="./geometry/obj670geo504pg10p42.jpg" alt=""></div> <!-- End IMS generated HTML.--> Thanking you for your time Do have a really great day Tony |
||
|
|
Honorary 'Aussie' Mechanic |
For starters, your Site Spinner page does not have a form, so your script has nothing to action against. It would also help if you could post the contents of the form.php script.
|
|||
|
Guru 'Power' Mechanic![]() |
The form.php file generates the form code that should appear on your SiteSpinner page. The code itself seems to work: see here.
However the form.php file is in your root folder, while your test page is in a "htdocs" folder. Your host is looking for the form.php file in the htdocs folder and not finding it. Two solutions: 1. Put both the page holding the form and the form.php file in the same folder (my preference). 2. Modify the code on your form page to point at the folder containing form.php. Eg:
<?php
include('http://www.selfhypnosis.co.za/form.php');
?> |
|||
|
|
Junior Mechanic |
Thank you for your responses
Let me move the form and the form php filr into the same folder. That seems to make the most sense to do Thank you Oldman67 Tony |
|||
|
|
Junior Mechanic |
The guy who made this form for me asks the folowing.
I notice the file is not saved as a .php file, but .html. It MUST be .php before it will work. Ask the guys on the forum how to save the file as a .php. I tried the option two listed by Brucess. Could not get that to work either. Thanks Brucess Tony the Oldman67 |
|||
|
|
Honorary 'Aussie' Mechanic |
My first post was made in haste, but I now see your problem.
You will note that the same page built in Gobal Cute has a file extension of php. To do the same with your Site Spinner page, open your project and select the js09 page. Now go to Publish. On the Pages tab, make sure you select “Export current page”, then on the “Page File Names and Extensions” section, use the right-hand drop-down box and select “.php” Now publish, and the page should work. |
|||
|
|
Honorary 'Aussie' Mechanic |
I forgot to mention,
Don't forget to check amy internal and/or external links to that page and change them accordingly. |
|||
|
|
Junior Mechanic |
Will do thanks again
|
|||
|
|
Junior Mechanic |
Thank you for all the help.
I am now ready to show the client You saved the day Oldman67 Tony |
|||
|
|
Honorary 'Aussie' Mechanic |
Now that you have it working, instead of going through the steps I said above, there is a better way of permanently setting the page as PHP and will take into account any links should you make any changes.
Again open your project and select the js09 page. Double click a blank area to open the page editor. Go the “Page Select” tab and in the “HTML File Extension” drop-down box, select .php Do not click on “All Pages” as that will indeed change the file extension of all pages. |
|||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|
Virtual Mechanics: Community Forums and FAQs
Virtual Mechanics: Community Forums and FAQs
WebDwarf, SiteSpinner, SiteSpinner Pro 'How do I...'
Need a solution for this Problem with PHP code
