Jump to content


Vandy_WM

Member Since 13/08/2008
Offline Last Active 25/11/2008, 15:29
-----

Topics I've Started

Problemas Com Cadastro De Clientes

25/11/2008, 13:26

BOm...
MEu cadastro ja estava funcionando através do XAMPP, agora estou colocando ele on-line e está dando erros... gostaria que analizassem por favor e me ajudassem urgentemente pois preciso terminar meu projeto de estagio essa semana...
se alguem puder corrigir pra mim melhor ainda...
abraços galera
desde jah.. muito obrigado

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Gráfica Celer Ltda</title>
<style type="text/css">
<!--
.style1 {font-family: Univers}
.style2 {
	font-size: 20px
}
-->
</style>
</head>

<body>

<?
	$dbname="mysql.graficaceler.com.br";  
	$usuario="******"; 
	 $password="******"; 

	if(!($id = mysql_connect("mysql.graficaceler.com",$usuario,$password))) {
		  echo "Não foi possível estabelecer uma conexão.";
		  exit;
		}

	if(!($con=mysql_select_db($dbname,$id))) {
		  echo "Não foi possível estabelecer uma conexão.";
		  exit;
		}
	
	//Vamos inserir os campos das tabelas
if (getenv("REQUEST_METHOD") == "POST"){
	//cadastro do aluno
	$nome	 			=  $_POST['nome'];
	$email				=  $_POST['email'];
	$telefone			=  $_POST['telefone'];
	$telefone2			=  $_POST['telefone2'];
	$cpf				=  $_POST['cpf'];
	$rg				=  $_POST['rg'];
	$endereco			=  $_POST['endereco'];
	$bairro				=  $_POST['bairro'];
	$cidade				=  $_POST['cidade'];
	$estado				=  $_POST['estado'];
	$cep				=  $_POST['cep'];
	$username			=  $_POST['username'];
	$senha				=  $_POST['senha'];
	$confirmar_senha	=  $_POST['confirmar_senha'];


		//adicionando o cadastro do aluno
		if($nome)  {
			if (!($con=mysql_connect("$dbname")))
				echo "Não conseguiu conectar com o banco de dados" .mysql_error();
		
			if (!(mysql_select_db('graficaceler')))
				echo "Nao conseguiu escolher o banco" .mysql_error();
		 
			$query = "INSERT INTO cliente VALUES('$nome', '$email', '$telefone', '$telefone2', '$cpf', '$rg', '$endereco', '$bairro', '$cidade', '$estado', '$cep', '$username', '$senha',  '$confirmar_senha')";	
			mysql_query($query,$con) or die(" Não foi possível concluir o cadastro. " .mysql_error());
			} 
		else {
			$err = "Existem campos a serem preenchidos";
		} 
}	

?>

<table align="center"  width="938" height="691" border="0" cellspacing="1">
  <tr>
	<td><table width="389" border="0">
	  <tr>
		<td width="383"><span class="style1">Cadastro Completo, clique <a href="index.php" class="style2">aqui</a> para continuar.</span></td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	</table></td>
  </tr>
</table>


</BODY>
</HTML>

Pani No Pc...

04/11/2008, 20:38

Galera, ta ocorrendo um problema aki e gostaria de saber oq vcs acham q pode ser...
Bem, as vezes quando estou fazendo qualquer coisa no Pc ele simplesmente trava por uns 30 segundos e depois a tela fica toda preta por 1 segundo e volta ao normal...
Alguem tem alguma ideia ou ja teve o mesmo problema???

Sistema De Alteração De Website

31/10/2008, 12:23

Olá...
Estou com uma dúvida aqui, gostaria de saber se existe a possibilidade de fazer um sistema on-line para que a empresa possa modificar tabelas do site sem necessariamente utilizar algum software e acessar o host, apenas remover os dados da página e inserir novos dados.
Caso tenha possibilidade, se alguem tive algo para me ajudar ficarei agradecido.
Obrigado.

Dúvida Quanto A Upload...

03/10/2008, 13:43

Olá pessoal...
Meu site de conclusão de estágio precisa ter sistema de upload mas n sei como fazer...Estou mandando junto a imagem de como é o upload no site, mas caso seja complicado fazer upload d 5 arquivos de uma vez, pode ser 1 de cada vez...
Mas, os arquivos devem ser enviados para um e-mail, pois todos serão muito leves, então não há problema em serem mandados por e-mail...
Se alguem puder me ajudar ficarei muito agradecido...

Problema Com Envio De Formulário Por E-mail

24/09/2008, 15:22

Olá pessoal, sou iniciante no ramo de php e estou com um problemão quanto e enviar um formulári opor e-mail no meu site...
Vo colocar as duas paginas do envio aqui embaixo e quem puder corrigir ou pelo menos me dar alguma dica eu fikarei muito grato...

Página contato.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/template_teste.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>site</title>
<style type="text/css">
<!--
body {
	background-image: url(../fundo2.png);
}
#apDiv1 {
	position:absolute;
	left:31.5%;
	top:354px;
	width:531px;
	height:568px;
	background-image:;
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:1;
}
#apDiv2 {
	position:absolute;
	left:31.5%;
	top:429px;
	width:98px;
	height:20px;
	background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:2;
}
#apDiv3 {
	position:absolute;
	left:15%;
	top:374px;
	width:89px;
	height:22px;
	background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:2;
}
#apDiv4 {
	position:absolute;
	left:15%;
	top:411px;
	width:91px;
	height:20px;
	background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:3;
}
-->
</style></head>

<body>
<table align="center">
<tr>
<td>
<div id="apDiv1"><!-- InstanceBeginEditable name="EditRegion1" -->
  <p align="center" style="font-family: Univers; font-size: 13px">Você pode nos encontrar no seguinte endereço:</p>
  <p align="center" style="font-family: Univers; font-size: 13px"> Rua Cambará do Sul, Nº 26<br />
	Bairro União - Dois Irmãos - RS</p>
  <p align="center" style="font-family: Univers; font-size: 13px"> Ou pelos seguintes telefones: <br />
	  <br />
	(51)3564-2413<br />
	ou<br />
	(51)3564-1694</p>
  <p align="center" style="font-family: Univers; font-size: 13px"> </p>
  <p align="center" style="font-family: Univers; font-size: 13px">Você também pode nos contatar pelo serviço de e-mail abaixo.</p>
  <div align="center"></div>
  <div align="center"></div>
  <div align="center"></div>
  <table width="294" border="0">
	<tr>
	  <td width="57"><span style="font-family: Univers; font-size: 13px">Nome</span></td>
	  <td width="227"><form id="form1" name="form1" method="post" action="contato2.php">
		<label>
		  <input type="text" name="textfield" id="textfield" />
		  </label>
	  </form>	  </td>
	</tr>
	<tr>
	  <td><span style="font-family: Univers; font-size: 13px">E-mail</span></td>
	  <td><form id="form2" name="form2" method="post" action="contato2.php">
		<label>
		  <input type="text" name="textfield2" id="textfield2" />
		  </label>
	  </form>	  </td>
	</tr>
  </table>
  <form action="contato2.php" method="post" enctype="multipart/form-data" name="enviar" class="enviar" onsubmit="return validaForm()">
	<label>
	  <div align="center">
		<textarea name="textarea" id="textarea" cols="60" rows="8"></textarea>
		</div>
	</label>
	<p align="center">
	  <label>
	  <input type="submit" name="button" id="button" value="Limpar" />
	  </label>
	  <label>
	  <input name="submit" type="submit" onclick="submitFormulario();" class="submit" value="ENVIAR"/>
	  </label>
	</p>
  </form>
  <div align="left"></div>
  <div align="center"></div>
<!-- InstanceEndEditable --></div>
<div id="apDiv3">
  <label>
  <input name="textfield" type="text" id="textfield" size="15" />
  </label>
</div>
<div id="apDiv4">
  <label>
  <input name="textfield2" type="password" id="textfield2" size="15" />
  </label>
</div>
<table width="98" border="0">
  <tr>
	<td colspan="2"><img src="../cabecalho2.png" width="768" height="320" border="0" usemap="#Map" /></td>
  </tr>
  <tr>
	<td><img src="../menu2.png" width="180" height="601" border="0" usemap="#Map2" /></td>
	<td><img src="../texto2.png" width="584" height="601" /></td>
  </tr>
  
  
  <tr>
	<td colspan="2"><img src="../rodape2.png" width="768" height="106" /></td>
  </tr>
</table>

<map name="Map" id="Map">
<area shape="rect" coords="1,230,77,254" href="index.php" />
<area shape="rect" coords="77,230,162,254" href="historico.php" />
<area shape="rect" coords="161,230,243,255" href="produtos.php" />
<area shape="rect" coords="243,231,319,254" href="precos.php" />
<area shape="rect" coords="448,231,531,256" href="instrucoes_princ_1.php" />
<area shape="rect" coords="530,231,601,255" href="artes.php" />
<area shape="rect" coords="601,231,693,255" href="duvidas.php" />
<area shape="rect" coords="693,231,765,254" href="mapa.php" />
<area shape="poly" coords="320,254,319,245,321,236,328,228,338,225,350,225,354,221,356,207,364,190,376,182,389,179,404,188,412,200,416,213,412,225,436,226,443,234,446,256" href="index.php" />
</map>
<map name="Map2" id="Map2">
<area shape="rect" coords="31,147,158,171" href="cadastro.php" />
<area shape="rect" coords="30,172,158,195" href="contato.php" />
<area shape="rect" coords="30,195,158,221" href="upload.php" />
<area shape="rect" coords="29,220,159,248" href="orcamentos.php" />
<area shape="rect" coords="42,101,142,118" href="login.php" />
<area shape="rect" coords="40,125,148,133" href="esq_senha.php" />
</map>
</td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>

Página contato2.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/template_teste.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>site</title>
<style type="text/css">
<!--
body {
	background-image: url(../fundo2.png);
}
#apDiv1 {
	position:absolute;
	left:31.5%;
	top:354px;
	width:531px;
	height:568px;
	background-image:;
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:1;
}
#apDiv2 {
	position:absolute;
	left:31.5%;
	top:429px;
	width:98px;
	height:20px;
	background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:2;
}
#apDiv3 {
	position:absolute;
	left:15%;
	top:374px;
	width:89px;
	height:22px;
	background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:2;
}
#apDiv4 {
	position:absolute;
	left:15%;
	top:411px;
	width:91px;
	height:20px;
	background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	layer-background-image:url(file:///C|/Documents%20and%20Settings/Producao/Desktop/Site_Gr%C3%A1fica_Celer/fundo.png);
	border:1px none #000000;
	z-index:3;
}
-->
</style></head>

<body>
<table align="center">
<tr>
<td>
<div id="apDiv1"><!-- InstanceBeginEditable name="EditRegion1" -->
  <p align="center" style="font-family: Univers; font-size: 13px">Você pode nos encontrar no seguinte endereço:</p>
  <p align="center" style="font-family: Univers; font-size: 13px"> Rua Cambará do Sul, Nº 26<br />
	Bairro União - Dois Irmãos - RS</p>
  <p align="center" style="font-family: Univers; font-size: 13px"> Ou pelos seguintes telefones: <br />
	  <br />
	3564-2413<br />
	ou<br />
	3564-1694</p>
  <p align="center" style="font-family: Univers; font-size: 13px"> </p>
  <p align="center" style="font-family: Univers; font-size: 13px">Você também pode nos contatar pelo serviço de e-mail abaixo.</p>
  <div align="center"></div>
  <div align="center"></div>
  <div align="center"></div>
  <form id="form1" name="form1" method="post" action="contato.php">

<?php
$mensagem = "Nome: ".$_POST['txtnome']." \n";
$mensagem .= "Email: ".$_POST['txtemail']." \n";
$mensagem .= "Mensagem:". $_POST['txtmensagem'];

mail("email@yahoo.com.br", "form.enviar", $mensagem);

echo  'Seu contato foi enviado com sucesso!';
echo ' Em breve retornaremos sua mensagem';
?>

		</form>
  <form id="form3" name="form3" method="post" action="contato.php">
  </form>
  <div align="left"></div>
  <div align="center"></div>
<!-- InstanceEndEditable --></div>
<div id="apDiv3">
  <label>
  <input name="textfield" type="text" id="textfield" size="15" />
  </label>
</div>
<div id="apDiv4">
  <label>
  <input name="textfield2" type="password" id="textfield2" size="15" />
  </label>
</div>
<table width="98" border="0">
  <tr>
	<td colspan="2"><img src="../cabecalho2.png" width="768" height="320" border="0" usemap="#Map" /></td>
  </tr>
  <tr>
	<td><img src="../menu2.png" width="180" height="601" border="0" usemap="#Map2" /></td>
	<td><img src="../texto2.png" width="584" height="601" /></td>
  </tr>
  
  
  <tr>
	<td colspan="2"><img src="../rodape2.png" width="768" height="106" /></td>
  </tr>
</table>

<map name="Map" id="Map">
<area shape="rect" coords="1,230,77,254" href="index.php" />
<area shape="rect" coords="77,230,162,254" href="historico.php" />
<area shape="rect" coords="161,230,243,255" href="produtos.php" />
<area shape="rect" coords="243,231,319,254" href="precos.php" />
<area shape="rect" coords="448,231,531,256" href="instrucoes_princ_1.php" />
<area shape="rect" coords="530,231,601,255" href="artes.php" />
<area shape="rect" coords="601,231,693,255" href="duvidas.php" />
<area shape="rect" coords="693,231,765,254" href="mapa.php" />
<area shape="poly" coords="320,254,319,245,321,236,328,228,338,225,350,225,354,221,356,207,364,190,376,182,389,179,404,188,412,200,416,213,412,225,436,226,443,234,446,256" href="index.php" />
</map>
<map name="Map2" id="Map2">
<area shape="rect" coords="31,147,158,171" href="cadastro.php" />
<area shape="rect" coords="30,172,158,195" href="contato.php" />
<area shape="rect" coords="30,195,158,221" href="upload.php" />
<area shape="rect" coords="29,220,159,248" href="orcamentos.php" />
<area shape="rect" coords="42,101,142,118" href="login.php" />
<area shape="rect" coords="40,125,148,133" href="esq_senha.php" />
</map>
</td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>

Dese já, muito obrigado...

Abraços

IPB Skin By Virteq