Jump to content

1st time done PHP and just a little stuck hahah


new2php09

Recommended Posts

Hi, Hope someone can point me in the right direction. I have just made a PHP form in flash. Called each of my boxes

1, Your_Name

2, Your_Phone

3, Your_email

4, Your_Message.

 

I have then made this PHP code:

================================================================

<?php

 

 

$your_name = $_GET['Name']

$your_phone = $_GET['Phone']

$your_email = $_GET['email']

$your_message = $_GET['Message']

 

 

$recipient_email = "[email protected]";

 

$subject = "from " . $your_email;

$headers = "From: " . $your_name . " <" . $your_email . ">\n";

$headrers .= 'Content-type: text/html; charset=iso-8859-1';

 

$content - "<html><head><title>Contact letter</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($recopient_email,$subject,$content,$headers);

?>

<html>

<style type="text/css">

<!--

.style1 {

color: #FFFFFF;

margin-top: 60px;

font-size: 18px;

font-family: Tahoma;

font-weight: bold;

}

.style2 {

color: #FFFFFF;

font-size: 18px;

font-family: "Comic Sans MS";

}

.style3 {

font-family: "Comic Sans MS";

font-size: 18px;

}

-->

</style>

<body bgcolor="#282E2C">

<div align="center" class="style1">

  Your message has been sent. Thank you.</div>

<p> </p>

<div align="center"><a href="http://www.oopwee.com" class="style3">Back to oopwee</a> </div>

<p align="center" class="style2"><a href="http://www.google.com">Google</a></p>

</body>

</html>

<script>resizeTo(300, 300)</script>

 

==================================================================

 

 

 

But I keep getting code error:

 

 

Parse error: syntax error, unexpected T_VARIABLE in /home/content/o/o/p/oopwee/html/contact.php on line 5

 

 

If anyone could help that would be great.. thanks

   $your_name = $_GET['Name'];
   $your_phone = $_GET['Phone'];
   $your_email = $_GET['email'];
   $your_message = $_GET['Message'];

 

You were missing semi-colons after those statements.

 

Also check the mail as you have "$recopient_emai" which should probably be "$recipient_email".

 

EDIT:

For further inquiries please use the


tags around posted code. Thanks!

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.