Hey guys can you guys check my php script please

  • doomcookie
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Feb 07, 2008
  • Posts: 5
  • Status: Offline

Post February 8th, 2008, 1:04 am

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
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post February 8th, 2008, 1:04 am

  • Nucleo
  • SausagePorkPie
  • Mastermind
  • User avatar
  • Joined: Aug 16, 2003
  • Posts: 2297
  • Loc: UK - England
  • Status: Offline

Post February 8th, 2008, 5:19 am

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
Codebuddies - Website Development Resource
|INCLUDE(), INCLUDE_ONCE(), REQUIRE() IN PHP | - / - |MICROSOFT CRM 4.0 ONCLICK EVENT WITHIN FORM |
  • doomcookie
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Feb 07, 2008
  • Posts: 5
  • Status: Offline

Post February 8th, 2008, 1:13 pm

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
  • No Avatar
  • Joined: Feb 07, 2008
  • Posts: 5
  • Status: Offline

Post February 8th, 2008, 1:15 pm

oh and i use yahoo mail by the way
  • Prime
  • Professor
  • Professor
  • User avatar
  • Joined: Dec 05, 2005
  • Posts: 935
  • Loc: Liverpool
  • Status: Offline

Post February 8th, 2008, 1:31 pm

What's the error :?:
my seo experience
  • Prime
  • Professor
  • Professor
  • User avatar
  • Joined: Dec 05, 2005
  • Posts: 935
  • Loc: Liverpool
  • Status: Offline

Post February 8th, 2008, 1:33 pm

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

Quote:
$recipient_email = "myemail":
my seo experience
  • doomcookie
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Feb 07, 2008
  • Posts: 5
  • Status: Offline

Post February 8th, 2008, 1:43 pm

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
  • Joined: Jul 06, 2004
  • Posts: 1890
  • Loc: Las Vegas
  • Status: Offline

Post February 11th, 2008, 1:09 pm

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 144 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
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.