# VArable errors in php

**URL:** <https://forum.kirupa.com/t/varable-errors-in-php/149410>\
**Category:** programming\
**Created:** [May 28, 2005, 9:36pm UTC](https://forum.kirupa.com/t/varable-errors-in-php/149410 "2005-05-28T21:36:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amish](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Amish](https://forum.kirupa.com/u/Amish)\
**Post date:** [May 28, 2005, 9:36pm UTC](https://forum.kirupa.com/t/varable-errors-in-php/149410/1 "2005-05-28T21:36:43Z")

</div>

ok so i have this php script

```php
<?php 
$whoto = " *************" 
 
$tvname = trim($_POST["tvname"]); //text
$age = trim($_POST["age"]); //text
$rec = $_POST["rec"]; //dropdown
$msg = trim($_POST["msg"]); //text
$name = trim($_POST["name"]); //text
$email = trim($_POST["email"]); //text
 
if (!isset($tvname) || !isset($age) || !isset($rec) || !isset($msg) || !isset($name) || !isset($email)) {
echo "<strong>Please go back and fill in all the fields</strong>"; 
exit(); 
} 
 
$subject = "New user: $tvname"; 
$message = 'Tribes Vengeance Name: $tvname
Age: $age
Recruited By: $rec
They have: $msg
Real Name: $name
Email: $email'; 
$headers = 'From: webmaster@' . $_SERVER['SERVER_NAME'] . "
" . 
   'Reply-To: webmaster@' . $_SERVER['SERVER_NAME'] . "
" . 
   'X-Mailer: PHP/' . phpversion(); 
 
mail($whoto, $subject, $message, $headers); 
 
echo "Email Sent<BR>A reply will be sent to you to the email specified"; 
 
?>

```

I got a tvarable error on line 4 why is that??
