Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Bom gente to apelando pro forum novamente com 1 sistema de cadastros sql q criei seguindo uma video aula usei dreamweaver cs4 na criacao e acontece de dar o seguinte erro
Warning: Cannot modify header information - headers already sent by (output started at D:\Arquivos de programas\VertrigoServ\www\teste\idex.php:1) in D:\Arquivos de programas\VertrigoServ\www\teste\idex.php on line 54
o script do sistema eh esse
<?php virtual('/teste/Connections/ragnarok.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO login (userid, user_pass, ---, email) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['usuario'], "text"),
GetSQLValueString($_POST['senha'], "text"),
GetSQLValueString($_POST['sexo'], "text"),
GetSQLValueString($_POST['email'], "text"));
mysql_select_db($database_ragnarok, $ragnarok);
$Result1 = mysql_query($insertSQL, $ragnarok) or die(mysql_error());
$insertGoTo = "/teste/cp.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>
<!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">](http://www.w3.org/1999/xhtml)
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sem título</title>
<style type="text/css">
<!--
.meio {
text-align: center;
}
-->
</style>
<script src="/teste/SpryAssets/SpryValidationPassword.js" type="text/javascript"></script>
<link href="/teste/SpryAssets/SpryValidationPassword.css" rel="stylesheet" type="text/css" />
</head>
<body class="meio">
<p>Cadastro</p>
<form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<table width="200" border="1">
<tr>
<td>usuario</td>
<td><input type="text" name="usuario" id="usuario" /></td>
</tr>
<tr>
<td>senha</td>
<td><input type="text" name="senha" id="senha" /></td>
</tr>
<tr>
<td>confimacao da senha</td>
<td><span id="confirmi">
<input type="password" name="confirmacao" id="confirmacao" />
<span class="passwordRequiredMsg">Um valor é necessário.</span></span></td>
</tr>
<tr>
<td>email</td>
<td><input type="text" name="email" id="email" /></td>
</tr>
<tr>
<td>sexo </td>
<td><select name="sexo" id="sexo">
<option value="M">Masculino</option>
<option value="F">Feminino</option>
</select></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Cadastrar" id="Cadastrar" value="Enviar" /></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1" />
</form>
<p> </p>
<script type="text/javascript">
<!--
var sprypassword1 = new Spry.Widget.ValidationPassword("confirmi");
//-->
</script>
</body>
</html>
e o do cp q eh a mensagem q vai aparecer depois de se cadastrar
<!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">](http://www.w3.org/1999/xhtml)
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sem título</title>
<style type="text/css">.saddsa {
text-align: center;
}</style>
</head>
<body class="saddsa"></body>
</html>
o problema eh o seguinte ele ate cria a conta vejo no sitema mysql ele ta em localhost
gostaria de saber como resouver e como evitar o problema emguanto estiver criando o sistema
obrigado adiantado para todos(as)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>EDIT<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
linhas conrespondentes ao erro
header(sprintf("Location: %s", $insertGoTo));
nessa linha ele aponta o erro
desde ja obrigado pela atencao
Carregando comentários...