jeff5656 Posted August 16, 2009 Share Posted August 16, 2009 I have this code: $pat = $patient; $pat.= ' '; $pat.= $mrn; header("Location: newcall.php?id=".$pulmonologist."&id2=".$calldate."&id3=".$pat); then when it goes to newcall.php I have: <?php if ($_GET['id']){ echo $_GET['id']." notified on "; echo date("m/d/Y @ H:i", strtotime($_GET['id2'])); echo " for ".$_GET['id3']; }?> But id3 echoes ONLY the value for $patient. Why is the other part of $pat not getting trasnferred into $_GET['id3']? Here's my address bar: http://localhost/telephone/newcall.php?id=jennings&id2=2009-08-15%2021:14:18&id3=ggg 555 so the id3 seems to carry over at least. In above example $mrn is 555 and $patient is ggg, in answer to below response to echo mrn. Link to comment https://forums.phpfreaks.com/topic/170467-combining-2-variables-into-one/ Share on other sites More sharing options...
mikesta707 Posted August 16, 2009 Share Posted August 16, 2009 print_r or echo $mrn and make sure it is actually storing data Link to comment https://forums.phpfreaks.com/topic/170467-combining-2-variables-into-one/#findComment-899205 Share on other sites More sharing options...
jeff5656 Posted August 16, 2009 Author Share Posted August 16, 2009 Oh I think I know. The   is screwing it up because of the & sign! I guess I have to use a real space instead of  . Link to comment https://forums.phpfreaks.com/topic/170467-combining-2-variables-into-one/#findComment-899207 Share on other sites More sharing options...
Jessica Posted August 16, 2009 Share Posted August 16, 2009 In urls a space is %20 Link to comment https://forums.phpfreaks.com/topic/170467-combining-2-variables-into-one/#findComment-899219 Share on other sites More sharing options...
roopurt18 Posted August 16, 2009 Share Posted August 16, 2009 urlencode() Link to comment https://forums.phpfreaks.com/topic/170467-combining-2-variables-into-one/#findComment-899275 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.