focus
Member
- Messages
- 128
- Reaction score
- 0
- Points
- 16
Ive made a questionnair and everything works the way i want it besides the order of the information that get sends to my email.
MY PHP CODE:
<?php
function is_valid_email($from_email)
{
return preg_match('#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s\'"<>]+\.+[a-z]{2,6}))$#si', $from_email);
}
$to_email = "blabla@hotmail.com";
$subject = "Questionnaire";
$myradiobutton1.=$_POST['myradiobutton1']."\n" ;
$myradiobutton1.=$_POST['myradiobutton2']."\n" ;
$myradiobutton1.=$_POST['myradiobutton3']."\n" ;
$myradiobutton1.=$_POST['myradiobutton4']."\n" ;
$myradiobutton1.=$_POST['myradiobutton5']."\n" ;
$myradiobutton1.=$_POST['myradiobutton6']."\n" ;
$myradiobutton1.=$_POST['myradiobutton7']."\n" ;
$myradiobutton1.=$_POST['myradiobutton8']."\n" ;
$message = "
1. Do you welcome international students in Melbourne:
$myradiobutton1
2. Do you think international students deserve better consideration in terms of eligibility for concession on public transport?
$myradiobutton2
3. Do you believe enough safety measures are provided to international students on public transport?
$myradiobutton3
4. Do you think international students should be treated the same way as local students?
$myradiobutton4
5. Are you aware that the cost of travelling on public transport for international students is very high?
$myradiobutton5
6. Do you think Victoria is a safe destination for international students?
$myradiobutton6
7. Do you believe it is wise to open up Victoria’s education system to international students without considering the qualitative aspects?
$myradiobutton7
8. Do you think the government is doing enough to support international students in Victoria?
$myradiobutton8
";
$sent = mail($to_email, $subject, $message) ;
if($sent)
{print "Your mail was sent successfully."; }
else
{print "We encountered an error sending your mail"; }
?>
The Current Result:
This is what gets sent to my email. I want the answers to be below each question...
1. Do you welcome international students in Melbourne:
No
Yes
Yes
No
Yes
Yes
Yes
Yes
2. Do you think international students deserve better consideration in terms of eligibility for concession on public transport?
3. Do you believe enough safety measures are provided to international students on public transport?
MY PHP CODE:
<?php
function is_valid_email($from_email)
{
return preg_match('#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s\'"<>]+\.+[a-z]{2,6}))$#si', $from_email);
}
$to_email = "blabla@hotmail.com";
$subject = "Questionnaire";
$myradiobutton1.=$_POST['myradiobutton1']."\n" ;
$myradiobutton1.=$_POST['myradiobutton2']."\n" ;
$myradiobutton1.=$_POST['myradiobutton3']."\n" ;
$myradiobutton1.=$_POST['myradiobutton4']."\n" ;
$myradiobutton1.=$_POST['myradiobutton5']."\n" ;
$myradiobutton1.=$_POST['myradiobutton6']."\n" ;
$myradiobutton1.=$_POST['myradiobutton7']."\n" ;
$myradiobutton1.=$_POST['myradiobutton8']."\n" ;
$message = "
1. Do you welcome international students in Melbourne:
$myradiobutton1
2. Do you think international students deserve better consideration in terms of eligibility for concession on public transport?
$myradiobutton2
3. Do you believe enough safety measures are provided to international students on public transport?
$myradiobutton3
4. Do you think international students should be treated the same way as local students?
$myradiobutton4
5. Are you aware that the cost of travelling on public transport for international students is very high?
$myradiobutton5
6. Do you think Victoria is a safe destination for international students?
$myradiobutton6
7. Do you believe it is wise to open up Victoria’s education system to international students without considering the qualitative aspects?
$myradiobutton7
8. Do you think the government is doing enough to support international students in Victoria?
$myradiobutton8
";
$sent = mail($to_email, $subject, $message) ;
if($sent)
{print "Your mail was sent successfully."; }
else
{print "We encountered an error sending your mail"; }
?>
The Current Result:
This is what gets sent to my email. I want the answers to be below each question...
1. Do you welcome international students in Melbourne:
No
Yes
Yes
No
Yes
Yes
Yes
Yes
2. Do you think international students deserve better consideration in terms of eligibility for concession on public transport?
3. Do you believe enough safety measures are provided to international students on public transport?