Jump to content

header prob not because of misplacement


dadamssg

Recommended Posts

im writing a register script and want to redirect someone after they create an account...so its the very last line of my register script...the register script doesn't output anything...it sets variables to be outputted in a the form but doesn't output anything itself. the warning says this

 

Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/test/cleandata.php:1) in /home/public_html/test/register.php on line 162

 

this is the cleandata script used to strip tags...

 

<?php
function clean_data($variable)
{
include("caneck.inc");
   $cxn = mysqli_connect($host,$user,$passwd,$dbname) or die("Couldn't connect"); 
   return mysqli_real_escape_string($cxn, strip_tags($variable));
}

function clean_post($string)
{
include("caneck.inc");
$cxn = mysqli_connect($host,$user,$passwd,$dbname) or die("Couldn't connect");
return mysqli_real_escape_string($cxn, trim(strip_tags($string)));
   
} 
?> 

Link to comment
https://forums.phpfreaks.com/topic/151188-header-prob-not-because-of-misplacement/
Share on other sites

wierd...i just copy and pasted the cleandate.php include file in the register script and it works...id much rather prefer it out so i can just include it in other files and use them much easier...so if anyone has any ideas thatd be much appreciated!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.