need form help on my new website.

Soldato
Joined
27 Sep 2005
Posts
5,909
Location
Burbage, Hinckley
Hi,

I have set myself a task of getting my new website completely up and running by the new year, but I'm having a little trouble getting a form to work correctly.

Ideally I want the form to submit the info entered and send on to a specified email address but I don't want it to have to open the users email client to do so.

here's the template for the site so far.

http://www.pitmancoventry.co.uk/neweb/

Any help or advice on how to get the form working properly would be very much appreciated ;)

Thanks

Joebob
 
Firstly, nice site. However...

When rendering in Firefox, your 'Submit' button renders on your border line.

ocUK_upload_border.png


Also, something with your form, you could use a drop down box, so instead of the user typing in the course, they can simply choose from the list.

Do you have PHP on your web server?
 
Yeah I know about the problem with the submit button. Looks even worse in Chrome and Safari, but I intend to tweak that a little later.

The web server is my own server at work. It isn't setup for PHP as far as I'm aware but I suppose we could do if we wanted to - although I wouldn't know what I would need to do myself, but I know a man who can :)
 
Yep, if possible, php would be the quickest and easiest way to do it :)
A good guide is here.

787_Untitled.jpg

FFX renders the code with an empty div, or too big a div (double height) if you could put 'id="testdiv", inside the div so it says:
<td><div align="center" id="testdiv">
<input type="submit" name="SUBMIT" id="SUBMIT" value="Submit" />
</div></td>


it makes it easier to see (in firefox web dev toolbar) how it renders the div.

There's a line that says <table width="92%" border="0" cellspacing="0" cellpadding="0">
You could put 'height=""' into there, with a value inside the "s, may require a play around.
 
Last edited:
Also, I find using Opera to render my websites first makes things easier. If it doesn't display in Opera properly, its going to look worse in others.
 
What OS is the web server running?
Windows Server 2003 32bit. I will get it PHP enabled on Monday.

Yep, if possible, php would be the quickest and easiest way to do it :)
A good guide is here.

FFX renders the code with an empty div, or too big a div (double height) if you could put 'id="testdiv", inside the div so it says:
<td><div align="center" id="testdiv">
<input type="submit" name="SUBMIT" id="SUBMIT" value="Submit" />
</div></td>


it makes it easier to see (in firefox web dev toolbar) how it renders the div.

There's a line that says <table width="92%" border="0" cellspacing="0" cellpadding="0">
You could put 'height=""' into there, with a value inside the "s, may require a play around.
Excellent, I will have a play thanks. I used to be a web designer by trade (well for about a year anyway) but that was about 8 years ago so I'm a little out of touch.
Also, I find using Opera to render my websites first makes things easier. If it doesn't display in Opera properly, its going to look worse in others.
I never thought about Opera - downloading now, cheers.
 
I have another question I'm hoping to get some help with.

I want to include a box for people to put their email address if they want a e-brochure sending to them. After submitting though I want to know if it's possible to generate an auto replay email with said pdf brochure attached?
 
I have another question I'm hoping to get some help with.

I want to include a box for people to put their email address if they want a e-brochure sending to them. After submitting though I want to know if it's possible to generate an auto replay email with said pdf brochure attached?

Attached ? I don't think so.... *ponders* An email with a link to it would work; an auto reply to the users email is easy:

$email_from = users-email-address;
$email_address = your-site-email-address;
$message = "thank you for your enquiry blah blah blah";
mail($email_from, "Form", $message, "From: ". $email_address);

edit: ahh, I was wrong :o tell me how! :p
 
Using codeigniter:

Code:
$this->load->library('email');
$this->email->from('[email protected]', 'Your Name');
$this->email->to('[email protected]');
$this->email->cc('[email protected]');
$this->email->bcc('[email protected]');
$this->email->attach('/path/to/file');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();

Of course there are other ways, and you could write a script yourself, but I pretty much use CI exclusively now, for the amount of development time it saves.
 
hmm this could be your problem:

<form id="Enquiry" name="Enquiry" method="post" action="mailto:[email protected]">

I think you want the "action" to be a page that contains the code that handles the email to be sent.

Also it's perfectly possible to use ASP formmail to send an email if you are running on a windows server environment, a guide for setting this up is here:

http://www.brainjar.com/asp/formmail/

A lot of people probably just prefer PHP here for coding :p
 
hmm this could be your problem:

<form id="Enquiry" name="Enquiry" method="post" action="mailto:[email protected]">

I think you want the "action" to be a page that contains the code that handles the email to be sent.

Also it's perfectly possible to use ASP formmail to send an email if you are running on a windows server environment, a guide for setting this up is here:

http://www.brainjar.com/asp/formmail/

A lot of people probably just prefer PHP here for coding :p

That's a bit of naff way of sending an email with ASP (using loads of hidden fields).
 
Using codeigniter:

Code:
$this->load->library('email');
$this->email->from('[email protected]', 'Your Name');
$this->email->to('[email protected]');
$this->email->cc('[email protected]');
$this->email->bcc('[email protected]');
$this->email->attach('/path/to/file');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();

Of course there are other ways, and you could write a script yourself, but I pretty much use CI exclusively now, for the amount of development time it saves.

Sorry to hijack thread. Could you explain what it does? I guess you have to install it on the server? (Stupid question).

Is it like OOP?
 
Sorry to hijack thread. Could you explain what it does? I guess you have to install it on the server? (Stupid question).

Is it like OOP?

Yer kinda. Its a web dev framework. The idea is you can use premade objects and classes to speed up making your php applications, as opposed to writing them from a blank page.
 
Back
Top Bottom