# Help Submitting Form from Flash using PHP and MySQL

**URL:** https://forum.kirupa.com/t/help-submitting-form-from-flash-using-php-and-mysql/222918
**Category:** programming
**Created:** [April 17, 2007, 11:17pm UTC](https://forum.kirupa.com/t/help-submitting-form-from-flash-using-php-and-mysql/222918 "2007-04-17T23:17:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jpunisher\_7](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@jpunisher\_7](https://forum.kirupa.com/u/jpunisher_7)
#### Post date: [April 17, 2007, 11:17pm UTC](https://forum.kirupa.com/t/help-submitting-form-from-flash-using-php-and-mysql/222918/1 "2007-04-17T23:17:02Z")

</div>

I created a form in Flash 8 to submit to MySQL using PHP. I used this tutorial [http://www.kirupa.com/developer/actionscript/flash\_php\_email.htm](http://www.kirupa.com/developer/actionscript/flash_php_email.htm) and followed it exactly. The only thing I changed was that I added more fields, the artwork and the PHP to submit the values to the database. This is my PHP code:

```php
<?php     
$Fname=$_POST["FirstNamef"];
$Lname=$_POST["LastNamef"];
$Comp = $_POST["Companyf"];
$Title = $_POST["Titlef"];
$Mail = $_POST["Emailf"];
$Categ = $_POST["Categoryf"];
$Comm = $_POST["Comment"];
$con = mysql_connect("localhost","user","pass");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
 
mysql_select_db("ceic_db", $con);
$sql="INSERT INTO feedback (FirstName, LastName, Company, Title, Email, Category, Comment)
VALUES
('$Fname','$Lname','$Comp','$Title','Mail','$Categ','$Comm')";
 if(!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }
 
mysql_close($con)
 
?> 

```

The problem is that I click the submit button and nothing happens. It doesn’t even move to the next frame. I don’t know if the problem is with the PHP or the Flash. I did the Flash exactly how it was on the tutorial. Can anyone help me out with this? I have included all the files here including the .php and .fla : [http://www.sharebigfile.com/file/144998/FlashFiles-zip.html](http://www.sharebigfile.com/file/144998/FlashFiles-zip.html)  
I would appreciate it if anyone could help me with this. Thanks.
