PDA

View Full Version : what was supposed to be a simply form?



elliot
09-04-2005, 08:13 PM
Hi guys,

I'll be totally honest, this is a scary part of the forum for me. I haven't a clue what's going wrong/what i'm doing wrong, though I do know my form isn't doing what it needs to :(

I've gone along with a php option as I have had one working before on a past project I did, I thought by replicating what I did before it should? work again?? nope

well here's the page:
http://www.clippergems.com/who.html

and the page it arives at
http://www.clippergems.com/clip_form_done.php

I'm not getting the confirmation email?

and on top of this the .php page it goe's to doesn't show the background image to the site?? uhmmm :confused:

I'm going to have another good look through the code incase I'm wasting your time and find it's a silly mistake,

all the best,
elliot

Twey
09-05-2005, 09:34 AM
You don't need this:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

Replacing headers with meta tags is a bad idea. When using PHP, you can do this:
<?php header("Content-Type: text/html; charset=iso-8859-1"); ?>
Make sure you do it before outputting any HTML. However, this shouldn't be necessary. Your server should be configured to output the correct Content-Type: header automatically. It should fix your problem, but you must also edit your server's configuration to parse and serve PHP pages correctly. At the moment it's serving it up as text/plain.

elliot
09-05-2005, 03:07 PM
Hi Twey,

i've gone an adjusted the header as you said with the <php> tag arround it.
I'm still not getting a test email?

As far as i'm aware the server should be configured to enable php. I dbl check with the settings from the host I go through, though I've got a form to work before using the same host?

When you say it's serves it as text/plain do you mean it's interpreting it as any other page on my site, html ?

One other thing, the background graphic is lost on the .php page, i'm guessing php is causing this? do I need to re-think this page to put the graphic in a z-index layer?

thanks for getting back mate :)

all the best, elliot

Twey
09-05-2005, 03:45 PM
When you say it's serves it as text/plain do you mean it's interpreting it as any other page on my site, html ?
No, I mean it's being served up as plain text. Not interpreted at all, nor is it being parsed at the browser.
<?php header("Content-Type: text/html; charset=iso-8859-1"); ?>
must come before any HTML is output. This includes <!DOCTYPE>, <html>, &c.

the background graphic is lost on the .php page
Look at the page in Firefox, which doesn't think it knows better than the server, and you'll see what I'm talking about. The page is not being parsed by PHP. You need to set up an Apache handler for .php, parsing it as application/x-httpd-php.

P.S. type="text/JavaScript": text/javascript is all lower-case. language= is not necessary.