asked on
<tr>
<td width="43"><label for="business_type">Salon</label></td>
<td width="30"><input type="checkbox" name="business_type[]" id="business_type" value="salon" /></td>
<td width="38"><label for="business_type">Mobile</label></td>
<td width="30"><input type="checkbox" name="business_type[]" id="business_type" value="mobile" /></td>
<td width="53"><label for="business_type">Student</label></td>
<td width="25"><input type="checkbox" name="business_type[]" id="business_type" value="student" /></td>
<td width="37"><label for="business_type">Other</label></td>
<td width="434"><input type="checkbox" name="business_type[]" id="business_type" value="other" /></td>
</tr>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?
$trainee_name=$_POST['trainee_name'];
$company_name=$_POST['company_name'];
$address=$_POST['address'];
$telephone=$_POST['telephone'];
$email_address=$_POST['email_address'];
$website=$_POST['website'];
$trainer_name=$_POST['trainer_name'];
$training_date=$_POST['training_date'];
$trainer_notes=$_POST['trainer_notes'];
$area_consultant=$_POST['area_consultant'];
mysql_connect("localhost", "web46-training", "training") or die(mysql_error());
mysql_select_db("web46-training") or die(mysql_error());
mysql_query("INSERT INTO `data` VALUES ('$trainee_name', '$company_name', '$address', '$telephone', '$email_address', '$website', '$trainer_name', '$training_date', '$trainer_notes', '$area_consultant')");
Print "Your information has been successfully added to the database.";
?>
</body>
</html>
foo'); truncate table data;
in the consultant field?
ASKER
PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.
TRUSTED BY