Error says: Warning: Cannot modify header information
I keep receiving an error message after my form is sent (the form still send the information I need just wont re-direct to the next page)
It redirects to a page that says:
Warning: Cannot modify header information - headers already sent by (output started at /home/tommyle/public_html/newp.php:10) in /home/tommyle/public_html/newp.php on line 41
my php code looks like this:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Tommy Lemonade Beta</title>
<link href="style1.css" rel="stylesheet" type="text/css">
</head>
<body>
<?php
/* Set e-mail recipient */
$myemail = "profiles@tommylemonade";
/* Check all form inputs using check_input function */
$name = check_input($_POST['name'], "Enter your name");
$subject = check_input($_POST['subject'], "Enter a subject");
$email = check_input($_POST['email']);
$message = check_input($_POST['message'], "Write your message");
/* If e-mail is not valid show error message */
if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $email))
show_error("E-mail address not valid");
/* Let's prepare the message for the e-mail */
$message = "
Name: $name
E-mail: $email
Subject: $subject
Message:
$message
/* Send the message using mail() function */
mail($myemail, $subject, $message);
/* Redirect visitor to the thank you page */
header('Location: thanks.html');
exit();
/* Functions we used */
function check_input($data, $problem='')
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
if ($problem && strlen($data) == 0)
show_error($problem);
return $data;
function show_error($myError)
?>
<html>
<body>
<p>Please correct the following error:</p>
<strong><?php echo $myError; ?></strong>
<p>Hit the back button and try again</p>
</body>
</html>
<?php
exit();
?>
</body>
</html>
This is line 41:
header('Location: thanks.html');
Can anybody see what I'm missing?
Yeah, rework the code so you don't get any output before the php code is executed (like below):
<?php
/* Set e-mail recipient */
$myemail = "profiles@tommylemonade";
/* Check all form inputs using check_input function */
$name = check_input($_POST['name'], "Enter your name");
$subject = check_input($_POST['subject'], "Enter a subject");
$email = check_input($_POST['email']);
$message = check_input($_POST['message'], "Write your message");
/* If e-mail is not valid show error message */
if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $email))
show_error("E-mail address not valid");
/* Let's prepare the message for the e-mail */
$message = "
Name: $name
E-mail: $email
Subject: $subject
Message: $message
/* Send the message using mail() function */
mail($myemail, $subject, $message);
/* Redirect visitor to the thank you page */
header('Location: thanks.html');
exit();
/* Functions we used */
function check_input($data, $problem='')
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
if ($problem && strlen($data) == 0)
show_error($problem);
return $data;
function show_error($myError)
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Tommy Lemonade Beta</title>
<link href="style1.css" rel="stylesheet" type="text/css">
</head>
<body>
<p>Please correct the following error:</p>
<strong><?php echo $myError; ?></strong>
<p>Hit the back button and try again</p>
</body>
</html>
<?php
exit();
?>
Similar Messages
-
Hi,
I've moved a website from a server to another, and have got this little issue,
I've a form witch gets submit and the user redirects to a "thank you" page, on the submittion I've added mail send so I get an email when the form is submitted, the mail part works fine, I get the emails. but after clicking the submit button this error comes up instead of redirecting to the thank you page.
Warning: Cannot modify header information - headers already sent by (output started at ..../index.php:79) in /...../includes/common/KT_functions.inc.php on line 465
This is the KT_functions.inc.php part,
function KT_redir($url) {
$protocol = "http://";
$server_name = $_SERVER["HTTP_HOST"];
if ($server_name != '') {
$protocol = "http://";
if (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == "on")) {
$protocol = "https://";
if (preg_match("#^/#", $url)) {
$url = $protocol.$server_name.$url;
} else if (!preg_match("#^[a-z]+://#", $url)) {
$script = KT_getPHP_SELF();
if (isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] != '' && $_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) {
$script = substr($script, 0, strlen($script) - strlen($_SERVER['PATH_INFO']));
$url = $protocol.$server_name.(preg_replace("#/[^/]*$#", "/", $script)).$url;
session_write_close();
$url = str_replace(" ","%20",$url);
if (KT_is_ajax_request()) {
header("Kt_location: ".$url);
echo "Redirecting to: " . $url;
else {
header("Location: ".$url);
exit;
I'm not a coder and appreciate any help.
Thanks in advance.addField("fornamn", true, "text", "", "", "", "Vänligen skriv ditt namn"); $formValidation->addField("efternamn", true, "text", "", "", "", "Vänligen skriv efternamn"); $formValidation->addField("gatu", true, "text", "", "", "", "Vänligen skriv gatuadress"); $formValidation->addField("postnummer", true, "text", "", "", "", "Vänligen ange postnummer"); $formValidation->addField("ort", true, "text", "", "", "", "Vänligen skriv ort"); $formValidation->addField("telefon", true, "numeric", "int", "5", "", "Vänligen skriv ett giltilgt telefon nummer"); $formValidation->addField("epost", true, "text", "email", "", "", "Vänligen skriv en e-post adress. dit skickar vi status på din service"); $tNGs->prepareValidation($formValidation); // End trigger //start Trigger_SendEmail trigger //remove this line if you want to edit the code by hand function Trigger_SendEmail(&$tNG) { $emailObj = new tNG_Email($tNG); $emailObj->setFrom("[email protected]"); $emailObj->setTo("{epost}"); $emailObj->setCC(""); $emailObj->setBCC("[email protected]"); $emailObj->setSubject("Upplåsning: {modell} Nr: {id}"); //WriteContent method $emailObj->setContent("Hej {fornamn},
\n"); $emailObj->setEncoding("UTF-8"); $emailObj->setFormat("HTML/Text"); $emailObj->setImportance("Normal"); return $emailObj->Execute(); } //end Trigger_SendEmail trigger if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $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; } } $colname_phone = "-1"; if (isset($_GET['mobil_id'])) { $colname_phone = $_GET['mobil_id']; } mysql_select_db($database_wd, $wd); $query_phone = sprintf("SELECT * FROM mobiler WHERE id = %s", GetSQLValueString($colname_phone, "int")); $phone = mysql_query($query_phone, $wd) or die(mysql_error()); $row_phone = mysql_fetch_assoc($phone); $totalRows_phone = mysql_num_rows($phone); // Make an insert transaction instance $ins_bestall = new tNG_insert($conn_wd); $tNGs->addTransaction($ins_bestall); // Register triggers $ins_bestall->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1"); $ins_bestall->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation); $ins_bestall->registerTrigger("END", "Trigger_Default_Redirect", 99, "http://domain.com/---------.html"); $ins_bestall->registerTrigger("AFTER", "Trigger_SendEmail", 98); // Add columns $ins_bestall->setTable("bestall"); $ins_bestall->addColumn("fornamn", "STRING_TYPE", "POST", "fornamn"); $ins_bestall->addColumn("deb", "STRING_TYPE", "POST", "deb", "{phone.deb}"); $ins_bestall->addColumn("efternamn", "STRING_TYPE", "POST", "efternamn"); $ins_bestall->addColumn("gatu", "STRING_TYPE", "POST", "gatu"); $ins_bestall->addColumn("postnummer", "STRING_TYPE", "POST", "postnummer"); $ins_bestall->addColumn("ort", "STRING_TYPE", "POST", "ort"); $ins_bestall->addColumn("telefon", "NUMERIC_TYPE", "POST", "telefon"); $ins_bestall->addColumn("epost", "STRING_TYPE", "POST", "epost"); $ins_bestall->addColumn("modell", "STRING_TYPE", "POST", "modell"); $ins_bestall->addColumn("imei", "STRING_TYPE", "POST", "imei"); $ins_bestall->setPrimaryKey("id", "NUMERIC_TYPE"); // Execute all the registered transactions $tNGs->executeTransactions(); // Get the transaction recordset $rsbestall = $tNGs->getRecordset("bestall"); $row_rsbestall = mysql_fetch_assoc($rsbestall); $totalRows_rsbestall = mysql_num_rows($rsbestall); ?> displayValidationRules();?> getErrorMsg(); ?>
Modell:
Pris:
------: Kr ----- ----- ----
Postförskott (Vi bjuder på postförskotts avgiften)
Förnamn:
displayFieldHint("fornamn");?> displayFieldError("bestall", "fornamn"); ?>
Efternamn:
displayFieldHint("efternamn");?> displayFieldError("bestall", "efternamn"); ?>
Gatuadress:
displayFieldHint("gatu");?> displayFieldError("bestall", "gatu"); ?>
Postnummer:
displayFieldHint("postnummer");?> displayFieldError("bestall", "postnummer"); ?>
Ort:
displayFieldHint("ort");?> displayFieldError("bestall", "ort"); ?>
Telefon:
displayFieldError("bestall", "telefon"); ?>
E-Post:
displayFieldError("bestall", "epost"); ?>
displayFieldHint("modell");?> displayFieldError("bestall", "modell"); ?>
IMEI:
displayFieldHint("imei");?> displayFieldError("bestall", "imei"); ?> -----.
Debranding:
Ja Nej
------ "; } else{ echo "Denna telefon kan ej debrandas! Nej"; }?>
Here is the complete code for the form page, I've replaced some textes with "-------------" -
Warning: Cannot modify header information
Hi,
When I submit a form I get
Warning: Cannot modify header information - headers already sent by (output started at /home/aiop/public_html/events/registerEventWA.php:4) in /home/aiop/public_html/includes/common/KT_functions.inc.php on line 464
I know this usually means i have a space either before theI have encountered that a few times, and always figured it out, it fixed itself, or, some other standard task remedied it, unknowingly to me.
my mantra: I'm no guru!
but ive seen this a few times and cant remember much details.
I'm thinking it may have came once with SSI situations. Or it may have been something with improper syntax in my connection file. Sorry that's not a LOT of help, but i'll be lookin out and if i see it again soon, and / or if i remember the cause / remedy, i'll post.
Best,
ben blue -
PHP login - Warning: Cannot modify header information
I don't know much about PHP so if this is a FAQ / basic
problem then sorry
... but I get this warning message on a page after logging in
Warning: Cannot modify header information - headers already
sent by (output
started at /home/.sites/78/site58/web/elite/index.php:2) in
/home/.sites/78/site58/web/elite/index.php on line 40
Any help appreciated!
GerryAh - I get it, a space before the code.
G
"G" <[email protected]> wrote in message
news:e34m08$3kv$[email protected]..
>I don't know much about PHP so if this is a FAQ / basic
problem then sorry
>... but I get this warning message on a page after
logging in ...
>
>
> Warning: Cannot modify header information - headers
already sent by
> (output started at
/home/.sites/78/site58/web/elite/index.php:2) in
> /home/.sites/78/site58/web/elite/index.php on line 40
>
> Any help appreciated!
>
> Gerry
> -
Cannot Modify Header Information Errors
Hello all,
I am working on building an members only area to my website, and have used the "turorial" provided in dreamweaver help. After creating the pages though I am encountering erros which I believe have to do with the redirecting.
On my registration page (www.hondovfd.org/newsite/register.php) I am getting the error:
Warning: Cannot modify header information - headers already sent in /var/home/hondovfd/hondovfd.org/www/newsite/register.php on line 50
The registration goes through, as I can see it in my database, but the error prevents anything further.
On my login page (www.hondovfd.org/newsite/login.php) I immediatly get these two errors when loading the page:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent in /var/home/hondovfd/hondovfd.org/www/newsite/login.php on line 1074249146
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/home/hondovfd/hondovfd.org/www/newsite/login.php:1074249146) in /var/home/hondovfd/hondovfd.org/www/newsite/login.php on line 1074249146
And once I enter a valid username/password this error is also added:
Warning: Cannot modify header information - headers already sent by (output started at /var/home/hondovfd/hondovfd.org/www/newsite/login.php:1074249146) in /var/home/hondovfd/hondovfd.org/www/newsite/login.php on line 68
If you would like to try and diagnose the username/password I have been using is"test" for both fields.
Anyone have any ideas why this is occuring?
Thanks,
DavidHere is the code from my login page:
<?php virtual('/newsite/Connections/hondovfd.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;
?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
if (isset($_POST['username'])) {
$loginUsername=$_POST['username'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "/newsite/membersonly.php";
$MM_redirectLoginFailed = "/newsite/loginfailed.html";
$MM_redirecttoReferrer = true;
mysql_select_db($database_hondovfd, $hondovfd);
$LoginRS__query=sprintf("SELECT username, password FROM login WHERE username=%s AND password=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $hondovfd) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && true) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
header("Location: " . $MM_redirectLoginSuccess );
else {
header("Location: ". $MM_redirectLoginFailed );
?>
<!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.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- InstanceBeginEditable name="Title" -->
<title>Login</title>
<!-- InstanceEndEditable -->
<meta name="description" content="Hondo Fire and Rescue serves the Arroyo Hondo and Canada Village areas of Santa Fe County, NM." />
<meta name="keywords" content="hondo, hondo fire, hondo vfd, hondo fire department, santa fe county fire department, santa fe county, volunteer fire department, hondo volunteer fire department" />
<link href="/newsite/stylesheet.css" type="text/css" rel="stylesheet" />
<!--[if IE]>
<style type="text/css">
#mainContent, #sidebar1 { zoom: 1;}
</style>
<![endif]-->
<script src="/newsite/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="/newsite/SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
</head>
<body class="thrColLiqHdr">
<div id="container">
<div id="header"></div>
<div id="sidebar1">
<h3>Navigation : </h3>
<ul id="MenuBar1" class="MenuBarVertical">
<li><a href="/newsite/index.html">Home</a></li>
<li><a href="/newsite/support.html">Support Hondo</a></li>
<li><a class="MenuBarItemSubmenu" href="#">Information Menu</a>
<ul>
<li><a href="/newsite/people.html">Our People</a></li>
<li><a href="http://www.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=101620713606637979698.00045b6ead4ab4ea70b78&z=11" target="_blank">Response Area</a></li>
<li><a href="/newsite/medical.html">Medical</a></li>
<li><a href="/newsite/apparatus.html">Apparatus</a></li>
<li><a href="/newsite/training.html">Training</a></li>
<li><a href="/newsite/volunteer.html">Volunteer</a></li>
<li><a href="/newsite/statistics.html">Statistics</a></li>
<li><a href="/newsite/patchtrading.html">Patch Trading</a></li>
</ul>
</li>
<li><a href="#">Photo Gallery</a></li>
<li><a href="/newsite/calendar.html">Calendar</a></li>
<li><a href="/newsite/news.html">Blog/News</a></li>
<li><a href="/newsite/links.html">Links</a></li>
<li><a href="/newsite/contact.html">Contact Us</a></li>
</ul>
<br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<span class="lefttext">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="8567201">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" />
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</img></input></input>
</span>
</form>
<span class="lefttext"><br />
</span>
<center>
<span class="lefttext"><a href="http://www.facebook.com/pages/Santa-Fe-NM/Hondo-Volunteer-Fire-Department/74284233488" target="_blank" class="lefttext">Hondo VFD on Facebook</a></span>
</center>
<!-- end #sidebar1 --></div>
<div id="sidebar2">
<p>Call Statistics for November</p>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="60%">EMS Calls</td>
<td width="40%">##</td>
</tr>
<tr>
<td>Fire Calls</td>
<td>##</td>
</tr>
<tr>
<td>Other Calls</td>
<td>##</td>
</tr>
</table>
<hr />
<div id="cse" style="width:100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1');
google.setOnLoadCallback(function(){
new google.search.CustomSearchControl().draw('cse');
}, true);
</script>
<!-- End Google Search Element -->
</div>
<!-- end #sidebar2 -->
<div id="mainContent">
<div class="top"></div><div class="wrap"><!-- InstanceBeginEditable name="Main Content" -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="47" class="h2">Members Only Login</td>
</tr>
<tr>
<td><form id="login" name="login" method="POST" action="<?php echo $loginFormAction; ?>">
<table width="40%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="31%">Username:</td>
<td width="69%"><input name="username" type="text" /></td>
</tr>
<tr>
<td>Password</td>
<td><input name="password" type="password" /></td>
</tr>
</table>
<input name="Submit" type="submit" />
</form></td>
</tr>
</table>
<!-- InstanceEndEditable -->
</div>
<div class="bottom"></div>
</div>
<!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --> <br class="clearfloat" />
<div id="footer">
<p align="center">© Copyright 2009 Hondo Volunteer Fire Department | <a href="mailto:[email protected]">Contact Us</a><a href="http://www.legalhelpers.com/chapter-13-bankruptcy/chapter13.html"></a><br />Hosting provided by <a href="http://studiox.com/" target="_blank">Studio X</a></p>
<!-- end #footer --></div>
<!-- end #container --></div>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
<!-- InstanceEnd --></html>
Here is the code from my registration page:
<?php virtual('/newsite/Connections/hondovfd.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;
// *** Redirect if username exists
$MM_flag="MM_insert";
if (isset($_POST[$MM_flag])) {
$MM_dupKeyRedirect="/newsite/registerinvalidusername.html";
$loginUsername = $_POST['username'];
$LoginRS__query = sprintf("SELECT username FROM login WHERE username=%s", GetSQLValueString($loginUsername, "text"));
mysql_select_db($database_hondovfd, $hondovfd);
$LoginRS=mysql_query($LoginRS__query, $hondovfd) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
//if there is a row in the database, the username was found - can not add the requested username
if($loginFoundUser){
$MM_qsChar = "?";
//append the username to the redirect page
if (substr_count($MM_dupKeyRedirect,"?") >=1) $MM_qsChar = "&";
$MM_dupKeyRedirect = $MM_dupKeyRedirect . $MM_qsChar ."requsername=".$loginUsername;
header ("Location: $MM_dupKeyRedirect");
exit;
$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 (username, password, email, name) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['username'], "text"),
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['name'], "text"));
mysql_select_db($database_hondovfd, $hondovfd);
$Result1 = mysql_query($insertSQL, $hondovfd) or die(mysql_error());
$insertGoTo = "/newsite/registersuccess.html";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
header(sprintf("Location: %s", $insertGoTo));
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO login (username, password, email, name) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['username'], "text"),
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['name'], "text"));
mysql_select_db($database_hondovfd, $hondovfd);
$Result1 = mysql_query($insertSQL, $hondovfd) or die(mysql_error());
$insertGoTo = "/newsite/registersuccess.html";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
header(sprintf("Location:", $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"><!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- InstanceBeginEditable name="Title" -->
<title>Register</title>
<!-- InstanceEndEditable -->
<meta name="description" content="Hondo Fire and Rescue serves the Arroyo Hondo and Canada Village areas of Santa Fe County, NM." />
<meta name="keywords" content="hondo, hondo fire, hondo vfd, hondo fire department, santa fe county fire department, santa fe county, volunteer fire department, hondo volunteer fire department" />
<link href="stylesheet.css" type="text/css" rel="stylesheet" />
<!--[if IE]>
<style type="text/css">
#mainContent, #sidebar1 { zoom: 1;}
</style>
<![endif]-->
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
</head>
<body class="thrColLiqHdr">
<div id="container">
<div id="header"></div>
<div id="sidebar1">
<h3>Navigation : </h3>
<ul id="MenuBar1" class="MenuBarVertical">
<li><a href="/newsite/index.html">Home</a></li>
<li><a href="/newsite/support.html">Support Hondo</a></li>
<li><a class="MenuBarItemSubmenu" href="#">Information Menu</a>
<ul>
<li><a href="/newsite/people.html">Our People</a></li>
<li><a href="http://www.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=101620713606637979698.00045b6ead4ab4ea70b78&z=11" target="_blank">Response Area</a></li>
<li><a href="/newsite/medical.html">Medical</a></li>
<li><a href="/newsite/apparatus.html">Apparatus</a></li>
<li><a href="/newsite/training.html">Training</a></li>
<li><a href="/newsite/volunteer.html">Volunteer</a></li>
<li><a href="/newsite/statistics.html">Statistics</a></li>
<li><a href="/newsite/patchtrading.html">Patch Trading</a></li>
</ul>
</li>
<li><a href="#">Photo Gallery</a></li>
<li><a href="/newsite/calendar.html">Calendar</a></li>
<li><a href="/newsite/news.html">Blog/News</a></li>
<li><a href="/newsite/links.html">Links</a></li>
<li><a href="/newsite/contact.html">Contact Us</a></li>
</ul>
<br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<span class="lefttext">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="8567201">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" />
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</img></input></input>
</span>
</form>
<span class="lefttext"><br />
</span>
<center>
<span class="lefttext"><a href="http://www.facebook.com/pages/Santa-Fe-NM/Hondo-Volunteer-Fire-Department/74284233488" target="_blank" class="lefttext">Hondo VFD on Facebook</a></span>
</center>
<!-- end #sidebar1 --></div>
<div id="sidebar2">
<p>Call Statistics for November</p>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="60%">EMS Calls</td>
<td width="40%">##</td>
</tr>
<tr>
<td>Fire Calls</td>
<td>##</td>
</tr>
<tr>
<td>Other Calls</td>
<td>##</td>
</tr>
</table>
<hr />
<div id="cse" style="width:100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1');
google.setOnLoadCallback(function(){
new google.search.CustomSearchControl().draw('cse');
}, true);
</script>
<!-- End Google Search Element -->
</div>
<!-- end #sidebar2 -->
<div id="mainContent">
<div class="top"></div><div class="wrap"><!-- InstanceBeginEditable name="Main Content" -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="47" class="h2">Create an Account</td>
</tr>
<tr>
<td><p>Please fill in the following information to create an account:</p>
<form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
<table width="53%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="38%">Name</td>
<td width="62%"><input name="name" type="text" /></td>
</tr>
<tr>
<td>E-Mail Address</td>
<td><input name="email" type="text" /></td>
</tr>
<tr>
<td>Desired Username</td>
<td><input name="username" type="text" /></td>
</tr>
<tr>
<td>Desired Password</td>
<td><input name="password" type="password" /></td>
</tr>
</table><input name="submit" type="submit" />
<input type="hidden" name="MM_insert" value="form1" />
</p></form></td>
</tr>
</table>
<!-- InstanceEndEditable -->
</div>
<div class="bottom"></div>
</div>
<!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --> <br class="clearfloat" />
<div id="footer">
<p align="center">© Copyright 2009 Hondo Volunteer Fire Department | <a href="mailto:[email protected]">Contact Us</a><a href="http://www.legalhelpers.com/chapter-13-bankruptcy/chapter13.html"></a><br />Hosting provided by <a href="http://studiox.com/" target="_blank">Studio X</a></p>
<!-- end #footer --></div>
<!-- end #container --></div>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
<!-- InstanceEnd --></html>
Dreamweaver also created this file: hondovfd.php
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_hondovfd = "localhost";
$database_hondovfd = "hondovfd_org";
$username_hondovfd = "silver";
$password_hondovfd = "m3d1c4u2c";
$hondovfd = mysql_pconnect($hostname_hondovfd, $username_hondovfd, $password_hondovfd) or trigger_error(mysql_error(),E_USER_ERROR);
?> -
Cannot modify header information
As a newby on databases. I am trying to forward a visitor to
another page after completing their details on an insert record...
But whatever I do I keep getting this error:
Warning: Cannot modify header information - headers already
sent by (output started at
/content/StartupHostPlus/r/e/relishlunch.com/web/SignMeUp.php:1) in
/content/StartupHostPlus/r/e/relishlunch.com/web/SignMeUp.php on
line 52
If I take out the redirection in the script it works ok but
of course I don't get the redirection...
Any ideas?colinwalton wrote:
> As a newby on databases. I am trying to forward a
visitor to another page after
> completing their details on an insert record...
>
> But whatever I do I keep getting this error:
> Warning: Cannot modify header information - headers
already sent by (output
> started at
/content/StartupHostPlus/r/e/relishlunch.com/web/SignMeUp.php:1) in
>
/content/StartupHostPlus/r/e/relishlunch.com/web/SignMeUp.php on
line 52
"Headers already sent" is one of the most common errors that
beginners
run into. The header() function cannot perform the redirect
if any
output has been sent to the browser. This includes new lines
or any
whitespace outside the PHP tags.
According to the error message, output was started at line 1
of
SignMeUp.php. Make sure there is nothing before the opening
PHP tag.
Also make sure there's no whitespace outside the PHP tags in
RelishConnection.php.
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
Login failure (cannot modify header) PHP/MySQL
I have a login form 100% Dreamweaver8 built using PHP/MySQL.
After logging in it fails to goto the $MM_redirectLoginSuccess page
(index.php). I did not have this issue prior to the 8.02 update. I
designed it the same way as I had before the 8.02 update. I have
checked multiple times for whitespace before and after the PHP open
and close tags in Dreamweaver and other text editors.
Below is what info is needed I hope.
Error
PHP Warning: Cannot modify header information - headers
already sent by (output started at /var/www/web4/web/login.php:4)
in /var/www/web4/web/login.php on line 72, referer:
Code (All Dreamweaver 8 Generated)
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
if (isset($_POST['username'])) {
$loginUsername=$_POST['username'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "Account_Type";
$MM_redirectLoginSuccess = "index.php";
$MM_redirectLoginFailed = "loginfailed.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_dnsturtle, $dnsturtle);
$LoginRS__query=sprintf("SELECT Email, Password,
Account_Type FROM accounts WHERE Email=%s AND Password=%s",
GetSQLValueString($loginUsername, "text"),
GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $dnsturtle) or
die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = mysql_result($LoginRS,0,'Account_Type');
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
header("Location: " . $MM_redirectLoginSuccess );
--------------------Line 72
else {
header("Location: ". $MM_redirectLoginFailed );
?>I take it you have an include file as well on the page, to
reference the
database? Check in there for whitespace.
Gareth
http://www.phploginsuite.co.uk/
PHP Login Suite V2 - 34 Server Behaviors to build a complete
Login system. -
I plugged in my ipod touch 4g to sync with my macbook pro and itunes sent an error saying itunes cannot read your ipod please reset your ipod, so as suggested by itunes i reset my ipod and now when i plug my ipod in itunes doesn't even recognise it and doesnt sync with it
Hello frankini
Continue your troubleshooting with the article below to resolve issues with your iPod touch not being seen in iTunes. It will walk you through checking the drivers as well as any security software that may be blocking it.
iOS: Device not recognized in iTunes for Windows
http://support.apple.com/kb/ts1538
Regards,
-Norm G. -
I have installed the new up to date itunes which i can open on my PC, however when i connect my ipad or iphone i get an error saying i cannot use the device as the require software isn't installed?? I'm very confused please help......
Let's try a standalone Apple Mobile Device Support install. It still might not install, but fingers crossed any error messages will give us a better idea of the underlying cause of why it's not installing under normal conditions.
Download and save a copy of the iTunesSetup.exe (or iTunes64setup.exe) installer file to your hard drive:
http://www.apple.com/itunes/download/
Download and install the free trial version of WinRAR:
http://www.rarlab.com/
Right-click the iTunesSetup.exe (or iTunes64setup.exe), and select "Extract to iTunesSetup" (or "Extract to iTunes64Setup"). WinRAR will expand the contents of the file into a folder called "iTunesSetup" (or "iTunes64Setup").
Go into the folder and doubleclick the AppleMobileDeviceSupport.msi (or AppleMobileDeviceSupport64.msi) to do a standalone AMDS install.
(If it offers you the choice to remove or repair, choose "Remove", and if the uninstall goes through successfully, see if you can reinstall by doubleclicking the AppleMobileDeviceSupport.msi again.)
Does it install (or uninstall and then reinstall) properly for you? If so, can you get a normal iTunes install to go through properly now?
If instead you get an error message during the install (or uninstall), let us know what it says. (Precise text, please.) -
I have iphone 4; tried to sync it said I need to update software so I clicked ok - it then said I need to restore and did above got to stage 3, clicked restore and update, but it comes up with an error saying iphone cannot be found Please help!!!
Dear Jody..jone5
Good for you that can't update your iphone because I did it and my iphone dosen't work for example I can't download any app like Wecaht or Twitter..
Goodluck
Atousa -
Error says iphone cannot be detected by itunes
AN ERROR SAYS: IPHONE CANNOT BE CONNECTED TO ITUNES, BECAUSE IT CANNOT BE DETECTED
Is your computer usb port usb 2 ? it should work directly connected (no hub).
-
I cannot install Itunes and Icloud on my Sony Vaio Laptop - Window 7. Error says " computer/system not modified". Please help me with this problem.
Hello there, jag123059.
The following Knowledge Base article offers up some great steps to follow for resolving issues with installing iTunes:
Issues installing iTunes or QuickTime for Windows
http://support.apple.com/kb/ht1926
Thanks for reaching out to Apple Support Communities.
Cheers,
Pedro. -
Hi,
After using sql loader to import informations in the table fa_mass_additions and after the functionnal uses a treatment to imputate this assets, it asks me to do an update on the table fa_additions to change the value of attribute1 but i get an error
Error report:
ORA-01779: cannot modify a column which maps to a non key-preserved table
ORA-06512: at line 11
01779. 00000 - "cannot modify a column which maps to a non key-preserved table"
*Cause: An attempt was made to insert or update columns of a join view which
map to a non-key-preserved table.
*Action: Modify the underlying base tables directly.
please how can i do this update?Hi,
The "fa_additions" is a view, not a table.
You should update the base table "fa_additions_b".
Regards,
Bashar -
EI everytime I try to buy a pack off of games of war an error appears saying it cannot connect to iTunes stite! Please I need help
Hey there julyduque,
Welcome to Apple Support Communities.
The article linked below provides troubleshooting tips that can help you resolve the issue connecting to the iTunes Store on your iPhone 5s when trying to make in-app purchases.
Can't connect to the iTunes Store - Apple Support
If you haven't been able to connect to the iTunes Store:
Make sure your date, time, and time zone are correct in Settings > General > Date & Time.
Note: Time Zone may list another city in your time zone.
Make sure that your iOS software is up to date by tapping Settings > General > Software Update (iOS 5 or later) or connecting your iOS device to iTunes and clicking Check for Update on your device's Summary page.
Check and verify that you're in range of a Wi-Fi router or base station. If you're on a device with cellular service, make sure that cellular data is turned on from Settings > General > Cellular.
Note: If connected to cellular data, larger items may not download. You may need to connect to Wi-Fi to download apps, videos, and podcasts.
Make sure that you have an active Internet connection. You can check the user guide for your device for help with connecting to the Internet.
Make sure that other devices (portable computers, for example) are able to connect to the Wi-Fi network and access the Internet.
Try resetting (turning off and then on again) your Wi-Fi router.
If the issue persists, try troubleshooting your Wi-Fi networks and connections.
If that doesn't resolve the issue, try updating your payment information as suggested in this article:
If you don’t see your in-app purchases - Apple Support
Get more help
If you can't make an in-app purchase, try updating your payment information.
Ciao,
-Jason -
Unable to Insert record In forms: error -ORA-01779 :cannot modify a column
Hi,
I have created one form with two block.
Block-1 : Based on View
Block-2 : Based on table
There is is relationship between Block-1 and Block-2.
Block-1 is populating from LOV.
I just need to insert /update record Block-2 based on data from Block-1
So Block-1 I have made read only at runtime (Inser/update all properties are false).
Now when I insert record in Block-2 based on record from block-1, and getting below error.
"ORA-01779: cannot modify a column which maps to a non key-preserved table"
It is not allowing to insert record.
Please help me.
SubirThe error states that there is some operation on a view, not an a table.
Now when I insert record in Block-2 based on record from block-1What does that mean? How do you insert records in block 2?
When exactly occurs the error?
Maybe you are looking for
-
After upgrading to Mavericks on my MacBook, I'm not able to download third party applications like Dropbox and MyCleanMac 2. After clicking the download button, the screen just turns dark and is frozen. Any idea what is happening?
-
Partial Payment posting in AR and clearing of invoice on fifo basis
Dear Gurus, It is related to partial incoming payment in AR and clearing of invoices on FIFO basis, let me clarify my requiremnt through an Example Assume there an ivoice of PKR 100,000 in customer Account XYZ Company received partial PAyment of PKR
-
TS1741 Can I mirror websites from iPad to apple tv
Just purchased apple tv just want to know if I am accessing various web sites on my iPad can I mirror them so I can watch on my tv
-
Hi Everyone, Armen Abrahamyan kindly supplied the code necessary to bring a "moused over" button object to the top of a z-order. Meaning, if I've got button objects a_mc, b_mc, and c_mc slightly overlapped one over the other, that mousing over any on
-
I'm using a keyboard event to trigger FullScreen. When I exit fullscreen the application loses focus and the keyboard event won't fire. I've tried to use javascript to reset the focus, but the event still won't fire. Any idea how to set the focus bac