Php addslas function help needed

<?php
$lines = file('file.txt');
foreach($lines as $num => $line){
$fullname = "name";
$email=addslashes($line);
$password = base64_encode(password);
mysql_query("INSERT INTO table (fullname,email,password) VALUES('$fullname','$email','$password')") or die("Insert failed: " . mysql_error());
}
?>

please see the above code i want to add addslashes for $email but this is not doing in the way i mentioned above where i mistaken

don’t use addslashes() when you need the result for a query, use mysql_real_escape_string().

thanks but i am not verymuch expert please can you fix how mysql_real_escape_string() will go with my script thanks again

$email=mysql_real_escape_string($line); 

will be fine ?

yes, try that

nothing happened

How do you mean “nothing happened”? What was supposed to happen?