469,572 Members | 1,206 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,572 developers. It's quick & easy.

How can I make a HTML Form Subject increment by 1 each time Submitted??

57
I am working on a html form for work, I need to make the Subject of the email which the form produces to be unique each time.

The subject is currently hard coded in, in the format of:<form method="post" action="mailto:an.address@work.co.uk?subject=Enrol Req"

I would like the subject to include a number at the end which will increase by 1 each time, so the subject will be completely unique each time. I'm guessing it would have to refer to an external file which would keep a track of the last number used, but as for how... I'm completely stuck... over to the experts!!
Aug 8 '07 #1
7 2950
epots9
1,351 Expert 1GB
that has nothing to do with css, but server-side scripting is what u need.

heres how to read and write a text file using php.

good luck
Aug 8 '07 #2
plumba
57
Fantasitc, thanks. Sorry the post is i the wrong area, but I'm learning....

Only thing is, when it views the extrenal text file, how can I get it to increment the number by one each time??

If you tell me where is best to post this question too that'd be great...

Thanks again...
Aug 9 '07 #3
Hey bud,

Came across your post by accident and I actually know the answer to this one:


[PHP]anyVariable= 500;
anyVariable++;

echo anyVariable;[/PHP]

The "++" at the end of the variable is the key. It is called "incrementing" a variable. You'll still have a little more research to do, but once you get a little more code together you should post it on the PHP forums.
Aug 9 '07 #4
plumba
57
Hey bud,

Came across your post by accident and I actually know the answer to this one:


[PHP]anyVariable= 500;
anyVariable++;

echo anyVariable;[/PHP]

The "++" at the end of the variable is the key. It is called "incrementing" a variable. You'll still have a little more research to do, but once you get a little more code together you should post it on the PHP forums.
Thanks for the response, but I cant figure out the answer :-( can you elaborate??
Aug 13 '07 #5
drhowarddrfine
7,435 Expert 4TB
Anytime you have a variable and you put ++ at the end, that variable is incremented by one. So, if i=3 and then you say i++, then i==4.
Aug 13 '07 #6
plumba
57
Anytime you have a variable and you put ++ at the end, that variable is incremented by one. So, if i=3 and then you say i++, then i==4.
I dont know enough about coding to work from the suggestion. It will all have to be done server side if poss.... I just need the html/java to call a file get a number and bang it into the subject, then boost the number up by 1.

Any more suggestions???
Aug 14 '07 #7
drhowarddrfine
7,435 Expert 4TB
html/css cannot do this. You need to ask on one of the programming boards.
Aug 14 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Andrew Williams | last post: by
2 posts views Thread by Andrew Parish | last post: by
5 posts views Thread by Richard Cornford | last post: by
4 posts views Thread by James Bond 007 | last post: by
2 posts views Thread by Wayne | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.