# Personal contact form: the php works in php4 but not php5

**URL:** <https://forum.kirupa.com/t/personal-contact-form-the-php-works-in-php4-but-not-php5/219331>\
**Category:** Uncategorized\
**Created:** [March 15, 2007, 6:42pm UTC](https://forum.kirupa.com/t/personal-contact-form-the-php-works-in-php4-but-not-php5/219331 "2007-03-15T18:42:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mightyj](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mightyj/32/3283_2.png) [@mightyj](https://forum.kirupa.com/u/mightyj)\
**Post date:** [March 15, 2007, 6:42pm UTC](https://forum.kirupa.com/t/personal-contact-form-the-php-works-in-php4-but-not-php5/219331/1 "2007-03-15T18:42:15Z")

</div>

I have an old contact form that used to work in a php4 environment ,but now that i have upgraded my servers it does not, can anyone let me know what may be causing the issue. Here is the code:

```auto

<?php

// headers for the email listed below

$headers .= "From: $name <$email>
"; // your email client will show the person's email address like normal
$headers .= "Content-Type: text/plain; charset=iso-8859-1
"; // sets the mime type
$recipient = "jordan@mighty55.com, chicatiff@gmail.com, chicatiff@aol.com"; // enter YOUR email address here
$subject = "**Message From The S.E. Website"; // this is the subject of the email

$msg = wordwrap( $msg, 1024 );

mail($recipient, $subject, stripslashes($msg), $headers); // the mail() function sends the message to you

//Once the data is entered, redirect the user to give them visual confirmation
   header("location:sent.html");
?>

```

The functionality works and even gets sent to the sent.html page but when I get the email there is no data.
