# PHP Error

**URL:** https://forum.kirupa.com/t/php-error/295315
**Category:** Uncategorized
**Created:** [August 28, 2009, 1:56am UTC](https://forum.kirupa.com/t/php-error/295315 "2009-08-28T01:56:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![blimpman](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@blimpman](https://forum.kirupa.com/u/blimpman)
#### Post date: [August 28, 2009, 1:56am UTC](https://forum.kirupa.com/t/php-error/295315/1 "2009-08-28T01:56:01Z")

</div>

I get an error when I try testing the FormMail from [tectite.com](http://tectite.com).

The instructions say:

1. Edit this file and set TARGET\_EMAIL for your requirements (near

- 

```
 line 246 in this file - replace "yourhost\.com" with your mail server's

```

- 

```
 name). We also strongly recommend you set DEF_ALERT (the next

```

- 

```
 configuration below TARGET_EMAIL).

```

1. Install this file as formmail.php (or other name ending in .php)

- 

```
on your web server.

```

- 

```
Test alerts by using your browser to open a URL to the script:

```

- 

```
     http://www.yourhost.com/formmail.php?testalert=1

```

- 

```
Alerts are the only way FormMail can tell you the details of

```

- 

```
errors or faults.

```

1. Create an HTML form and:

- 

```
 - specify a hidden field called "recipients" with the email address

```

- 

```
   of the person to receive the form's results.

```

- 

```
 - in the your form tag set the action attribute to

```

- 

```
   the formmail.php you uploaded to your web server

```

**Point 1:**  
What I’ve done is the following:

$TARGET\_EMAIL = array(EMAIL\_NAME."^myName@myDomainName.com.au$"");

```
        /* Help: http://www.tectite.com/fmdoc/def_alert.php */

```

define(“DEF\_ALERT”,“myName@myDomainName.com.au”);

**Point 2:**  
I uploaded the PHP file on my website server in a folder: /formtest/formmail.php

**Point 3:**

As suggested I added the hidden field in my form code:

\<form method=“post” action=“[http://myDomainName.com.au/formtest/formmail.php](http://myDomainName.com.au/formtest/formmail.php)” name=“SampleForm”\>  
\<input type=“hidden” name=“env\_report” value=“REMOTE\_HOST,REMOTE\_ADDR,HTTP\_USER\_AGENT,AUTH\_TYPE,REMOTE\_USER” /\>  
\<!-- STEP 2: Put your email address in the ‘recipients’ value. Note that you also have to allow this email address in the $TARGET\_EMAIL setting within formmail.php! --\>  
\<input type=“hidden” name=“recipients” value=“myName@myDomainName.com.au” /\>  
\<!-- STEP 3: Specify required fields in the ‘required’ value --\>  
\<input type=“hidden” name=“required” value=“email: [myName@myDomainName.com.au](mailto:myName@myDomainName.com.au),realname:myName” /\>  
\<!-- STEP 4: Put your subject line in the ‘subject’ value. --\>  
\<input type=“hidden” name=“subject” value=“Sample FormMail Testing” /\>

However after uploading the html and php and and try testing it, i get the following error?

Parse error: syntax error, unexpected T\_CONSTANT\_ENCAPSED\_STRING, expecting ‘)’ in /home/myDomain/public\_html/formtest/formmail.php on line 253
