Skip to content

Instantly share code, notes, and snippets.

@jlamim
Created April 15, 2016 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlamim/549cd046ed66a90933f06618e3236429 to your computer and use it in GitHub Desktop.
Save jlamim/549cd046ed66a90933f06618e3236429 to your computer and use it in GitHub Desktop.
View Editar - Criando um CRUD com CodeIgniter
<div>
<h1>Criando um CRUD com CodeIgniter</h1>
</div>
<?php if ($this->session->flashdata('error') == TRUE): ?>
<p><?php echo $this->session->flashdata('error'); ?></p>
<?php endif; ?>
<?php if ($this->session->flashdata('success') == TRUE): ?>
<p><?php echo $this->session->flashdata('success'); ?></p>
<?php endif; ?>
<form method="post" action="<?=base_url('atualizar')?>" enctype="multipart/form-data">
<div>
<label>Nome:</label>
<input type="text" name="nome" value="<?=$contato['nome']?>" required/>
</div>
<div>
<label>Email:</label>
<input type="email" name="email" value="<?=$contato['email']?>" required/>
</div>
<div>
<label><em>Todos os campos são obrigatórios.</em></label>
<input type="hidden" name="id" value="<?=$contato['id']?>"/>
<input type="submit" value="Salvar" />
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment