Hi,
I'm looking for some help to parse or separate data from one field and copy it into different fields on my form.
I’ve written a PHP Script on my website that sends the data entered in a web form to me in an email, I currently send the data to myself in the following format:
Firstname,surname,address,postcode,telephone,emailaddress
However if it helps or makes the code easier in MS Access I can change PHP script so it comes to me in pretty much any format I choose, such as something like:
“Firstname””surname””address””postcode””telephone””emailaddress”
or
(Firstname)(surname)(address)(postcode)(telephone)(emailaddress)
or any other variation really. An example using the current format would be:
joe,bloggs,50 main street,NH3 4AS,01234 567890,joebloggs@gmail.com
On my form so I can copy the data sent in my emails into a text field (For example the field would be called [EmailRawFormat], then use code to separate it into the right fields on my form.
I was thinking a code along the following lines but wasn’t sure how to proceed
Me.FirstNameField.Value =
Me.SurnameField.Value =
Me.AddressField.Value =
Me.PostcodeField.Value =
Me.TelephoneField.Value =
Me.EmailAddressField.Value =
I’m not keen on linking my database to the webform using our server as it appears (I may be mistaken but I don’t want to chance it) that people have been trying to send viruses through the webform. I know our email filters detect the viruses and block them out but I wouldn’t want to expose our database to them directly.
There are lots of posts in this forum for importing csv files, which led me onto parsing, but most of them involve minor complications here and there. As I have the option of setting the format myself I was wondering if anyone could please recommend the best format to use and coding to parse the data.
To sum up: I have a text field on my form that contains raw data which I want to separate into relevant fields on my form. I can set the format of the raw data, but need help with the coding to separate it.
Any help would be greatly appreciated. Thank you for your time.
Dean.
I'm looking for some help to parse or separate data from one field and copy it into different fields on my form.
I’ve written a PHP Script on my website that sends the data entered in a web form to me in an email, I currently send the data to myself in the following format:
Firstname,surname,address,postcode,telephone,emailaddress
However if it helps or makes the code easier in MS Access I can change PHP script so it comes to me in pretty much any format I choose, such as something like:
“Firstname””surname””address””postcode””telephone””emailaddress”
or
(Firstname)(surname)(address)(postcode)(telephone)(emailaddress)
or any other variation really. An example using the current format would be:
joe,bloggs,50 main street,NH3 4AS,01234 567890,joebloggs@gmail.com
On my form so I can copy the data sent in my emails into a text field (For example the field would be called [EmailRawFormat], then use code to separate it into the right fields on my form.
I was thinking a code along the following lines but wasn’t sure how to proceed
Me.FirstNameField.Value =
Me.SurnameField.Value =
Me.AddressField.Value =
Me.PostcodeField.Value =
Me.TelephoneField.Value =
Me.EmailAddressField.Value =
I’m not keen on linking my database to the webform using our server as it appears (I may be mistaken but I don’t want to chance it) that people have been trying to send viruses through the webform. I know our email filters detect the viruses and block them out but I wouldn’t want to expose our database to them directly.
There are lots of posts in this forum for importing csv files, which led me onto parsing, but most of them involve minor complications here and there. As I have the option of setting the format myself I was wondering if anyone could please recommend the best format to use and coding to parse the data.
To sum up: I have a text field on my form that contains raw data which I want to separate into relevant fields on my form. I can set the format of the raw data, but need help with the coding to separate it.
Any help would be greatly appreciated. Thank you for your time.
Dean.