# PHP+Flash Form troubleshot

**URL:** <https://forum.kirupa.com/t/php-flash-form-troubleshot/160051>\
**Category:** programming\
**Created:** [August 23, 2005, 1:32am UTC](https://forum.kirupa.com/t/php-flash-form-troubleshot/160051 "2005-08-23T01:32:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AusFlasher](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@AusFlasher](https://forum.kirupa.com/u/AusFlasher)\
**Post date:** [August 23, 2005, 1:32am UTC](https://forum.kirupa.com/t/php-flash-form-troubleshot/160051/1 "2005-08-23T01:32:50Z")

</div>

Hi guys,

I have made a flash form to be processed with PHP. Only problem is my script is not working. Could you help me troubleshot it please?

```php

<?php
###############################################################################
#
# E-mail Formular + Autoresponder by Paul Dickson
# Copyright 2005
#
###############################################################################
#
#
# Mail an Webmaster ##########################################################
#
# Add your E-mail right here
#
$MailTo="pauld@designstudious.com.au";
#
# Formating Date ############################################################
#
$nowDay=date("m.d.Y");
$nowClock=date("H:i:s");
#
# Formating Body content ######################################################
# 
$FormContent="
The following details has been recieved on $nowDay at $nowClock:

----------------------------------------------------------------------------

CONTACT DETAILS:
----------------------------------------------------------------------------

First Name: $firstname

----------------------------------------------------------------------------

Last Name: $lastname

----------------------------------------------------------------------------

Phone: $phone

----------------------------------------------------------------------------

City: $city

----------------------------------------------------------------------------

Country: $country

----------------------------------------------------------------------------

Company: $company

----------------------------------------------------------------------------

Website: $website

----------------------------------------------------------------------------

PROJECT DETAILS: 
----------------------------------------------------------------------------

Project Description: $description

----------------------------------------------------------------------------

Budget: $budget

----------------------------------------------------------------------------

Example of URL1: $url1

----------------------------------------------------------------------------

Example of URL2: $website

----------------------------------------------------------------------------

SERVICES REQUIRED:
----------------------------------------------------------------------------

Web Design: $webdesign

----------------------------------------------------------------------------

HTML: $html

----------------------------------------------------------------------------

Ecommerce: $ecommerce

----------------------------------------------------------------------------

Backend: $backend

----------------------------------------------------------------------------

Banner: $banner

----------------------------------------------------------------------------

Brochure: $brochure

----------------------------------------------------------------------------

Logo: $logo

----------------------------------------------------------------------------

Photography: $brochure

----------------------------------------------------------------------------

";
#
#
mail($MailTo, "$Subject (sender $name)", $FormContent, "From: $email");
#
#
# Autoresponder #############################################################
#
#
	   $filename = "answer.txt";
	   $fd = fopen( $filename, "r" );
	   $contents = fread( $fd, filesize( $filename ) );
	   fclose( $fd );
	   mail( "$email", "Thank you", "$contents

",
			 "From:pauld@designstudious.com.au
" );
#
#
# Flashsignal Variable ######################################################
#
#
$signal=1;
echo "signal=$signal";
#
#
###############################################################################
?>

```

[AS]  
on (release) {  
if (signal != 2 && email.indexOf("@") != -1 && email.indexOf(".") != -1 && firstname != “” && lastname != “” && description != “”) {  
signal = 2;  
gotoAndPlay(“submit”);  
loadVariablesNum(“quote.php”, 0, “POST”);  
mc.\_visible = true;  
errormc.\_visible = false;  
}  
if (description == “”) {  
errormc.result = “ERROR Project Description Missing”;  
}  
if (email == “”) {  
errormc.result = “ERROR Email Missing”;  
}  
if (email.indexOf("@") == -1 || email.indexOf(".") == -1) {  
errormc.result = “ERROR Wrong E-mail”;  
}  
if (lastname == “”) {  
errormc.result = “ERROR Last Name Missing”;  
}  
if (firstname == “”) {  
errormc.result = “ERROR First Name Missing”;  
}  
}  
[/AS]

I’m using Flash MX 2004 Professional
