<?php

$confirma = filter_var($querys[1], FILTER_SANITIZE_URL);



$conftoken = mysql_query("SELECT id,token FROM clientes WHERE token = '$confirma'");

if(mysql_num_rows($conftoken)==1){

	$li = mysql_fetch_assoc($conftoken);
	$idcliconf = $li['id'];

	mysql_query("UPDATE clientes SET token='', confirmado='1' WHERE id='$idcliconf'");
	header('location:'.sti('urlbase')."finalizar/?conf=ok");


}else{

	header('location:'.sti('urlbase')."finalizar/?conf=nok");


}