Hey guys can you guys check my php script please

  • doomcookie
  • Newbie
  • Newbie
  • doomcookie
  • Posts: 5

Post 3+ Months Ago

yea i gotten this far since my last post.. still a little bit confused. I did uploaded the php.. but when i come to send it. it have error.. i figure i must have made a mistake somewhere.. would you guys check my work please



PHP Code: [ Select ]
<?php
 
 
 
    $your_name = $_GET['t1_2'];
 
    $your_phone = $_GET['t3_2'];
 
    $your_email = $_GET['t2_2'];
 
    $your_message = $_GET['t4_2'];
 
   
 
      $recipient_email = "myemail":
 
   
 
   $subject = "from" . $your_email;
 
   $headers = "From: " . $your_name . " <" . $your_email . ">\n";
 
      $headers .= 'Content-type: text/html; charset=iso-8859-1';
 
   
 
    $content = "<html><head><title>Contact letter</title></head><body><br>";
 
    $content .= "Name: <b>" . $your_name . "</b><br>";
 
    $content .= "Phone: <b>" . $your_phone . "</b><br>";
 
    $content .= "E-mail: <b>" . $your_email . "</b><br><hr><br>";
 
    $content .= $your_message;
 
    $content .= "<br></body></html>";
 
 
 
    mail($recipient,$subject,$content,$headers);
 
?>
 
<html>
 
    <body bgcolor="#282E2C">
 
        <div align="center" style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">
 
            Your message was sent. Thank you.
 
        </div>
 
    </body>
 
</html>
 
<script>resizeTo(300, 300)</script>
  1. <?php
  2.  
  3.  
  4.  
  5.     $your_name = $_GET['t1_2'];
  6.  
  7.     $your_phone = $_GET['t3_2'];
  8.  
  9.     $your_email = $_GET['t2_2'];
  10.  
  11.     $your_message = $_GET['t4_2'];
  12.  
  13.    
  14.  
  15.       $recipient_email = "myemail":
  16.  
  17.    
  18.  
  19.    $subject = "from" . $your_email;
  20.  
  21.    $headers = "From: " . $your_name . " <" . $your_email . ">\n";
  22.  
  23.       $headers .= 'Content-type: text/html; charset=iso-8859-1';
  24.  
  25.    
  26.  
  27.     $content = "<html><head><title>Contact letter</title></head><body><br>";
  28.  
  29.     $content .= "Name: <b>" . $your_name . "</b><br>";
  30.  
  31.     $content .= "Phone: <b>" . $your_phone . "</b><br>";
  32.  
  33.     $content .= "E-mail: <b>" . $your_email . "</b><br><hr><br>";
  34.  
  35.     $content .= $your_message;
  36.  
  37.     $content .= "<br></body></html>";
  38.  
  39.  
  40.  
  41.     mail($recipient,$subject,$content,$headers);
  42.  
  43. ?>
  44.  
  45. <html>
  46.  
  47.     <body bgcolor="#282E2C">
  48.  
  49.         <div align="center" style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">
  50.  
  51.             Your message was sent. Thank you.
  52.  
  53.         </div>
  54.  
  55.     </body>
  56.  
  57. </html>
  58.  
  59. <script>resizeTo(300, 300)</script>


here the most updated one

PHP Code: [ Select ]
 
<?php
 
 
 
   $your_compnay = $_GET['company'];
 
   $your_name = $_GET['name'];
 
   $your_phone = $_GET['phone'];
 
   $your_email = $_GEt['email'];
 
   $your_message= $_GET['message'];
 
   
 
   $recipient_email = "myemail goes here";
 
   
 
   $subject = "from " . $your_email;
 
   $headers = "From: " . $your_name . " <" . $your_email . ">\n";
 
   $headers .= ' Content-type: text/html; charset=iso-8859-1';
 
   
 
   $content = "html><head><title>Contact Letter</title></head><body><br>";
 
   $content .= "Company: <b>" . $your_company . "</b><br>";
 
   $content .= "Name: <b>" . $your_name . "</b><br>";
 
   $content .= "Phone: <b>" . $your_phone . "</b><br>";
 
   $content .= "E-mail: <b>" . $your_email . "</b><br>";
 
   $content .= $your_message;
 
   $content .= "<br></body></html>";
 
   
 
   mail($recipient_email,$subject,$content,$headers);
 
?>
 
<html>
 
   <body  bgcolor="#282e2c">
 
      <div align="center" style="margin-top:60;color:#ffffff;font-size:12;font-family:tahoma;font-weight;bold">
 
         Your message was sent. Thank you.
 
      </div>
 
   </body>
 
</html>
 
<script>resizeTo(300,300)</script>
  1.  
  2. <?php
  3.  
  4.  
  5.  
  6.    $your_compnay = $_GET['company'];
  7.  
  8.    $your_name = $_GET['name'];
  9.  
  10.    $your_phone = $_GET['phone'];
  11.  
  12.    $your_email = $_GEt['email'];
  13.  
  14.    $your_message= $_GET['message'];
  15.  
  16.    
  17.  
  18.    $recipient_email = "myemail goes here";
  19.  
  20.    
  21.  
  22.    $subject = "from " . $your_email;
  23.  
  24.    $headers = "From: " . $your_name . " <" . $your_email . ">\n";
  25.  
  26.    $headers .= ' Content-type: text/html; charset=iso-8859-1';
  27.  
  28.    
  29.  
  30.    $content = "html><head><title>Contact Letter</title></head><body><br>";
  31.  
  32.    $content .= "Company: <b>" . $your_company . "</b><br>";
  33.  
  34.    $content .= "Name: <b>" . $your_name . "</b><br>";
  35.  
  36.    $content .= "Phone: <b>" . $your_phone . "</b><br>";
  37.  
  38.    $content .= "E-mail: <b>" . $your_email . "</b><br>";
  39.  
  40.    $content .= $your_message;
  41.  
  42.    $content .= "<br></body></html>";
  43.  
  44.    
  45.  
  46.    mail($recipient_email,$subject,$content,$headers);
  47.  
  48. ?>
  49.  
  50. <html>
  51.  
  52.    <body  bgcolor="#282e2c">
  53.  
  54.       <div align="center" style="margin-top:60;color:#ffffff;font-size:12;font-family:tahoma;font-weight;bold">
  55.  
  56.          Your message was sent. Thank you.
  57.  
  58.       </div>
  59.  
  60.    </body>
  61.  
  62. </html>
  63.  
  64. <script>resizeTo(300,300)</script>
:?:
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Nucleo
  • SausagePorkPie
  • Mastermind
  • User avatar
  • Posts: 2297
  • Loc: UK - England

Post 3+ Months Ago

So what is actually wrong then?

do you get an error of some kind?

first glance it looks ok to me. But you haven't given us much detail
  • doomcookie
  • Newbie
  • Newbie
  • doomcookie
  • Posts: 5

Post 3+ Months Ago

Nucleo wrote:
So what is actually wrong then?

do you get an error of some kind?

first glance it looks ok to me. But you haven't given us much detail


:-) well.. got the code to work but still confused.. you guys see where it say recipient_email? i put my email there but my log keep saying error and it wont sent... its weird and complicated.. can you guys help me out?
  • doomcookie
  • Newbie
  • Newbie
  • doomcookie
  • Posts: 5

Post 3+ Months Ago

oh and i use yahoo mail by the way
  • Prime
  • Professor
  • Professor
  • User avatar
  • Posts: 935
  • Loc: Liverpool

Post 3+ Months Ago

What's the error :?:
  • Prime
  • Professor
  • Professor
  • User avatar
  • Posts: 935
  • Loc: Liverpool

Post 3+ Months Ago

PS> you appear to have a full-colon at the end of this line ...

Quote:
$recipient_email = "myemail":
  • doomcookie
  • Newbie
  • Newbie
  • doomcookie
  • Posts: 5

Post 3+ Months Ago

this is what my log says


2008 Feb 08 20:42:29 Result: 9
2008 Feb 08 20:42:29 From address not in member domain. Message not sent.
  • ScienceOfSpock
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1893
  • Loc: Las Vegas

Post 3+ Months Ago

That's not really a problem with your script, it's your mail server refusing to relay mail from an email address that doesn't exist on your server.

remove this line and let the server use the default send email address:
Code: [ Select ]
   $headers = "From: " . $your_name . " <" . $your_email . ">\n";


Then try to run the script again.

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 94 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.