# Form to mysql database

**URL:** <https://forum.kirupa.com/t/form-to-mysql-database/72559>\
**Category:** Uncategorized\
**Created:** [December 7, 2004, 2:54am UTC](https://forum.kirupa.com/t/form-to-mysql-database/72559 "2004-12-07T02:54:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![olm75](https://avatars.discourse-cdn.com/v4/letter/o/8c91f0/32.png) [@olm75](https://forum.kirupa.com/u/olm75)\
**Post date:** [December 7, 2004, 2:54am UTC](https://forum.kirupa.com/t/form-to-mysql-database/72559/1 "2004-12-07T02:54:48Z")

</div>

-------ok this is my script…and my actionscript--------

\<?php  
$venuename = $\_POST[‘venuename’];  
$email = $\_POST[‘email’];  
$website = $\_POST[‘website’];  
$phonenumber = $\_POST[‘phonenumber’];  
$areacode = $\_POST[‘areacode’];  
$address = $\_POST[‘address’];  
$city = $\_POST[‘city’];  
$state = $\_POST[‘state’];  
$zipcode = $\_POST[‘zipcode’];  
$contact = $\_POST[‘contact’];  
$inputclubtype = $\_POST[‘clubtype’];  
$inputmusictype = $\_POST[‘musictype’];  
$inputcrowd = $\_POST[‘crowd’];  
$inputdresscode = $\_POST[‘dresscode’];  
$comments = $\_POST[‘comments’];

$conn = mysql\_connect(“localhost”, “nigolmvc\_nigolmv”, “\*\*\*\*\*\*”);  
mysql\_select\_db (“nigolmvc\_nightspotz”, $conn);  
$result = mysql\_query(“INSERT into venues ( venuename, email, website, phonenumber, areacode, address, city, state, zipcode, contact, clubtype, musictype, crowd, dresscode, comment) VALUES(’$venuename’, ‘$email’, ‘$website’, ‘$phonenumber’, ‘$areacode’, ‘$address’, ‘$city’, ‘$state’, ‘$zipCode’, ‘$contact’, ‘$inputclubtype’, ‘$inputmusictype’, ‘$inputcrowd’, ‘$inputdresscode’, ‘$comment’)”);

if(!mysql\_query($query,$conn))  
{  
echo mysql\_error();  
exit;  
}

?\>

----the actionscript is attached to frame not the button-----

submitBtn.onPress = function(){  
if(venuename.text!="" && address.text!="" && email.text!="" && city.text!="" && website.text!="" && zipcode.text!="" contact.text!="" areacode.text!="" phonenumber.text!="" comments.text!=""){  
myData = new LoadVars();  
myData.venuename = venuename.text;  
myData.address = address.text;  
myData.email = email.text;  
myData.city = city.text;  
myData.website = website.text;  
myData.zipcode = zipcode.text;  
myData.contact = contact.text;  
myData.areacode = areacode.text;  
myData.phonenumber = phonenumber.text;  
myData.comments = comments.text;  
myData.sendAndLoad(“advertise.php”, myData, “POST”);  
gotoAndPlay(113);  
venuename = “”;  
address = “”;  
email = “”;  
city = “”;  
website = “”;  
zipcode = “”;  
contact = “”;  
areacode = “”;  
phonenumber = “”;  
comments = “”;  
Emailstatus = “”;  
}else{  
statusBox.text = “Fill out all required fields!”;  
}  
}

----this is the error im getting from from actiocscript------  
**Error** Scene=Scene 1, layer=form, frame=116:Line 15: ‘)’ expected  
if(venuename.text!="" && address.text!="" && email.text!="" && city.text!="" && website.text!="" && zipcode.text!="" contact.text!="" areacode.text!="" phonenumber.text!="" comments.text!=""){

**Error** Scene=Scene 1, layer=form, frame=116:Line 40: Unexpected ‘}’ encountered  
}else{

Total ActionScript Errors: 2 Reported Errors: 2

DONT KNOW WHAT THIS MEANS…
