Jump to content

combining 2 variables into one


jeff5656

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.