|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Web form using php to import into Access db
Hi everyone:
I need to make a web form in php, that sends me the results by mail, ok, that is the easy part, I know how to do it, the thing I don't know, is that I need that the results get formated to import them into Access, as a delimited text with | delimiter. I already have the web form, but the results that send by mail are not formatted to import them into Access, here is an example what I need, to ilustrate my question better: Web form: (What the user see and must fill) Name: John Last name: Doe Sec last name: Doyle Gender: 0 (Where 0 is Male and 1 is Female) Marital status: 1 (Where 0 is Single, 1 is Married, 2 is divorced, etc) This is what I get by mail, instead of that, what I need to have is this: (Table definitions for Access) *name|last|sec|gender|marital* But with the user info in it, like this: *John|Doe|Doyle|0|1* And once I have this message in my mail, I can copy, paste it in text, save it into one file, and then, go to Access and import the file. Also, because is a convention of the application made it by Access (I didn't develop that application) I need to include the * asterisk at the beginning and end of web form, just to keep things in order, and not mixup them. The questions are: 1.- How can I convert or transform automatically the mail message to have it ready when arrives to my mail, in order just to copy, paste and import into Access? 2.- How can I include the * asterisk at the beginning and the end of each web form is send by users? Thanks in advance. |
|
#2
|
||||
|
||||
|
How are you doing your mailing? With the PHP mail function or by using just a normal html form with it's action as a mailto?
Can you post some code so that we can get a better understanding of how you're approaching this? -b
__________________
PostgreSQL, it's what's for dinner... |
|
#3
|
|||
|
|||
|
This is how I did it and also a question...
Hi bcyde:
I just made a php file, named mailme.php, and put this code in it: PHP Code:
In my form, I called this script from <form action='mailme.php' method='POST'> Now the problem I have is that I need to validate the form, because in my case all the fields are mandatory. I already tried with a validation Javascript, but it didn't work for radial buttons and drop down menus, just for text. Also I have a form-validator.php class, but I dont know how to include it and configure it to fit my needs. Here is the code: PHP Code:
If you or someone else can help me to get this thing done, I would be very grateful. Thanks again |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > Web form using php to import into Access db |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|