Mr_J Posted September 9, 2008 Share Posted September 9, 2008 $email = (header location: http://.... ); or $email = (header location: /xxx/xxx.php); Can this be done like that? I just "echo" the vars on, as you guessed, CONTACT US... My SendMailForm is located on another folder, which requires a different usr name & password. Also, do I have to include the username & password in the vars? This site is HTML primarily with PHP functions... Quote Link to comment https://forums.phpfreaks.com/topic/123444-link-is-in-a-var/ Share on other sites More sharing options...
JonnoTheDev Posted September 9, 2008 Share Posted September 9, 2008 Bad syntax. Should be: header("Location: mypage.php"); Quote Link to comment https://forums.phpfreaks.com/topic/123444-link-is-in-a-var/#findComment-637547 Share on other sites More sharing options...
BlueSkyIS Posted September 9, 2008 Share Posted September 9, 2008 exactly what are you trying to do? Quote Link to comment https://forums.phpfreaks.com/topic/123444-link-is-in-a-var/#findComment-637558 Share on other sites More sharing options...
Mr_J Posted September 10, 2008 Author Share Posted September 10, 2008 Simply load the contact us page which echo the tel, fax no etc. exactly what are you trying to do? If the user want to e-mail or have any comments, they must click the "e-mail me" link which must call the "mailform.php" I know I`m a noob flying high... I get alot of pressure from my boss(Father) to code, code, code!!! Quote Link to comment https://forums.phpfreaks.com/topic/123444-link-is-in-a-var/#findComment-638162 Share on other sites More sharing options...
DamienRoche Posted September 10, 2008 Share Posted September 10, 2008 From my understanding you are trying to achive this: $email = "mailme.php"; header("location:$email"); declaring the $email variable will not work because the header has to be first: <?php header("location:blah.php"); ////script ?> That's the extent of my knowledge on the matter maybe you could use an include and then have the header in that, at least then you could declare a variable first. Not sure if that would work. I've always had trouble with simple redirects contained in the middle of a script. Quote Link to comment https://forums.phpfreaks.com/topic/123444-link-is-in-a-var/#findComment-638164 Share on other sites More sharing options...
Mr_J Posted September 10, 2008 Author Share Posted September 10, 2008 Thank you DamienRoche I just added the "header" it WORKS!!!! "Solved" Quote Link to comment https://forums.phpfreaks.com/topic/123444-link-is-in-a-var/#findComment-638207 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.