I am writing a mysql query with a form in php; all the 'include' files and connections are working (I have checked and confirmed this) and I have a connection with phpMyAdmin . When I pass the .php file to localhost I get the following response for each variable:
Notice: Undefined index: name in C:\xampp\htdocs\
The code I am using is :
$name=$_POST['name'];
$user=$_POST['email'];
$maintel=$_POST['maintel'];
$mobtel=$_POST['name'];
$organisation=$_POST['organisation'];
$group_leader=$_POST['group_leader'];
$supervisor=$_POST['supervisor'];
$volunteer=$_POST['volunteer'];
$assessor=$_POST['assessor'];
$query = "INSERT INTO names (name, user, maintel, mobtel, organisation, group_leader, supervisor, volunteer, assessor)
VALUES('$name','$user', '$maintel', '$mobtel', '$organisation', '$group_leader', '$supervisor', '$volunteer', '$assessor' )";
$result = mysql_query($query) or die(mysql_error());
return $result;
mysql_close();
echo <<<_END
<form method='post' action='member.php'>
Name <input type='text' maxlength='255' name='name' value='First & Last Name' /><br />
E-mail address <input type='text' maxlength='255' name='user'
onBlur='checkUser(this)'/><span id='info'></span><br />
Main Telephone No <input type='text' maxlength='20' name='maintel' value='Tel No' /><br />
Mobile No <input type='text' maxlength='20' name='mobtel' value='Mob No'<br />
Organisation <input type='text' maxlength='255' name='organisation' value='Organisation' /><br />
Group Leader (year)<input type='text' maxlength='255' name='group_leader' value='Year' /><br />
Supervisor <input type='text' maxlength='30' name='supervisor' value='Year' /><br />
Volunteer (Y/N) <input type='text' maxlength='1' name='volunnteer' value='Y/N' /></ br>
Assessor (Y/N) <input type='text' maxlength='1' name='assessor' value='Y/N' /><br />
<input type='submit' value='Submit' />
</form>
_END;
?>
I would be grateful for any help in this.
I am using XAMPP V 1.7.7; Control Panel 3; Windows 7, Service Pack 1
Regards,
'H'