473,554 Members | 3,084 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

57 New Member
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= EnrolReq"

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 3273
epots9
1,351 Recognized Expert Top Contributor
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 New Member
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
daJunkCollector
76 New Member
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 "incrementi ng" 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 New Member
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 "incrementi ng" 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 Recognized Expert Expert
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 New Member
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 Recognized Expert Expert
html/css cannot do this. You need to ask on one of the programming boards.
Aug 14 '07 #8

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

Similar topics

4
2353
by: Andrew Williams | last post by:
Does anyone know of a way to quickly validate an HTML web form? I need to make sure that certain fields on my form actually contain data and are not submitted blank. I have tried using client-side Javascript validation which flags up when a field is empty but the form is still submitted. Here is the ASP code I am using to submit the form...
2
10976
by: Andrew Parish | last post by:
I have a page with an input text box and a button which validates the text (see below). If I click inside the text box, the button is highlighted. If I enter some text inside the box and press enter, or click on the button, my 'Go' function is called. If I press enter inside the box while it is empty, the page is reloaded. Could anyone...
5
6076
by: Richard Cornford | last post by:
I am interested in hearing opinions on the semantic meaning of FORM (elements) in HTML. I have to start of apologising because this question arose in a context that is not applicable to the Internet. Specifically, marking up a document that will contain multiple related form controls (intended exclusively for client-side scripting) that...
5
2610
by: BaWork | last post by:
I have a web form where a client can select which site members to send an email to. This form is populated from the contents of the member table, so the form can have 0-x names listed on it depending on member expiration dates. When the form is submitted, the code loops through the form contents and sends an email to those members that...
4
9471
by: James Bond 007 | last post by:
I am a novice to Javascript (can do simple text-based pop-ups, but not familiar with variable manipulation). I would like to have a Javascript that gives me the start time (I don't care about the date) when the user entered my webpage and then the time that the user hit the "Submit" button on my HTML form.
2
1139
by: Wayne | last post by:
Hi, I have recently added tried to update the feedback form on my page to be sent in HTML format. Problem is that when its submitted, I get the mail without the variable input, just the variable name. I have added the text version to it and both send fine, but still only the text version includes the variable input.
16
3466
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record in a hidden field) I wish the user to be able to edit the data in the table, so I have extracted the records into hiddenfield, textareas, dropdown...
19
248048
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect this data is essential to any developer. This article is a basic tutorial on how to user HTML Forms, the most common method of data collection. ...
10
6935
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration of section c. Not sure where went wrong as the web page displayed internal server error. Also, what is the error 543? and error 2114....
0
7570
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7493
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7854
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6113
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5411
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3537
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1992
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1107
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
808
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.