Jump to content


Photo

Preciso De Ajuda Para Colocar Um...


  • Faça o login para participar
6 replies to this topic

#1 arturpaixao

arturpaixao

    Novato no fórum

  • Usuários
  • 2 posts
  • Sexo:Não informado

Posted 27/04/2005, 09:24

Oi pessoal, preciso colocar alguns os resultados obtidos atraves de um script em php dentro de tabelas em HTML, só q eu nunca fiz isso será que algum poderia me ajudar?

#2 Spider-man

Spider-man

    Doutor

  • Usuários
  • 987 posts
  • Sexo:Não informado

Posted 27/04/2005, 09:27

eh soh vc colocar um "echo $variavel;"

(y)

#3 rettich

rettich

    No Play, YES ABUSADO

  • Usuários
  • 258 posts
  • Sexo:Não informado

Posted 27/04/2005, 09:31

<td><? print $variavel; ?></td>

é so abri a tag q inicia um bloco d codigo do php (<? ?>), pod abrir em qlqr lugar do codigo html!!!!

qlqr coisa posta ae!!!
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Wallace Rettich - Desenvolvedor Web
BR Design -- M2Software

#4 ramzl

ramzl

    Novato no fórum

  • Usuários
  • 6 posts
  • Sexo:Não informado

Posted 27/04/2005, 09:35

<table>
<?php strsql="select * from usuarios"?>
<?php retorno=mysql_query($strsql,$dbconnect)?>
<?php while($linha=mysql_fetch_array($retorno);?>
<tr><td><?php echo $linha['nome']?></td><td><?php echo$linha['telefone']?>
</td></tr>
<?php } ?>
</table>

#5 arturpaixao

arturpaixao

    Novato no fórum

  • Usuários
  • 2 posts
  • Sexo:Não informado

Posted 27/04/2005, 09:41

olha pessoal vou colocar o codigo ai vcs me ajudam:

?>
<html>
<head>
<title>Rose2HTML</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- Estilo para impressao -->
</head>
<body>
<?php
$acao = $_GET['acao'];
if(!$acao){
?>
 <script language="JavaScript">
 <!--
  function VerificaArquivo(f){
  retorno = true;
  /*alert(document.form.file.value);
  document.form.file.focus();
  return false;
  */if(f.value.length == 0){   
 	 alert("Informe a unidade de disco, o diretório\n e o nome completo do arquivo.");
 	 document.form.file.click();
 	 retorno = false;
  }else{
 	 valor = f.value; 	 
 	 valor = valor.toUpperCase();
 	 tamanho = valor.length;
 	 ponto = valor.indexOf(".");
 	 txt = valor.lastIndexOf("TXT",tamanho);
       	 
 	 if(ponto==-1){     
    alert("Informe o nome do arquivo completo com sua extensão.");
    retorno = false;
 	 }
 	 }
  } 	 
  return retorno;
	}
 
  function Submete(v){
  if(VerificaArquivo(v)){
 	 alert("Aguarde a tranferência do arquivo...");
 	 window.status = 'aguarde, alguns segundos...';
 	 return true;
  }else
 	 return false;
	}
	
	function RetornaNumeros(caracter) {
  if(document.all) { // Internet Explorer
   	 var tecla = event.keyCode;
 	 }
 	 else {
   	 var tecla = caracter.which;
 	 }

 	 if((tecla > 47 && tecla < 58) || (tecla > 64 && tecla < 91) || (tecla > 96 && tecla < 123)) { // numeros de 0 a 9 e letras Maisc. e Minusc.
    return true;
 	 }
 	 else {
   	 if ((tecla != 0) && (tecla != 8) && (tecla != 58) && (tecla != 92)) { // backspace e Del
     	 return false;
    }
    else {
      return true;
    }
  }
	}	
 //-->
 </script>
<div id="content">
  <h1><a name="R2H"></a>R2H</h1>
  <form name="form" method="post" action="upload.php" enctype="multipart/form-data" onSubmit="">
    <table cellpadding="2" cellspacing="1" border="0" width="100%" align="center">
    <tr> 
        <th class="tdHeader3" id="caminho">ARQUIVO:</th>
        <td colspan="4" class="tdHeader4" headers="caminho"> <input type="hidden" name="MAX_FILE_SIZE" value="6000000"> 
          <input name="file" type="file" title="Clique o botão procurar para localizar o arquivo." onFocus="window.status = 'Informe a unidade de disco, o diretorio e o nome do arquivo completo.';" onBlur="window.status='';" onKeyPress="return RetornaNumeros(event)" value="">
          <span class="tdHeader1">
          <input type="submit" name="Submit" value="Avan&ccedil;ar" class="button">
        </span>  </td>
    </tr>
    <tr> 
    </TR>
  </table>
</form>
<p></p>
<hr>
  <p class="voltar">&nbsp;</p>
</div>
<script language="JavaScript">
<!--
	//document.form.file.click();
	document.form.file.focus();
//-->
</script>
<script language="JavaScript">
<!--
	window.status = 'Iniciando a conversão.';
//-->
</script>
<div id="content">
<?php
set_time_limit (600000);
	$status = false;
	$perc = 0;
	$pontos = 45;
  $status = move_uploaded_file($file,$file_name);
 	 
 	 
  if($status){
    $lines = file ($file_name);
        $linhas = count($lines);
    $linha = 0;
    $arry = array('CHAR','NCHAR','VARCHAR', 'VARCHAR2', 'NVARCHAR2', 'DATE', 'LONG', 'LONG RAW', 'ROWID','MLSLABEL','CLOB','NCLOB','BLOB','BFILE','RAW','FLOAT','NUMBER','INTEGER','CHARACTER','CHAR VARYING','CHARACTER VARYING','DEC','DECIMAL','DOUBLE PRECISION','INT','NCHAR VARYING','NUMERIC','REAL','SMALLINT');
                $arry2 = array('Container for Scalar Types');
       foreach ($lines as $line_num => $line) {
         	 $linha++;
   	 
   	 $tabelas = stristr ($line, "object Class \""); 
                    if(strlen($tabelas)){
        $restabelas = trim(str_replace('"','',(stristr($tabelas, "\""))));
        if (!in_array($restabelas,$arry)){
        print "<strong>".$restabelas."</strong>"."<br>";
        }
   	 }
        $campos = stristr($line, "object ClassAttribute \"");
   	 if(strlen($campos)){
        $rescampos = trim(str_replace('"','',(stristr($campos,"\""))));
        echo $rescampos."<br>";
                    }
   	 $doc = stristr($line, "documentation  \"");
   	 
   	 if (strlen($doc)){
      $resdoc = trim(str_replace('"','',(stristr($doc,"\""))));
      if (!in_array($resdoc,$arry2)){
      echo $resdoc."<br>";
      }
   	 }	
   	 $tipo = stristr($line, "type        \"");
   	 if (strlen($tipo)){
      $restipo = trim(str_replace('"','',(stristr($tipo,"\""))));
      echo $restipo."<br>";
   	 }
       }// loop
        echo "</font></center></b></div><br>\n"; 	 

  unlink($file_name); //deleta arquivo
	}
	
}
?>
<p><a href="#R2H">topo</a></p>
</div>
</body>
</html>

É isso ai, por favor me ajudem preciso entregar isto hj pela manhã...
atenciosamente
Artur Paixão

#6 Klaus

Klaus

    @ ubuntu jaunty

  • Ex-Admins
  • 7924 posts
  • Sexo:Masculino
  • Localidade:127.0.0.1

Posted 27/04/2005, 10:57

<_< O pessoal acabou de dizer, perfeitamente, como se faz.

Se você não conhece PHP, obviamente não vai conseguir. De duas, uma:

Você estuda PHP: http://www.php.net/
Você contrata um programador.
Klaus Paiva
Conheça também: Taperás

#7 thiagorsl

thiagorsl

    Ex-admin xD

  • Ex-Admins
  • 1151 posts
  • Sexo:Não informado
  • Localidade:Sampa
  • Interesses:http://sermaldito.amovoce.net/

Posted 27/04/2005, 12:54

<_< O pessoal acabou de dizer, perfeitamente, como se faz.

Se você não conhece PHP, obviamente não vai conseguir. De duas, uma:

Você estuda PHP: http://www.php.net/
Você contrata um programador.

Da uma procurada na seção de tutoriais por resultados SQL que vc vai achar dezenas de tutoriais como mostrar resultados em tabelas de tudo quanto é modo




PS:Ahhhhh Klaus to com saudade maninho /o/




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq