php script problem


iam trying to code a script which will register users. note that this has sql injection loopholes and is meant for learning problem is that on line 18 the custom function does not print out the name of the field($ftitle) which is left empty and only shows “Not Selected”. what exactly am i doing wrong.any help would be much appreciated.[php]$name=$_POST[‘name’];
$querymail=“SELECT * FROM userinfo WHERE email=’$email’”;
function fieldset($field,$ftitle){
if (!isset($field)||empty($field));
die("$ftitle Not selected");
function adduser($querymail, $name, $email, $pass, $salt1, $salt2){

  if (mysql_num_rows(mysql_query($querymail)) == 1){
  die("email id already exists");
  $pass = md5($salt1 . $pass . $salt2);
  $query= "INSERT INTO userinfo (username,email,password,id) VALUES ('$name','$email','$pass','$id')";
		if ($query_run=mysql_query($query)){
			echo "Name is $name, email is $email and password is $pass ";
		echo mysql_error();

adduser($querymail, $name, $email, $pass, $salt1, $salt2);


The IF statement in fieldset has a ; instead of a { and the function doesn’t do much of anything other than kill the script. You really don’t need a function to do that tiny amout of validating.