Jump to content

form mail


linden940

Recommended Posts

ok i keep on trying to test this but its not working..i tryed alot of things..i am new to php and trying to learn how to use php...can someone plez tell me what i did wrong?

 

The form html side

 

<form method="post" enctype="multipart/form-data" action="untitled.php">

<input type="hidden" name="require" value="email,phone_no">

<input type="hidden" name="require" value="nameone">

<input type="hidden" name="recipient" value="[redacted]">

<input type="hidden" name="sort" value="alphabetic">

<input type="hidden" name="ar_file" value="/www/formmail_path/autoresponder.txt">

<input type="hidden" name="ar_subject" value="Thank you for your interest!">

<input type="hidden" name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT">

<table>

<tr>

  <td>Your Name:</td><td><input type=text name="nameone"></td>

</tr>

<tr>

  <td>Your Phone:</td><td><input type=text name="phone_no"></td>

</tr>

<tr>

  <td>Your E-mail:</td><td><input type="text" name="email"></td>

</tr>

<tr>

  <td>Code:</td><td><input type="text" name="code"></td>

</tr>

<tr>

  <td>What you think about me:</td><td><textarea name="text1" cols="40" rows="3"></textarea></td>

</tr>

<tr>

  <td colspan="2"><input type="submit"></td>

</tr>

</table>

 

the php side

 

<?

  $nameone = $_REQUEST['nameone'];

  $phone_no = $_REQUEST['phone_no'];

  $email = $_REQUEST['email'];

  $code = $_REQUEST['code'];

  $text1 = $_REQUEST['text1'];

 

$send_email = "Name {$nameone} <br> Phone number {$phone_no} <br> email {$email} <br> code {$code} <br> text1 {$text1};

mail( '[redacted]', 'Feedback Form Results"', $send_email);

 

?>

Link to comment
https://forums.phpfreaks.com/topic/147063-form-mail/
Share on other sites

i found it out..i was playing with it and i see i made a noobie misstake

 

 <?
  $nameone = $_REQUEST['nameone'];
  $phone_no = $_REQUEST['phone_no'];
  $email = $_REQUEST['email'];
  $code = $_REQUEST['code'];
  $text1 = $_REQUEST['text1'];

$send_email = "Name {$nameone} <br> Phone number {$phone_no} <br> email {$email} <br> code {$code} <br> text1 {$text1};
mail( '[redacted]', 'Feedback Form Results"', $send_email);

?>
 

 

the part i 4got was here

 

$send_email = "Name {$nameone} <br> Phone number {$phone_no} <br> email {$email} <br> code {$code} <br> text1 {$text1};
 

i did not put the " at the end of  {test1}

Link to comment
https://forums.phpfreaks.com/topic/147063-form-mail/#findComment-772350
Share on other sites

Quote

i found it out..i was playing with it and i see i made a noobie misstake

 


 <?
  $nameone = $_REQUEST['nameone'];
  $phone_no = $_REQUEST['phone_no'];
  $email = $_REQUEST['email'];
  $code = $_REQUEST['code'];
  $text1 = $_REQUEST['text1'];

$send_email = "Name {$nameone} <br> Phone number {$phone_no} <br> email {$email} <br> code {$code} <br> text1 {$text1};
mail( '[redacted]', 'Feedback Form Results"', $send_email);

?>
 

 

 

 

When accepting incoming variables from web users you have to be as secure as possible. The first place you start is at the point of entry. If you're using a post method for incoming variables make sure you are accepting those variables using the $_POST[''] superglobal $_REQUEST can allow possible hack attempts. I could get more detailed with this but it's late.

Link to comment
https://forums.phpfreaks.com/topic/147063-form-mail/#findComment-772365
Share on other sites

Quote
Quote

i found it out..i was playing with it and i see i made a noobie misstake

 



 <?
  $nameone = $_REQUEST['nameone'];
  $phone_no = $_REQUEST['phone_no'];
  $email = $_REQUEST['email'];
  $code = $_REQUEST['code'];
  $text1 = $_REQUEST['text1'];

$send_email = "Name {$nameone} <br> Phone number {$phone_no} <br> email {$email} <br> code {$code} <br> text1 {$text1};
mail( '[redacted]', 'Feedback Form Results"', $send_email);

?>
 

 

 

 

When accepting incoming variables from web users you have to be as secure as possible. The first place you start is at the point of entry. If you're using a post method for incoming variables make sure you are accepting those variables using the $_POST[''] superglobal $_REQUEST can allow possible hack attempts. I could get more detailed with this but it's late.

 

Yea thanks for that bit of info..i change the request to $_POST i was using $_REQUEST for learning as i was using both post and get ...i am trying to learn php

Link to comment
https://forums.phpfreaks.com/topic/147063-form-mail/#findComment-772813
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.