Hi,
First up i think it would be a good idea for you to read some of the sql related articles on PHP builder (if you haven't already done so)
Anyway the right way to do it is to create a database for your users (say dbuser). Then you need to have a table in that database that contains the user details (say tbuser).
This table might contain username, password, email etc.
then you could modify your code like this:
/ begin /
$link = mysql_connect($host,$user,$pass);
mysql_select_db("dbuser", $link);
// Check for existing email address
$match = false;
$email = addslashes($email);
$result = mysql_query("select * from tbuser where email ='$email',$link);
if($result)
if(mysql_num_rows($result)
$match=true;
/ end /
Of course there are neater ways of doing it but this should get you started.