Hey lovely people from the USA(and from the netherlands),I got a problem 🙂.I make my self a wonderful script.I want to check it out.And the script do nothing.My script(it's a script for a mailing list):
<?
require("../config.php");
$server = mysql_connect($server_naam,$username,$wachtwoord);
mysql_select_db($database_naam, $server);
$qry=mysql_query("SELECT url,deleteurl FROM mailinglist WHERE username='$user '") or die (mysql_error());
$deleteurl=mysql_result($qry,0,"deleteurl");
$url=mysql_result($qry,0,"url");
if($delete=="delete")
{
$file = file("$user.dat");
$count=count($file);
echo$count;
$i=0;
while($i<$count)
{
if($file[$i]!=$emailadres)
{
$into.=$emailadres."\n";
}
$i++;
}
$file = fopen ("$user.dat", "w+");
fputs ($file, $into);
fclose($file);
}
elseif($delete=="voegtoe")
{
$file = fopen ("$user.dat", "a+");
fputs ($file, $emailadres."\n", 50);
fclose($file);
header("Location: $url");
}
else
{
echo"U moet een optie kiezen";
}
?>
It's in dutch.I hope it isn't a problem for you to check out where te error is.
tnx