HTML Form question

The Dentist

VIP Member
VIP Member
Joined
Apr 2, 2006
Messages
8,321
Reaction score
1,024
Location
London
Guys im coming up short here.
I wrote a simple html page that has about 5 text fields and 1 textarea.

What I want is when a user clicks on the submit button, i want the contents to be sent to the email address in the form tag in a legible format.
like so:


Name: jdsnkfv
Address: jhdkjfdjlf
Comment: jlffldkfmr

In the email body.

I also want in the same time the same content to be sent to the same email address as a csv file. Is this possible?
 

The Dentist

VIP Member
VIP Member
Joined
Apr 2, 2006
Messages
8,321
Reaction score
1,024
Location
London
Is it possible with php mate?

i will have a read of it. never learnt it but guess i could give it a try.
 

The Dentist

VIP Member
VIP Member
Joined
Apr 2, 2006
Messages
8,321
Reaction score
1,024
Location
London
am i doing something wrong.

I know a html doc starts with <html><body> etc

how does a php page start? is it <?php

because everytime i click on submit, it goes to the php page in the browser with all the code. it doesnt do what its supposed to do or am i missing something? do i need a php server?
 

Spectre

Administrator
Staff member
Jnr Admin
Joined
Jun 3, 2001
Messages
40,759
Reaction score
4,964
Location
Airstrip One
Depending on what you're using, Windows?

Install WampServer. It's for development.
 

Him Her

VIP Member
VIP Member
Premium Member
Joined
Dec 23, 2011
Messages
8,143
Reaction score
6,420
Location
North Yorkshire
I'd assumed LAMP, sorry. PHP script starts with <?php but you need php installed on the server. In the first line of the html there's a reference to action= the .php script should be accessible from the web directory - usually in cgi-scripts. In LAMP you create a link to the directory so it can be found. If you're working on Windows maybe .asp would be better?
 

Spectre

Administrator
Staff member
Jnr Admin
Joined
Jun 3, 2001
Messages
40,759
Reaction score
4,964
Location
Airstrip One
The board is sanitising out the code, well, I can't see it anyway.

leftarrow?php for WAMP.
 

Him Her

VIP Member
VIP Member
Premium Member
Joined
Dec 23, 2011
Messages
8,143
Reaction score
6,420
Location
North Yorkshire
Oh right, correct, the rest said:

... but you need php installed on the server. In the first line of the html there's a reference to action= the .php script should be accessible from the web directory - usually in cgi-scripts. In LAMP you create a link to the directory so it can be found. If you're working on Windows maybe .asp would be better?
 

The Dentist

VIP Member
VIP Member
Joined
Apr 2, 2006
Messages
8,321
Reaction score
1,024
Location
London
The forum cut off my code lol never mind.

I found out if i put the code enctype=text/plain in the form tag it will do it.
Only problem is that it only sends stuff from text boxes and not radio or drop down boxes.
Got a meeting with the developer at work tomorrow so will see what he says.
 
TEST
Top