# Help with submitting form to PHP and MySQL

**URL:** <https://forum.kirupa.com/t/help-with-submitting-form-to-php-and-mysql/222760>\
**Category:** flash\
**Created:** [April 16, 2007, 7:09pm UTC](https://forum.kirupa.com/t/help-with-submitting-form-to-php-and-mysql/222760 "2007-04-16T19:09:36Z")\
**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 16, 2007, 7:09pm UTC](https://forum.kirupa.com/t/help-with-submitting-form-to-php-and-mysql/222760/1 "2007-04-16T19:09:36Z")

</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?
