Jump to content
Fórum Script Brasil
  • 0

Como manter conteúdo dentro dos campos

Jordano Cherobim


10 answers to this question

Recommended Posts

  • 0
$cliente = new Cliente();

    if($_POST['nomeCliente'] == ''){
        $msg = "Preencher todos os campos obrigatórios.";
            $dados = array('nomeCliente' => $_POST['nomeCliente']);
            $inserir = new Inserir();
            $inserir->InserirRegistro('cliente', $dados);
            $msg = "Inserido com Sucesso!";
        }catch (Exception $erro){
            $msg = "Erro: {$erro->getMessage()}";




<div id="cont">

    <div id="tituloCont">CLIENTE</div>
    <div id="conteudo1">
        <form name="cliente" method="post" action="">

            <span>Cliente *</span><br>
            <input type="text" name="nomeCliente" id="nomeCliente" value="<?php if (isset($cliente)) echo $cliente->getNome(); else echo @$_POST['nomeCliente']; ?>" size="60" onchange="validaCliente();" autofocus="" required="">

            <div id="btnEnviar" style=" text-align: center">
                <input style='margin-right: 20%' type='submit' name='btnSalvar' class='buttonVerde' value='Cadastrar'>


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...