<?php //version 1.43

	include("inc.top.php");
	//Building Query for Settings Update
	$q2=new CDB;
	$k=1;
	$query="select name from settings where box_type!='hidden'";
	$q->query($query);
	while ($q->next_record())
	{
		$updatequery="update settings set value='".addslashes($_POST[$q->f("name")])."' where name='".$q->f("name")."'";
		$q2->query($updatequery);
			
	}
	$q->query("UPDATE members SET aff_url='$aff_link'");
	header("location:member.area.settings.php");
	include("inc.bottom.php");
?>