calmchess Posted June 22, 2010 Share Posted June 22, 2010 Ok this if statement and code works well untill i get to the header redirect instead of the url being........... http://www.privatechatnow.com/yahoo_video_chat/models/login/adlogin.php#p1....................it come through as http://www.privatechatnow.com/yahoo_video_chat/models/login/adlogin.php.......the #p1 is missing! but if i remove the header redirect from the if statements it works without a hitch ...........please help before my hair is gone. $arr0 = array(); if(isset($_POST['updathomepic'])){ $charr0=array($_POST['check0'],$_POST['check1'],$_POST['check2']); $scharr0=array_search("1",$charr0); $_POST['value1st']=$scharr0+1; array_splice($charr0,$scharr0,1,"0"); $sch2arr0=array_search("1",$charr0); if($sch2arr0!==False){ $_POST['err']="twice"; }else{ $_POST['err']="once"; echo"<h1> Once</h1>" ; updatehomepic($_POST['value1st'],"","","",600,800,255,255,255,255,"aa"); header('Location: http://www.privatechatnow.com/yahoo_video_chat/models/login/adlogin.php#p1'); } } Link to comment https://forums.phpfreaks.com/topic/205590-header-doesnt-redirect-properlywrong-url/ Share on other sites More sharing options...
radar Posted June 22, 2010 Share Posted June 22, 2010 have you tried using double quotes instead of singles like this: header("LOCATION: http://www.privatechatnow.com/yahoo_video_chat/models/login/adlogin.php#p1"); ? Link to comment https://forums.phpfreaks.com/topic/205590-header-doesnt-redirect-properlywrong-url/#findComment-1075822 Share on other sites More sharing options...
calmchess Posted June 22, 2010 Author Share Posted June 22, 2010 same problem Link to comment https://forums.phpfreaks.com/topic/205590-header-doesnt-redirect-properlywrong-url/#findComment-1075824 Share on other sites More sharing options...
radar Posted June 22, 2010 Share Posted June 22, 2010 let me see what i can figure out.. give me 5 minutes. i can't recreate the error if its removing #p1 from the url. I tried it in IE8 and Firefox. Looked @ the address bar, and i see #P1 Link to comment https://forums.phpfreaks.com/topic/205590-header-doesnt-redirect-properlywrong-url/#findComment-1075825 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.