Пример #1
0
			</fieldset>
			<div style="clear:both;"></div>
			<hr/>
			<div class="fr"><button class="buttonSalvar" name="buttonSalvarMetodo">SALVAR</button></div>
		</form>
	</fieldset>
	<br/>
</div>

<a href="#novo_remetente"><div class="metodo" onclick="openclose_novo_remetente();">Novo remetente</div></a>
<div style="display:none;" id ="novo_remetente">
	<fieldset>
		<legend style="margin-bottom:10px;">Novo remetente</legend>
		<form action="pp/incluir_remetente.php" method="post">
			<?php 
    $id_remetente = id_remetente();
    ?>
			<input style="display:none;" type="text" name="id_remetente" value="<?php 
    echo $id_remetente;
    ?>
" required/>
			<table>
				<tr class="trUP">
					<th width="20%">ID REMETENTE</th>
					<th width="25%">De</th>
					<th width="30%">E-mail remetente</th>
					<th width="10%">Smtp login</th>
					<th width="5%">Senha</th>
					<th width="10%">Ação</th>
				</tr>
				<tr class="trDOWN">
Пример #2
0
function Inserir_remetente_padrao($var)
{
    global $conexao;
    $id = 1;
    $comandoSql = "SELECT login,senha,remetente FROM remetente WHERE id_remetente = ?";
    $stmt = $conexao->prepare($comandoSql) or trigger_error("triggererror " . $conexao->error);
    $stmt->bind_param('i', $id);
    $stmt->bind_result($login, $senha, $remetente);
    $stmt->execute();
    if ($stmt) {
        while ($stmt->fetch()) {
            //carrega variaveis
        }
    }
    $id_remetente = id_remetente();
    $stmt->close();
    $comandoSql = "INSERT INTO remetente (userid,login,senha,remetente,id_remetente)\n\tVALUES (?,?,?,?,?)";
    $stmt = $conexao->prepare($comandoSql) or trigger_error("triggererror " . $conexao->error);
    $stmt->bind_param('ssssi', $var, $login, $senha, $remetente, $id_remetente);
    $stmt->execute();
    $stmt->close();
}