473,811 Members | 3,737 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 3290
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
2373
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 to an e- mail with CDONTS:
2
10988
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 tell me why this is? I have noticed that if I place a second input text box on the page, pressing...
5
6097
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 would never be intended to be submitted. I realise that that concept is a non-starter in an Internet...
5
2640
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 meet the selected criteria. All this worked perfectly when I was sending text emails, but since I
4
9552
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
1147
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
3504
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 list and checkbox so that they can make changes. I named these elements as arrays and wish to run an...
19
248299
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. Assumptions - Basic HTML knowledge. - Basic PHP knowledge. HTML Forms A common and simple way of...
10
6984
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. Where to find the list of errors in websites as it is not the standard apache error. I could not find...
0
9605
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10405
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10136
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7671
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6893
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5556
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5697
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4342
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

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.