I've tried for over ten days to get this form and php script to link to the database on the server. It won't! Can anyone help?
Here's the PHP: (the server address, user name and password all work) The form is an employment application. This code only covers the top portion, I figured I'd finish the restonce I got this part working.
<?php
$link = mysql_connect('innovativeretailassu.ipagemysql.com', '', '');
if (!$link) {
die('Could not connect: ' . mysql_error());
// Connect to the file above here
if(isset($_POST['lastname'])&&isset($_POST['firstname'])&&isset($_POST['mi'] )&&isset($_POST['address'])&&isset($_POST['city'])&&isset($_POST['state'])&&isset($_POST['zipcode'])&&isset($_POST['phone'])&&isset($_POST['email'])&&isset($_POST['ssnumber'])&&isset($_POST['dob'])&&isset($_POST['securityquestion'])){
if($_POST['lastname']!=""&&$_POST['firstname']!=""&&$_POST['mi']!=""&&$_POST['ad dress']!=""&&$_POST['city']!=""&&$_POST['state']!=""&&$_POST['zipcode']!=""&&$_POST['phone']!=""&&$_POST['email']!=""&&$_POST['ssnumber']!=""&&$_POST['dob']!=""&&$_POST['securityquestion']!=""){
$last_name=$_POST['lastname'];
$first_name=$_POST['firstname'];
$mi=$_POST['mi'];
$address=$_POST['address'];
$apartment=$_POST['apartment'];
$city=$_POST['city'];
$state=$_POST['state'];
$zip_code=$_POST['zipcode'];
$phone=$_POST['phone'];
$email=$_POST['email'];
$ss_number=$_POST['ssnumber'];
$dob=$_POST['dob'];
$security_question=$_POST['securityquestion'];
$sql_store="INSERT into employees(id,lastname,firstname,mi,address,apartment,city,state,zipcode,phone,email,ssnumber,dob,securityquestion) VALUES(NULL,'$lastname','$firstname','$mi','$address','$apartment','$city','$state','$zipcode','$phone','$email','$ssnumber','$dob','$securityquestion')";
$sql=mysql_query($employees,$sql_store)or die(mysql_error());
}else{
echo "The top of the form must be fillied out completely.";
}
?
Please, someone straighten me out on this problem. Thank You; Eric