Jump to content
Fórum Script Brasil
  • 0

PROBLEMAS COM O mysql_fetch_assoc()


daniel paixão
 Share

Question

MEU CODIGO E O SEGUINTE EU QUERO EXIBIR OS ARQUIVOS PARA ATUALIZAR MAIS N TA DANDO

 

 

<?php

header('Content-Type: text/html; charset=utf-8');

include_once("../funcoes.php");

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
 <head>
<!-- Design by Design Profesionals  Released for free under a Creative Commons Attribution 2.5 License -->
<meta http-equiv="content-type" content="text/html; charset=utf-8" /><title> Bem vindo a sua Agenda de Contatos!
</title>

<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="../template/default2.css" rel="stylesheet" type="text/css" />
<script>
function formatar(mascara, documento){
  var i = documento.value.length;
  var saida = mascara.substring(0,1);
  var texto = mascara.substring(i)
  
  if (texto.substring(0,1) != saida){
            documento.value += texto.substring(0,1);
  }
  
}
</script>

<script language="javascript">
        function verificar()
        {
                
                if((document.form1.entrada.value != "") && (document.form1.precototal.value != ""))
                {
                        document.form1.restante.value = parseInt(document.form1.precototal.value) - parseInt(document.form1.entrada.value);                     
                }
                else
                {
                        document.form1.restante.value = "";
                        alert("Campos vazios.");
                }
        }
        
        function verificar2()
        {
                
                if((document.form1.quantidade.value != "") && (document.form1.precouni.value != ""))
                {
                        document.form1.precototal.value = parseInt(document.form1.quantidade.value) * parseInt(document.form1.precouni.value);                     
                }
                else
                {
                        document.form1.restante.value = "";
                        alert("Campos vazios.");
                }
        }
</script>

</head>


<body>
   <?php
            
$conn = @mysql_connect("127.0.0.1", "root", "") or die("Não foi possível a conexão com o Banco");
  $db = mysql_select_db("agendacontato", $conn) or die("Não foi possível selecionar o Banco");
     mysql_query("SET NAMES 'utf8'");
    mysql_query('SET character_set_connection=utf8');
    mysql_query('SET character_set_client=utf8');
    mysql_query('SET character_set_results=utf8');

        $id = $_GET["id"];

        $sql = mysql_query("select * from contato where id='$id'");

        $exibe = mysql_fetch_assoc($sql);
        ?>
    
    
<div id="header">
<h1><a href="#"></a></h1>
<h2><a href="">
 </a></h2>
</div>
<div id="menu">
<ul class='navigation'>
<li><a href='inicio.php' class='selected'>Home</a></li>
<li><a href = 'pesquisar.php'>Pesquisar</a></li>
<li><a href = 'inserir.php'>Inserir</a></li>
<li><a href = 'alterar.php'>Alterar</a></li>
<li><a href = 'excluir.php'>Excluir</a></li>
<li><a href='../logout.php'> Sair do pedido </a></li>
</ul> 
</div>
<div id="content">
<div id="colOne">

    <p1> <h3> <a href="../logout.php"> Sair </a> </h3> </p1> 
    <p>&nbsp;</p>
    <p>&nbsp;</p> 
     <form id="form" name="form" method="post" action="resultadoinserir.php">
         
         <input name="id" type="hidden" value="<?php echo $id; ?>" />
    
<table width="" height="2" border="0">
   
<tr>
  <th width="114" height="" align="left" valign="middle" scope="row"><strong>PEDIDO:</strong></th>
  <td align="center">
    <input name="pedi" type="text" id="pedi" size="55" value="<?php echo  $exibe["pedi"]; ?>" />
  </td>
  </tr>
<tr>
  <th height="" align="left" valign="middle" scope="row"><strong>VENDEDOR:</strong></th>
  <td align="center">
    <p>
      <input name="vendedor" type="text" id="vendedor" size="55" />
    </p>
  </td>
  </tr>
<tr>
  <th height="" align="left" valign="middle" scope="row"><strong>DATA/PEDIDO:</strong></th>
  <td align="center"><input name="datapedido" type="text" id="datapedido"  onkeypress="formatar('##/##/####', this)" value="<?php echo date('d/m/Y'); ?>" size="55" /></td>
  </tr>
<tr>
  <th height="" align="left" valign="middle" scope="row"><strong>DATA/ENTREGA:</strong></th>
  <td align="center"><input name="dataentrega" type="text" id="dataentrega" onkeypress="formatar('##/##/####', this)" size="55" /></td>
  </tr>
<tr>
  <th height="" align="left" valign="middle" scope="row"><strong>QUANTIDADE:</strong></th>
  <td align="center"><input name="quantidade" type="text" id="quantidade" size="55" /></td>
  </tr>
<tr>
  <th height="" align="left" valign="middle" scope="row"><strong>PRODUTO:</strong></th>
  <td align="center"><input name="produto" type="text" id="produto" size="55" /></td>
  </tr>
<tr>
  <th height="" align="left" valign="middle" scope="row"><strong>TOTAL:</strong></th>
  <td align="center"><input name="total" type="text" id="total" size="55" /></td>
</tr>
<tr>
  <th height="" align="left" valign="middle" scope="row"><strong>ENTRADA:
  </strong></th>
  <td align="center"><input name="entrada" type="text" id="entrada" size="55" /></td>
</tr>
<tr>
  <th height="" align="left" valign="middle" scope="row"><strong>RESTANTE:</strong></th>
  <td align="center"><input name="restante" type="text" id="restante" size="55" /></td>
</tr>

    
   
         
    <tr>
  <th height="" align="left" valign="middle" scope="row">SITUAÇÃO</th>
  <td>
    <p>
      <label for="situacao"></label>
      <select name="situacao" id="situacao">
        <option>Produção</option>
        <option>Entregue</option>
      </select>
    </p>
  </td>
</tr>
<tr>
  <th height="" align="left" valign="middle" scope="row">STATUS:</th>
  <td>
    <p>
      <label for="status"></label>
      <select name="status" size="1" id="status">
        <option>Aguardando pagamento</option>
        <option>Cliente em Debito</option>
        <option>Pagamento Efetuado</option>
      </select>
    </p>
  </td>
</tr>
     <tr>
  <th height="" align="left" valign="middle" scope="row">ENVIADO:</th>
  <td><select name="enviado" id="enviado">
    <option>Não </option>
    <option>Ricardo</option>
    <option>Lucas</option>
    <option>Pagio's</option>
  </select></td>
</tr>
<tr>
                        <th height="48" align="center" scope="row">&nbsp;</th>
                        <td align="center"><h3>
                                <input type = 'submit' style = 'font-size: 15px;' name = 'enviar' value = 'Enviar'></input>
                            </h3></td>

                    </tr>
                  
    </table>
    
     </form> 

    <p1> <br> <br> <br> </p1> 
     
</div>
<div style="clear: both;"></div>
</div>
<div id="footer">

<div align="center">
    
     <p> by  Daniel Paixão </p> 
     
    <table align="center" cellspacing="0" cellpadding="5" border="0" style="margin: 0px 0px -22px 0px;">
        <tr valign="middle">
            </tr>
    </table>
</div>

 
</div>
</body></html>
 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

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

Guest
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.

 Share

  • Forum Statistics

    • Total Topics
      149.6k
    • Total Posts
      646.2k
×
×
  • Create New...