6
I’m making a login system in which each user creates a URL
that sends to the bank, only that I need to make it does not repeat information, if there is already similar information in the bank it returns result (URL indisponível)
.
INPUT CODE:
MEUSITE.COM/<input class="subbutton" name="url" type="text" value="<? echo("$prof[url]");?>" size="40">
PHP:
<? }
elseif($update==update)
{
$nomedoevento = clean($_POST[nomedoevento]);
$descricaodoevento = clean($_POST[descricaodoevento]);
$datadoevento = clean($_POST[datadoevento]);
$horadoevento = clean($_POST[horadoevento]);
$localdoevento = clean($_POST[localdoevento]);
$enderecodoevento = clean($_POST[enderecodoevento]);
$bairrodoevento = clean($_POST[bairrodoevento]);
$cidadedoevento = clean($_POST[cidadedoevento]);
$estadodoevento = clean($_POST[estadodoevento]);
$habilitarevento = clean($_POST[habilitarevento]);
$url = clean($_POST[url]);
$updatenomedoevento = mysql_query("update usr_users set nomedoevento = '$nomedoevento', descricaodoevento = '$descricaodoevento', datadoevento = '$datadoevento', horadoevento = '$horadoevento', localdoevento = '$localdoevento', enderecodoevento = '$enderecodoevento', bairrodoevento = '$bairrodoevento', cidadedoevento = '$cidadedoevento', estadodoevento = '$estadodoevento', habilitarevento = '$habilitarevento', url = '$url' where email = '$_SESSION[usr_email]'");
echo("Suas informações foram atualizadas!");
} ?>
You know
UNIQUE
,PRIMARY KEY
?– Maniero
I have never used ;
– Paulo Pimentel
If I understand what you want, this is the solution, take a look at the subject. This is a very basic database subject. Will you be able to do more complex things? You know well what this function
clean()
does? It probably doesn’t clean up enough what it needs and this site will be highly vulnerable to attacks.– Maniero
All right, I’ll take a look.
– Paulo Pimentel