dadamssg Posted March 26, 2009 Share Posted March 26, 2009 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 More sharing options...
dadamssg Posted March 26, 2009 Author Share Posted March 26, 2009 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! Link to comment https://forums.phpfreaks.com/topic/151188-header-prob-not-because-of-misplacement/#findComment-794224 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.