otuatail Posted March 24, 2007 Share Posted March 24, 2007 simple text manipiulation question I am a data collection freak and there is a section of a website that collects data into a databse. This section opens up a new browser with it's website and adds data to the database. $link = $_REQUEST['destination']; // $link .= " " . "target=_blank"; $val = $_REQUEST['val']; mailto($val); StoreData($val); header('Location: ' . $link); I can't add the commented out line to create a new browser. have tried " ' ' " and ' " " ' Any sugestion. Des Quote Link to comment Share on other sites More sharing options...
Hell Toupee Posted March 24, 2007 Share Posted March 24, 2007 target=_blank is html, not php so it won't work. There's a Window-Target parameter with header() but if memory serves me right there's difficulties with passing information on or opening up a new window, I'd recommend just mixing the php code up with javascript and using window.open or something similar. Quote Link to comment Share on other sites More sharing options...
dswain Posted March 24, 2007 Share Posted March 24, 2007 What does the data in $_REQUEST['destination'] look like? I don't think you can just append the target='_blank' code to it and it would need to be inside of the <a> tag itself. Quote Link to comment Share on other sites More sharing options...
otuatail Posted March 24, 2007 Author Share Posted March 24, 2007 Thanks for that. This is odd but this part of page 1 <td class="Info"><a href="redirect_me.php?destination=http://www.changinglivesonline.org&val=Change Lives">Changing Lives on line</a></td> Page 2 <? include ("functions.inc"); session_start(); $link = $_REQUEST['destination']; // $link .= " " . "target=_blank"; $val = $_REQUEST['val']; mailto($val); StoreData($val); header('Location: ' . $link); ?> Does this help ? Quote Link to comment 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.