extracting a array and using it as a variable
Posted: Mon Jun 30, 2003 9:31 am
Please....Help!
I have the folowing problem:
I have this form that uses arrays to store data from users.
Now, I am supposed to make this form send a thank you mail with the mail the user entered.
I've found the function that can send this mail and it's something like this:
and here is the code that stores the arrays(it's preety big so I'll use just the part that contains the mail field)
Also...
The form uses an outside .php file to store the data in a data base.
I have the folowing problem:
I have this form that uses arrays to store data from users.
Now, I am supposed to make this form send a thank you mail with the mail the user entered.
I've found the function that can send this mail and it's something like this:
Code: Select all
$tomail = $_REQUESTї'fieldsїemail]їro]'];
$frommail = "me@host.ro";
$subject = "Example message";
$content = "The message";
$header = "From: $frommail\r\n" ."Reply-To: $frommail\r\n";
$sendmail = mail("$tomail","$subject","$content", "$header");Code: Select all
$fields=array();
$fieldsї'first name']ї'ro']='Prenume';
$fieldsї'first name']ї'en']='First name';
$fieldsї'last name']ї'ro']='Nume';
$fieldsї'last name']ї'en']='Last name';
$fieldsї'address']ї'ro']='Adresa';
$fieldsї'address']ї'en']='Address';
$fieldsї'birthdate']ї'ro']='Data naºterii';
$fieldsї'birthdate']ї'en']='Birthdate';
$fieldsї'day']ї'ro']='Zi';
$fieldsї'day']ї'en']='Day';
$fieldsї'month']ї'ro']='Luna';
$fieldsї'month']ї'en']='Month';
$fieldsї'year']ї'ro']='An';
$fieldsї'year']ї'en']='Year';
$fieldsї'employed']ї'ro']='Angajat';
$fieldsї'employed']ї'en']='Employed';
$fieldsї'employer']ї'ro']='Firma la care lucraþi';
$fieldsї'employer']ї'en']='Your employer';
$fieldsї'phone']ї'ro']='Telefon fix';
$fieldsї'phone']ї'en']='Phone';
$fieldsї'mobile']ї'ro']='Telefon mobil';
$fieldsї'mobile']ї'en']='Mobile phone';
$fieldsї'email']ї'ro']='Adresa e-mail';
$fieldsї'email']ї'en']='E-mail address';
$fieldsї'website']ї'ro']='Pagina web';
$fieldsї'website']ї'en']='Website';
$fieldsї'studies']ї'ro']='Studii';
$fieldsї'studies']ї'en']='Studies';The form uses an outside .php file to store the data in a data base.