Commit 069f18bb authored by Vytor Calixto's avatar Vytor Calixto 👾

Códigos php deletados deste branch

parent beac5a0f
<?php
require('DbCOnnection.php');
if(empty($_POST['id'])){
salvarUsuario(formToArray());
}
else
{
}
function salvarUsuario($user)
{
$values = implode(',',$user);
$sql = "INSERT INTO tbUser (nome,email,senha) values ({$values}) ";
$result = mysql_query($sql);
if(!$result)
{
echo 'ERRO ao se cadastrar';
exit;
}
}
function atulizarUsuario()
{
}
function formToArray()
{
$user = array();
$user['nome'] = isset($_POST['nome']) ? $_POST['nome'] : "";
$user['email'] = isset($_POST['email']) ? $_POST['nome'] : "";
$user['senha'] = isset($_POST['senha']) ? $_POST['senha'] : "";
return $user;
}
function ehSenhaIgual()
{
return $_POST['senha'] == $_POST['confirmarSenha'];
}
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment