+ Reply to Thread
Results 1 to 4 of 4

Thread: Can I use PHP instead of HTML for my templates?

  1. #1
    Join Date
    Oct 2006
    Location
    Colorado Springs, CO
    Posts
    7

    Question Can I use PHP instead of HTML for my templates?

    Can I use PHP instead of HTML for my templates?

    It would be more convenient than having to update the HTML page manually every time I changed something in the PHP includes files.

    Any help would be greatly appreciated.

    Thanks!

  2. #2
    Join Date
    Oct 2006
    Location
    Colorado Springs, CO
    Posts
    7

    Default Re: Can I use PHP instead of HTML for my templates?

    After some searching, I see that it is possible.

    Using the http://www.pikespeakashrae.net/contactform1.php with fmbadhandler.php, I keep getting the message:
    Code:
    neither TEMPLATEDIR nor TEMPLATEURL is set
    even though I have set
    Code:
    $TEMPLATEURL ="http://www.pikespeakashrae.net/pftemplate";
    in http://www.pikespeakashrae.net/processform.php and
    Code:
        <input type="hidden" name="bad_url" value="http://www.pikespeakashrae.net/fmbadhandler.php" />
        <input type="hidden" name="bad_template" value="sorry.php" />
    in http://www.pikespeakashrae.net/contactform1.php


    Alternately, I tried using my own Javascript validation with this form http://www.pikespeakashrae.net/membershipform1.php, and the validation works, but when the form submits, I get this error
    Code:
    An error occurred while processing the form .
    
    Our staff have been alerted to the error .
    We apologize for any inconvenience this error may have caused. Your form submission was processed by (7.11), available from www.tectite.com.
    Any help would be greatly appreciated!

  3. #3
    Join Date
    Jun 2006
    Posts
    214

    Default Re: Can I use PHP instead of HTML for my templates?

    Did you set TEMPLATEURL in both formmail.php and fmbadhandler? It looks like everything is in the root? Maybe try setting a seperate folder for the templates then point to it. I have mine set mywebsite.com/forms/fmtemplates/ and the pointer $TEMPLATEDIR = "fmtemplates"; I use the TEMPLATEDIR then all the forms in the formmail/ along with formmail.php and fmbadhandler and all the templates in /formmail/fmtemplates/

    See it that works for you.

  4. #4
    Join Date
    Oct 2006
    Location
    Colorado Springs, CO
    Posts
    7

    Talking Re: Can I use PHP instead of HTML for my templates?

    THANK YOU! THANK YOU! THANK YOU!

    I didn't set $TEMPLATEURL in the fmbadhandler.php.

    Now I have and it's working.

    YAY! Thanks so much for your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. can't get good or bad templates to work...
    By skmember in forum FormMail Subscription Support
    Replies: 2
    Last Post: 04-Sep-2005, 11:14 PM
  2. php includes not showing up in good/bad templates
    By snodart in forum FormMail Subscription Support
    Replies: 2
    Last Post: 02-Apr-2005, 10:12 AM
  3. New Server - Templates sent as plain text
    By Anubis in forum FormMail Subscription Support
    Replies: 10
    Last Post: 19-Jan-2005, 11:30 AM
  4. html output error and parse errors in php
    By dynamicmedia in forum FormMail Subscription Support
    Replies: 8
    Last Post: 01-Dec-2004, 09:49 PM
  5. formmail trouble html or php file not sure
    By putertfix in forum FormMail Subscription Support
    Replies: 5
    Last Post: 25-Oct-2004, 09:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts