co.ador Posted January 5, 2010 Share Posted January 5, 2010 the header in my local server is working but in the hosted server is not! header('Location: step3.php'); thank you! Quote Link to comment https://forums.phpfreaks.com/topic/187306-header-function-is-not-working-in-the-host-server/ Share on other sites More sharing options...
RaythMistwalker Posted January 5, 2010 Share Posted January 5, 2010 header("location: step3.php"); try with " instead of ' and l instead of L. dunno why the server im on doesnt like other way Quote Link to comment https://forums.phpfreaks.com/topic/187306-header-function-is-not-working-in-the-host-server/#findComment-989121 Share on other sites More sharing options...
co.ador Posted January 5, 2010 Author Share Posted January 5, 2010 this is the warning error it's trowing <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home3/nyhungry/public_html/includes/header.php:7) in <b>/home3/nyhungry/public_html/step2.php</b> on line <b>14</b><br /> there is a header sent in header.php which is included in step2.php but i don't know how the host server is set up to accept one hearder when in my local wamp server it accept several header. Any way how can that be fixed? i will try the double quotes Quote Link to comment https://forums.phpfreaks.com/topic/187306-header-function-is-not-working-in-the-host-server/#findComment-989125 Share on other sites More sharing options...
co.ador Posted January 5, 2010 Author Share Posted January 5, 2010 have to say that the double quotes didn't quite worked. Quote Link to comment https://forums.phpfreaks.com/topic/187306-header-function-is-not-working-in-the-host-server/#findComment-989128 Share on other sites More sharing options...
KevinM1 Posted January 5, 2010 Share Posted January 5, 2010 We have a stickied thread in this section describing fixes to common "headers already sent" errors: http://www.phpfreaks.com/forums/index.php/topic,37442.0.html Quote Link to comment https://forums.phpfreaks.com/topic/187306-header-function-is-not-working-in-the-host-server/#findComment-989136 Share on other sites More sharing options...
co.ador Posted January 6, 2010 Author Share Posted January 6, 2010 header.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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link type="text/css" href="stylesheets/main.css" rel="stylesheet" media="all" /> <script type="text/javascript" src="scripts/prototype.js"></script> <script type="text/javascript" src="scripts/rating.js"></script> <!--[if IE 5]><link rel="stylesheet" type="text/css" href="stylesheets/ie-5.0+5.5.css" /><![endif]--> <!--[if IE 6]><link rel="stylesheet" type="text/css" href="stylesheets/ie-6.0.css" /><![endif]--> <!--[if IE 7]><link rel="stylesheet" type="text/css" href="stylesheets/ie-7.0.css"/><![endif]--> <!--[if IE 8]><link rel="stylesheet" type="text/css" href="stylesheets/ie-8.0.css"/><![endif]--> <title>www.lala.com</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script type="text/javascript"> ( function() { var default_image = $('td.largethumb img').attr('src'); $('table.smallthumbs a').mouseover(function() { $('td.largethumb img').attr('src', $('img', this).attr('src')); }); }); </script> </head> <body> <?php include_once("includes/usersOnline.class.php");?> <?php require_once("includes/connection.php");?> <?php require_once("classes/include.all.php");?> <?php require_once("includes/functions.php");?> <div id="sidebar1"> <h1><a href="index.php" title="nyhungry.com">ny.hungrylogo</a></h1> <ul id="mainNav"> <li class="home"><a href="index.php" title="All inside lala.com" class="first">Home</a></li> <li id="takeouts"><a href="step1.php" title="Information abouts">Contact Us</a></li> step3.php <?php include("includes/header.php");?> <div id="tresdos"><?php $name = $_POST['username']; $email = $_POST['email']; $text = $_POST['message']; //TO, Subject, Message, Header mail('mary@hotmail.com','Contact us Message',$text,'From:'.$name.'<'. $email.'>'); header("location: step3.php");?></div> <?php mysql_close($connection);?> <?phpDatabase::DeInitialize();?> <?php include("includes/footer.php");?> i have taken all the white space before and after php tags and still displaying this warning <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home3/lala/public_html/includes/header.php:6) in <b>/home3/lala/public_html/step2.php</b> on line <b>8</b><br /> </div> The file phpdatabase.php could not be found. don't get why any help? Quote Link to comment https://forums.phpfreaks.com/topic/187306-header-function-is-not-working-in-the-host-server/#findComment-989259 Share on other sites More sharing options...
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.