Abaixo o código que estou utilizando
[php]//arquivo principal
Nome Telefone E-mail Bairro Cidade Foto
<?phpecho$rows_clientes['nome']; ?> <?phpecho$rows_clientes['telefone']; ?> <?phpecho$rows_clientes['email']; ?> <?phpecho$rows_clientes['bairro']; ?> <?phpecho$rows_clientes['cidade']; ?> <?phpecho''; ?>
">Visualizar
"data-whatever="<?phpecho$rows_clientes['id']; ?>"data-whatevernome="<?phpecho$rows_clientes['nome']; ?>"data-whateverdetalhes="<?phpecho$rows_clientes['detalhes']; ?>">Editar
Nome Completo: <?phpecho$rows_clientes['nome']; ?>
CPF: <?phpecho$rows_clientes['cpf']; ?>
Telefone: <?phpecho$rows_clientes['telefone']; ?>
Bairro: <?phpecho$rows_clientes['bairro']; ?>
Número: <?phpecho$rows_clientes['numero']; ?>
Cidade: <?phpecho$rows_clientes['cidade']; ?>
Instagram: "target="_blank"><?phpecho$rows_clientes['instagram']; ?>
Facebook: <?phpecho$rows_clientes['facebook']; ?>
<?phpecho''; ?>
"tabindex="-1"role="dialog"aria-labelledby="exampleModalLabel"aria-hidden="true">
Editar Informações
×
">
Nome do Cliente
">
Telefone
">
">
CPF
"class="form-control input-md"required=""type="text"maxlength="11"pattern="[0-9]+$">
Nascimento*
"class="form-control input-md"required=""type="date"maxlength="10"OnKeyPress="formatar('##/##/####', this)"onBlur="showhide()">
Este cliente é:
Endereço
Rua:
Número:
">
Bairro:
">
Cidade:
Estado:
Redes Sociais
Site:
">
Instagram:
">
Facebook:
">
<?php } ?>
//Arquivo externo que processa query de edição
<?php
include_once('conexao.php');
//Editar informações listadas
$id=$_POST['id'];
$nome_edit=$_POST['nome_edit'];
$telefone_edit=$_POST['telefone_edit'];
$email_edit=$_POST['email_edit'];
$cpf_edit=$_POST['cpf_edit'];
$nascimento_edit=$_POST['nascimento_edit'];
$este_edit=$_POST['este_edit'];
$rua_edit=$_POST['rua_edit'];
$numero_edit=$_POST['numero_edit'];
$bairro_edit=$_POST['bairro_edit'];
$cidade_edit=$_POST['cidade_edit'];
$site1_edit=$_POST['site1_edit'];
$instagram_edit=$_POST['instagram_edit'];
$facebook_edit=$_POST['facebook_edit'];
$result_clientes_edit="UPDATE clientes SET nome = '$nome_edit', telefone = '$telefone_edit', email = '$email_edit', cpf = '$cpf_edit', nascimento = '$nascimento_edit', este = '$este_edit', rua = '$rua_edit', numero = '$numero_edit', bairro = '$bairro_edit', cidade = '$cidade_edit', site1 = '$site1_edit', instagram = '$instagram_edit', facebook = '$facebook_edit' WHERE id = '$id' ";
$resultado_clientes_edit=mysqli_query($conn, $result_clientes_edit);
if ($result_clientes_edit) {
header('Location: http://localhost/fina-rosa/clientes.php');
} else {
header('Location: http://localhost/fina-rosa/clientes.php');
}
?>[/php]