f



can't get the $_GET['id'] after the header is sent but page doesn't redirect

 In the first if,  the page is displayed without any company cars
selected.  If there is a company selected, then the id value is posted
and captured by the redirect (1st elseif).  Then one of two things can
happen.  The final else the selected company/id cars get displayed  in
the browser, or in the case of a post to a form for excel, the a
header gets sent to the to the current_sightingsXL.php page.  The
current_sightingsXL.php and current_sightings.php pages test out.
The second elseif works with one minor problem.   I have to type in
the  url with the id to get it to download to excel.


if{XXXX
}elseif($_POST['redirect']&&$_POST['redirect']!=$_SERVER['PHP_SELF']){
      Header("Location: ".$_POST['redirect'].".php?id=".$_POST['id']);
      exit;
}elseif($_POST['assign']=='Open in Excel'){
	Header("Location:  current_sightingsXL.php?id=".$_GET:['id']);
	exit;
}else{
xxxxx};

When the first elseif gets hit then this happens in the url:
http://www.allcapitalrail.com/current_sightings.php?id=117

Then if I post the button to excel, this should happen but it doesn't:
www.allcapitalrailXL.com?id=117

However, if I type the above line in the url then the excel download
works.  What happens is when I click the excel post button the get id
doens't get into the url.  I get
www.allcapitalrail.com which starts over.  But at this point if I type
in the www.allcapitalrail.com/current_sightingsXL.php?id=117
then it does work.   I thought maybe it was seeing the first elseif
post and doing that redirect over but I changed the order of the
elseif's and it still happens.

 Is the reason that the id doesn't get sent to the the XL page because
the user doesn't get redirected to that page??  They  stay on the
current_sightings.php page and the header gets sent and the download
to excel happens.  If it did get redirected to the
current_sightingsXL.php page would it then work?  Is there a hack to
get this to work then I'm done.

thanks,
0
jlrough (485)
1/7/2009 1:10:55 AM
comp.lang.php 32646 articles. 0 followers. Post Follow

7 Replies
1380 Views

Similar Articles

[PageSpeed] 48

On Tue, 6 Jan 2009 17:10:55 -0800 (PST), JRough <jlrough@yahoo.com>
wrote:

>      Header("Location: ".$_POST['redirect'].".php?id=".$_POST['id']);

>	Header("Location:  current_sightingsXL.php?id=".$_GET:['id']);

POST or GET?


-- 
Regards, Paul Herber, Sandrila Ltd.  http://www.sandrila.co.uk/          
0
1/7/2009 1:41:05 AM
JRough wrote:
>  In the first if,  the page is displayed without any company cars
> selected.  If there is a company selected, then the id value is posted
> and captured by the redirect (1st elseif).  Then one of two things can
> happen.  The final else the selected company/id cars get displayed  in
> the browser, or in the case of a post to a form for excel, the a
> header gets sent to the to the current_sightingsXL.php page.  The
> current_sightingsXL.php and current_sightings.php pages test out.
> The second elseif works with one minor problem.   I have to type in
> the  url with the id to get it to download to excel.
> 
> 
> if{XXXX
> }elseif($_POST['redirect']&&$_POST['redirect']!=$_SERVER['PHP_SELF']){
>       Header("Location: ".$_POST['redirect'].".php?id=".$_POST['id']);
>       exit;
> }elseif($_POST['assign']=='Open in Excel'){
> 	Header("Location:  current_sightingsXL.php?id=".$_GET:['id']);
> 	exit;
> }else{
> xxxxx};
> 
> When the first elseif gets hit then this happens in the url:
> http://www.allcapitalrail.com/current_sightings.php?id=117
> 
> Then if I post the button to excel, this should happen but it doesn't:
> www.allcapitalrailXL.com?id=117
> 
> However, if I type the above line in the url then the excel download
> works.  What happens is when I click the excel post button the get id
> doens't get into the url.  I get
> www.allcapitalrail.com which starts over.  But at this point if I type
> in the www.allcapitalrail.com/current_sightingsXL.php?id=117
> then it does work.   I thought maybe it was seeing the first elseif
> post and doing that redirect over but I changed the order of the
> elseif's and it still happens.
> 
>  Is the reason that the id doesn't get sent to the the XL page because
> the user doesn't get redirected to that page??  They  stay on the
> current_sightings.php page and the header gets sent and the download
> to excel happens.  If it did get redirected to the
> current_sightingsXL.php page would it then work?  Is there a hack to
> get this to work then I'm done.
> 
> thanks,

Well, first of all, the domain www.allcapitalrailXL.com does not exist.

And you need a userid/password to get to the current_sightings.php, so I 
can't test to see what you're doing.

I didn't go any farther.


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
jstucklex (14659)
1/7/2009 1:59:21 AM
On Jan 6, 5:41=A0pm, Paul Herber <SubstituteMyFirstNameH...@pherber.com>
wrote:
> On Tue, 6 Jan 2009 17:10:55 -0800 (PST), JRough <jlro...@yahoo.com>
> wrote:
>
> > =A0 =A0 =A0Header("Location: ".$_POST['redirect'].".php?id=3D".$_POST['=
id']);
> > =A0 =A0Header("Location: =A0current_sightingsXL.php?id=3D".$_GET:['id']=
);
>
> POST or GET?
>
> --
> Regards, Paul Herber, Sandrila Ltd. =A0http://www.sandrila.co.uk/=A0 =A0 =
=A0 =A0 =A0

The first else if is a post.  I asked this question last week.  I am
not fully sure why but there is a post in the page source.
The second one is a get.  The reason is there is no more post on the
xl page so it should be a get but since the header only gets sent
there and the page doesn't get redirected there I don't know.  Here is
the page source.  I noticed there is one missing </form> tag.  There
should be two forms.  One for the selection and one for the excel
post.
table>
	  		<th><a href=3D'current_sightings.php?id=3D117&order_by=3Dl_e'>L_E</a><=
/
th>
			<th><a href=3D'current_sightings.php?id=3D117&'>Carnumber</a></th>
			<th>Type</th>
			<th><a href=3D'current_sightings.php?
id=3D117&order_by=3Dlocation'>Location</a></th>

			<th><a href=3D'current_sightings.php?
id=3D117&order_by=3Dsighting_date'>Sighting Date</a></th>
			<th><a href=3D'current_sightings.php?
id=3D117&order_by=3Dclassification'>Code</a></th>
			<th><a href=3D'current_sightings.php?id=3D117&order_by=3Drailroad'>RR</
a></th>
			<th><a href=3D'current_sightings.php?id=3D117&order_by=3Dorigin'>Origin<=
/
a></th>
			<th><a href=3D'current_sightings.php?
id=3D117&order_by=3Ddestination'>Destination</a></th>
			<th><a href=3D'current_sightings.php?id=3D117&order_by=3Deta'>ETA</a></
th><tr >

  		<td align=3D'center'>E</td>
  		<td><a href=3D'clm_history.php?mark=3DALLX&num=3D3211'>ALLX003211</a></
td>
  		<td align=3D'center'>LO</td>
  		<td>UNIBRIDGE, MD</td>
		<td>07-09-2008 04:05 PM</td>
  		<td>Actual Placement</td>

  		<td>MMID</td>
  		<td>BALPENMAR, MD</td>
  		<td>UNIBRIDGE, MD</td>
  		<td align=3D'center'>at destination</td>
	  </tr><tr class=3D'trbg'>
  		<td align=3D'center'>L</td>
  		<td><a href=3D'clm_history.php?mark=3DALLX&num=3D3244'>ALLX003244</a></
td>

  		<td align=3D'center'>LO</td>
  		<td>ALSEN, NY</td>
		<td>07-09-2008 01:00 PM</td>
  		<td>Arrival at Destination</td>
  		<td>CSXT</td>
  		<td>CURBAY, MD</td>

  		<td>ALSEN, NY</td>
  		<td align=3D'center'>at destination</td>
	  </tr><tr class=3D'trbg'>
  		<td align=3D'center'>L</td>
  		<td><a href=3D'clm_history.php?mark=3DALLX&num=3D3264'>ALLX003264</a></
td>
  		<td align=3D'center'>LO</td>
  		<td>ALSEN, NY</td>


     	<td align=3Dcenter>

     	<form action =3D"/current_sightings.php" method=3Dpost>

        <INPUT TYPE =3D "image" SRC=3D'http://www.allcapitalrail.com/
images/excel3.jpg'
       VALUE =3D"Open in Excel" ALT=3D"Open in Excel" NAME=3D"assign"></
form>
     </tr>
This is after a selection is made.

Here also is the current_sightingsXL.php page.  It does work.  It is
the internal user.  The one on this page is a GET and it needs to GET
it from the url and it isn't there and I CAN'T FIGURE OUT WHY.

Validate_login("current_sightings.php");


switch ($_SESSION["LMS_USER_DESC"]){
   case "customer":
      $id =3D $_SESSION["LMS_LOGGED_IN"];
      $result =3D SELECT_sightings_customercars($id,CLM_order_by
($order_by));
      break;
   case "internal":
  $lease_id =3D $_GET['id'];
      $result =3D SELECT_sightings_leasecars($lease_id,CLM_order_by
($order_by));
      break;
    case "owner":

      $result =3D SELECT_sightings_ownercars($lease_id,CLM_order_by
($order_by));
      break;
 }


	$xclheader =3D array(
	            'Lease_Number',
			        'L_E',
                  'Carnumber', '',

                  'Location','' ,'Sighting_Date',

                  'Code',

			 'Railroad',  'Origin','',
                  'Destination','' ,

					'ETA'
			    );
	$xclfields =3D array(
	               'lease_num',
                  'l_e',
                  'car_mark','car_number',

		          'location_city','location_state','sighting_date',
	 'classification','railroad', 'origin_city','origin_state',
	'destination_city', 'destination_state',

		            'eta');



 $file_name =3D "Current_Sightings";




   	$header =3D makexclheader($xclheader);
   $data =3D makexcldata($xclfields,$result);


		if (empty($data)) {
			$data =3D "\n(0) Records Found!\n";}
	header("Content-type: application/xmsdownload");
	header("Content-Disposition: attachment; filename=3D".$file_name.date
("Y:m:d H:i").".xls");
	header("Pragma: no-cache");
	header("Expires; 0");

	print "$header\n$data";



function makexclheader($xclheader){
	$str =3D '';
	if (strlen($xclheader) !=3D=3D 0);
	for ($i=3D0; $i <sizeof($xclheader); $i++){
		$str .=3D  $xclheader[$i];
		$str .=3D "\t";
    	}
    $str . "\n";
return $str;
}

function makexcldata($xclfields,$result){
$numrows =3D mysql_num_rows($result);
$rowcount =3D1;
	if ($result && mySQL_num_rows($result)){
		while ($row =3D mysql_fetch_assoc($result)){
    		for($i =3D0; $i < sizeof($xclfields);$i++){
    		$value .=3D $row[$xclfields[$i]] ;
    		$value .=3D "\t";
    		}

   	$value .=3D "\n";

		}
	$data =3D $value;
	return $data;
	}
}

thanks,
0
jlrough (485)
1/7/2009 2:11:53 AM
On Jan 6, 5:59=A0pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> JRough wrote:
> > =A0In the first if, =A0the page is displayed without any company cars
> > selected. =A0If there is a company selected, then the id value is poste=
d
> > and captured by the redirect (1st elseif). =A0Then one of two things ca=
n
> > happen. =A0The final else the selected company/id cars get displayed =
=A0in
> > the browser, or in the case of a post to a form for excel, the a
> > header gets sent to the to the current_sightingsXL.php page. =A0The
> > current_sightingsXL.php and current_sightings.php pages test out.
> > The second elseif works with one minor problem. =A0 I have to type in
> > the =A0url with the id to get it to download to excel.
>
> > if{XXXX
> > }elseif($_POST['redirect']&&$_POST['redirect']!=3D$_SERVER['PHP_SELF'])=
{
> > =A0 =A0 =A0 Header("Location: ".$_POST['redirect'].".php?id=3D".$_POST[=
'id']);
> > =A0 =A0 =A0 exit;
> > }elseif($_POST['assign']=3D=3D'Open in Excel'){
> > =A0 =A0Header("Location: =A0current_sightingsXL.php?id=3D".$_GET:['id']=
);
> > =A0 =A0exit;
> > }else{
> > xxxxx};
>
> > When the first elseif gets hit then this happens in the url:
> >http://www.allcapitalrail.com/current_sightings.php?id=3D117
>
> > Then if I post the button to excel, this should happen but it doesn't:
> >www.allcapitalrailXL.com?id=3D117
>
> > However, if I type the above line in the url then the excel download
> > works. =A0What happens is when I click the excel post button the get id
> > doens't get into the url. =A0I get
> >www.allcapitalrail.comwhich starts over. =A0But at this point if I type
> > in thewww.allcapitalrail.com/current_sightingsXL.php?id=3D117
> > then it does work. =A0 I thought maybe it was seeing the first elseif
> > post and doing that redirect over but I changed the order of the
> > elseif's and it still happens.
>
> > =A0Is the reason that the id doesn't get sent to the the XL page becaus=
e
> > the user doesn't get redirected to that page?? =A0They =A0stay on the
> > current_sightings.php page and the header gets sent and the download
> > to excel happens. =A0If it did get redirected to the
> > current_sightingsXL.php page would it then work? =A0Is there a hack to
> > get this to work then I'm done.
>
> > thanks,
>
> Well, first of all, the domainwww.allcapitalrailXL.comdoes not exist.
>
> And you need a userid/password to get to the current_sightings.php, so I
> can't test to see what you're doing.
>
> I didn't go any farther.
>
> --
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

the domain does exist and you have to have the login page and I am
using it.
0
jlrough (485)
1/7/2009 2:12:38 AM
JRough wrote:
> On Jan 6, 5:59 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> JRough wrote:
>>>  In the first if,  the page is displayed without any company cars
>>> selected.  If there is a company selected, then the id value is posted
>>> and captured by the redirect (1st elseif).  Then one of two things can
>>> happen.  The final else the selected company/id cars get displayed  in
>>> the browser, or in the case of a post to a form for excel, the a
>>> header gets sent to the to the current_sightingsXL.php page.  The
>>> current_sightingsXL.php and current_sightings.php pages test out.
>>> The second elseif works with one minor problem.   I have to type in
>>> the  url with the id to get it to download to excel.
>>> if{XXXX
>>> }elseif($_POST['redirect']&&$_POST['redirect']!=$_SERVER['PHP_SELF']){
>>>       Header("Location: ".$_POST['redirect'].".php?id=".$_POST['id']);
>>>       exit;
>>> }elseif($_POST['assign']=='Open in Excel'){
>>>    Header("Location:  current_sightingsXL.php?id=".$_GET:['id']);
>>>    exit;
>>> }else{
>>> xxxxx};
>>> When the first elseif gets hit then this happens in the url:
>>> http://www.allcapitalrail.com/current_sightings.php?id=117
>>> Then if I post the button to excel, this should happen but it doesn't:
>>> www.allcapitalrailXL.com?id=117
>>> However, if I type the above line in the url then the excel download
>>> works.  What happens is when I click the excel post button the get id
>>> doens't get into the url.  I get
>>> www.allcapitalrail.comwhich starts over.  But at this point if I type
>>> in thewww.allcapitalrail.com/current_sightingsXL.php?id=117
>>> then it does work.   I thought maybe it was seeing the first elseif
>>> post and doing that redirect over but I changed the order of the
>>> elseif's and it still happens.
>>>  Is the reason that the id doesn't get sent to the the XL page because
>>> the user doesn't get redirected to that page??  They  stay on the
>>> current_sightings.php page and the header gets sent and the download
>>> to excel happens.  If it did get redirected to the
>>> current_sightingsXL.php page would it then work?  Is there a hack to
>>> get this to work then I'm done.
>>> thanks,
>> Well, first of all, the domainwww.allcapitalrailXL.comdoes not exist.
>>
>> And you need a userid/password to get to the current_sightings.php, so I
>> can't test to see what you're doing.
>>
>> I didn't go any farther.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================
> 
> the domain does exist and you have to have the login page and I am
> using it.

No, the domain www.allcapitalrailXL.com does NOT exist.  And I don't 
have a login for www.allcapitalrail.com.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
jstucklex (14659)
1/7/2009 2:18:28 AM
On Jan 6, 5:41=A0pm, Paul Herber <SubstituteMyFirstNameH...@pherber.com>
wrote:
> On Tue, 6 Jan 2009 17:10:55 -0800 (PST), JRough <jlro...@yahoo.com>
> wrote:
>
> > =A0 =A0 =A0Header("Location: ".$_POST['redirect'].".php?id=3D".$_POST['=
id']);
> > =A0 =A0Header("Location: =A0current_sightingsXL.php?id=3D".$_GET:['id']=
);
>
> POST or GET?
>
> --
> Regards, Paul Herber, Sandrila Ltd. =A0http://www.sandrila.co.uk/=A0 =A0

In the first elseif the id is a post because it is posted in a form.
I can show you the template_carlist.php template below.  This is where
the first POST id captured actually.  Also below that form is a icon
with a value "Post to Excel" that also gets posted.  Then the id needs
to be passed onto the current_sightingsXL.php page if it has excel
posted.

=A0 =A0 =A0

You may have hit on something.  I went into view source page and
noticed it is redirecting to current_sightings.php in the form instead
of current_sightingsXL.php.    The reason is there is a
template_carlist.php that has the excel post button on it.   It
directs to PHP_SELF instead of to current_sightingsXl.php

?>



<table width=3D"100%" border=3D"0" cellpadding=3D"0" cellspacing=3D"0"
class=3D"content">
  <tr>
    <td width=3D<?=3DGetMenuwidth()?>% valign=3D"top" class=3D"columL">
		<table width=3D"100%" height=3D"100%" border=3D"0" cellpadding=3D"0"
cellspacing=3D"0">
                <tr>
                  <td class=3D"titTable1"><div id=3D"imgTitL"><img src=3D"<=
?=3D
$SETTINGS['siteurl']?>images/transparent.gif" width=3D"10" height=3D"10"></
div>
            <?=3D$MSG_276a; ?><!-- div id=3D"imgTitR"><img src=3D"<?=3D
$SETTINGS['siteurl']?>images/transparent.gif" width=3D"10" height=3D"10"></
div --></td>
                </tr>
                <tr>
                  <td class=3D"table1"><div id=3D"table1ul">
            	<? include $template_path."menu.php.html"; ?>
            	</div></td>
                </tr>
              </table>

	</td>
    <td valign=3D"top">



	<table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0"
class=3D"maincolu

	  <tr>
		<td class=3D"titTable2"><div id=3D"imgTitL"><img src=3D"<?=3D$SETTINGS
['siteurl']?>images/transparent.gif" width=3D"20" height=3D"10"></div>

            <?=3D$MSG_carlist?></td>

	  <tr>
	  <td>
		<?=3D$TPL_carnumbers;?>
	  </td>

     </table>
      <tr>
        <td></td>

        <td></td>
     	<td align=3Dcenter>
     	<form action =3D"<?=3D$_SERVER['PHP_SELF']?>" method=3Dpost>

        <INPUT TYPE =3D "image" SRC=3D'<?=3D$SITEURL."images/excel3.jpg"?>'
       VALUE =3D"Open in Excel" ALT=3D"Open in Excel" NAME=3D"assign"></
form>
     </tr>
  </tr>

     </td>
      </tr>


The problem is I can't change it because it works for other pages.
Can I change this form action if the input value is "Open in Excel"
and the page is current_sightings can I then and only then redirect it
to current_sightingsXl.php?

if you can tell me how to do that maybe it will work and I will be
done.


I don't know if it should direct to current_sightingsXL.php then the
user would be on the wrong page but the validate login might kick it
back to current_sightings?  I'll enclose current_sightingsXL.php
below.  All the other pages stay on the PHP_SELF page and it works but
those pages don't pass any values in the url.
thanks,
-------current_sightingsXL.php--------
Validate_login("current_sightings.php");


switch ($_SESSION["LMS_USER_DESC"]){
   case "customer":
      $id =3D $_SESSION["LMS_LOGGED_IN"];
      $result =3D SELECT_sightings_customercars($id,CLM_order_by
($order_by));
      break;
   case "internal":
  $lease_id =3D $_GET['id'];
      $result =3D SELECT_sightings_leasecars($lease_id,CLM_order_by
($order_by));
      break;
    case "owner":

      $result =3D SELECT_sightings_ownercars($lease_id,CLM_order_by
($order_by));
      break;
 }


	$xclheader =3D array(
	            'Lease_Number',
			        'L_E',
                  'Carnumber', '',

                  'Location','' ,'Sighting_Date',

                  'Code',

			 'Railroad',  'Origin','',
                  'Destination','' ,

					'ETA'
			    );
	$xclfields =3D array(
	               'lease_num',
                  'l_e',
                  'car_mark','car_number',

		          'location_city','location_state','sighting_date',
	 'classification','railroad', 'origin_city','origin_state',
	'destination_city', 'destination_state',

		            'eta');



 $file_name =3D "Current_Sightings";




   	$header =3D makexclheader($xclheader);
   $data =3D makexcldata($xclfields,$result);


		if (empty($data)) {
			$data =3D "\n(0) Records Found!\n";}
	header("Content-type: application/xmsdownload");
	header("Content-Disposition: attachment; filename=3D".$file_name.date
("Y:m:d H:i").".xls");
	header("Pragma: no-cache");
	header("Expires; 0");

	print "$header\n$data";



function makexclheader($xclheader){
	$str =3D '';
	if (strlen($xclheader) !=3D=3D 0);
	for ($i=3D0; $i <sizeof($xclheader); $i++){
		$str .=3D  $xclheader[$i];
		$str .=3D "\t";
    	}
    $str . "\n";
return $str;
}

function makexcldata($xclfields,$result){
$numrows =3D mysql_num_rows($result);
$rowcount =3D1;
	if ($result && mySQL_num_rows($result)){
		while ($row =3D mysql_fetch_assoc($result)){
    		for($i =3D0; $i < sizeof($xclfields);$i++){
    		$value .=3D $row[$xclfields[$i]] ;
    		$value .=3D "\t";
    		}

   	$value .=3D "\n";

		}
	$data =3D $value;
	return $data;
	}
}
0
jlrough (485)
1/7/2009 2:50:25 AM
On Jan 6, 5:41=A0pm, Paul Herber <SubstituteMyFirstNameH...@pherber.com>
wrote:
> On Tue, 6 Jan 2009 17:10:55 -0800 (PST), JRough <jlro...@yahoo.com>
> wrote:
>
> > =A0 =A0 =A0Header("Location: ".$_POST['redirect'].".php?id=3D".$_POST['=
id']);
> > =A0 =A0Header("Location: =A0current_sightingsXL.php?id=3D".$_GET:['id']=
);
>
> POST or GET?
>
> --
> Regards, Paul Herber, Sandrila Ltd. =A0http://www.sandrila.co.uk/=A0 =A0 =
=A0 =A0 =A0

In the first elseif the id is a post because it is posted in a form.
I can show you the template_carlist.php template below.  This is where
the first form POST id is captured.  Also below that form is a form
icon
with a value "Post to Excel" that also gets posted to a 2nd form.  The
id needs
to be passed onto the current_sightingsXL.php page from the first post
if it has excel
posted in the 2nd form.



You may have hit on something.  I went into view source page and
noticed it is redirecting to current_sightings.php in the first form
instead
of current_sightingsXL.php.    The reason is there is a
template_carlist.php that has the excel post button on it.   It
directs to PHP_SELF instead of to current_sightingsXl.php

?>

<table width=3D"100%" border=3D"0" cellpadding=3D"0" cellspacing=3D"0"
class=3D"content">
  <tr>
    <td width=3D<?=3DGetMenuwidth()?>% valign=3D"top" class=3D"columL">
                <table width=3D"100%" height=3D"100%" border=3D"0"
cellpadding=3D"0"
cellspacing=3D"0">
                <tr>
                  <td class=3D"titTable1"><div id=3D"imgTitL"><img src=3D"<=
?
=3D
$SETTINGS['siteurl']?>images/transparent.gif" width=3D"10"
height=3D"10"></
div>
            <?=3D$MSG_276a; ?><!-- div id=3D"imgTitR"><img src=3D"<?=3D
$SETTINGS['siteurl']?>images/transparent.gif" width=3D"10"
height=3D"10"></
div --></td>
                </tr>
                <tr>
                  <td class=3D"table1"><div id=3D"table1ul">
                <? include $template_path."menu.php.html"; ?>
                </div></td>
                </tr>
              </table>

        </td>
    <td valign=3D"top">

        <table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D=
"0"
class=3D"maincolu

          <tr>
                <td class=3D"titTable2"><div id=3D"imgTitL"><img src=3D"<?=
=3D
$SETTINGS
['siteurl']?>images/transparent.gif" width=3D"20" height=3D"10"></div>

            <?=3D$MSG_carlist?></td>

          <tr>
          <td>
                <?=3D$TPL_carnumbers;?>
          </td>

     </table>
      <tr>
        <td></td>

        <td></td>
        <td align=3Dcenter>
        <form action =3D"<?=3D$_SERVER['PHP_SELF']?>" method=3Dpost>

        <INPUT TYPE =3D "image" SRC=3D'<?=3D$SITEURL."images/excel3.jpg"?>'
       VALUE =3D"Open in Excel" ALT=3D"Open in Excel" NAME=3D"assign"></
form>
     </tr>
  </tr>

     </td>
      </tr>

The problem is I can't change PHP_SELF because it works for other
pages.
Can I change this form action if the input value is "Open in Excel"
and the page is current_sightings can I then and only then redirect it
to current_sightingsXl.php?

if you can tell me how to do that maybe it will work and I will be
done.

I don't know if it should direct to current_sightingsXL.php then the
user would be on the wrong page but the validate login might kick it
back to current_sightings?  I'll enclose current_sightingsXL.php
below.  All the other pages stay on the PHP_SELF page and it works but
those pages don't pass any values in the url.
thanks,
-------beginning of current_sightingsXL.php--------
Validate_login("current_sightings.php");

switch ($_SESSION["LMS_USER_DESC"]){
   case "customer":
      $id =3D $_SESSION["LMS_LOGGED_IN"];
      $result =3D SELECT_sightings_customercars($id,CLM_order_by
($order_by));
      break;
   case "internal":
  $lease_id =3D $_GET['id'];
      $result =3D SELECT_sightings_leasecars($lease_id,CLM_order_by
($order_by));
      break;
    case "owner":

      $result =3D SELECT_sightings_ownercars($lease_id,CLM_order_by
($order_by));
      break;
 }

0
jlrough (485)
1/7/2009 2:59:01 AM
Reply:

Similar Artilces:

I don't get why '>' doesn't get printed in the following example
When I do a here-document, the '>' character shows up to indicate the start of a newline. [cdalten@localhost ~]$ cat << EOF > My current directory is dir $PWD > EOF My current directory is dir /home/cdalten [cdalten@localhost ~]$ What prevents the '>' characters from showing up in the final output? On Jul 3, 10:35 am, Chad <cdal...@gmail.com> wrote: > When I do a here-document, the '>' character shows up to indicate the > start of a newline. > > [cdalten@localhost ~]$ cat << EOF> My current directory is dir $PWD > &...

Removing the letters 't' 'i' 'x' and 'y'
Im having trouble with figuring out how to write a function which will remove the letters 't' 'i' 'x' and 'y' from any input string in matlab. for example modstr(pixy) should result in ans = 'p' or modstr(picture) should result in ans = 'pcure' if anyone could offer any help or hints i would really appreciate it. Thank You >> modstr=@(s) s(~ismember(s,'tixy')) modstr = @(s)s(~ismember(s,'tixy')) >> modstr('picture') ans = pcure % Bruno ...

'is not' or '!='
A newbie question to you; what is the difference between statements like: if x is not None: and if x != None: Without any context, which one should be preferred? IMHO, the latter is more readable. On 2014-08-18 21:35, ElChino wrote: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: > > Without any context, which one should be preferred? > IMHO, the latter is more readable. > "x == y" tells you whether x and y refer to objects that are equal. "x is y" tells you whether x and y actually refer to the same object. In the case of singletons like None (there's only one None object), it's better to use "is". "ElChino" <elchino@cnn.cn>: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: Do the following: take two $10 bills. Hold one bill in the left hand, hold the other bill in the right hand. Now, the bill in the left hand "is not" the bill in the right hand. However, the bill in the left hand "==" the bill in the right hand. > Without any context, which one should be preferred? > IMHO, the latter is more readable. In almost all cases, both tests would result in the same behavior. However, the "is not" test is conceptually the correct one since you want...

'^=' and '~='?
Hello, What is the difference between '^=' and '~='? Thanks, Duckhye ...

if lisp can add any feature, then why doesn't it get used? I don't get it..
I really don't and for some odd reason I have this fascination with forth lisp smalltalk io haskell aggghhh!! On 2008-09-06 11:46:32 +0100, gavino <gavcomedy@gmail.com> said: > I really don't > > and for some odd reason I have this fascination with forth lisp > smalltalk io haskell > > aggghhh!! Isn't the answer *precisely* in your asking the question? Lisp is not used by "people who don't get it". Not because those that do are any smarter or born geniuses, but surely *because* they decided to put in *the effort* to learn and see "...

__getattribute__ doesn't work on 'type' type for '__class__'
I'm running this version of Python: Python 2.4.3 (#1, May 18 2006, 07:40:45) [GCC 3.3.3 (cygwin special)] on cygwin I read in the documentation that these two expressions are interchangeable: x.__getattribute__('name') <==> x.name From "pydoc __getattribute__": ---8<--- Help on method-wrapper object: __getattribute__ = class method-wrapper(object) | Methods defined here: | | __call__(...) | x.__call__(...) <==> x(...) | | __getattribute__(...) | x.__getattribute__('name') <==> x.name --->8--- Yet when I...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal''''''''''''''
Hello fellow programmers, I am trying to run an append/update query from code, a command button on a form initiates the queries. the format i am using is; _____________________________________________________ SELECT "criteria" FROM "criteria" WHERE "criteria" UPDATE/APPEND "field selections" RecordSource "qryExample" = above text strings" _______________________________________________________________________ When i am running a SELECT query in this manner it works fine with no problems, and accepts the values of specified linked form fields. This never works when doing an APPEND/UPDATE query. It can never find the values of linked form fields, Access always asks for the parameter value of the field(s) in question, or Access comes up with an error 3323 - No recordset. I am sure there are other people that have had this problem. What is the difference between Select queries and append/update queries? the append/update queries never seem to be able to find values in linked form fields. Can anyone shed any light on this or point to a knowledgebase Item, or even recommend a book focusing on this subject, I will go and buy it now. I have been for up 2 nights trying to acomplish this and now considering suicide, please help. Thanks In advance, Aaron. I know of two ways you can accomplish this. 1. You can create the SQL script for you append or update query and run the script with DoCmd.RunSQL. 2. You can create a...

Can't get 'CONNECT' response
I have an NEC laptop with an AGERE modem. I have a comms program which requires a CONNECT response after connecting to a remote modem. The modem dials and connects correctly but there is no response string. Have tried ATQ0, ATV1 but the modem still does not respond. Any ideas welcome! Thanks, Arthur "Arthur Richards" <fake@address.com.au> wrote in message news:3f946e42$1@dnews.tpgi.com.au... > I have an NEC laptop with an AGERE modem. > > I have a comms program which requires a CONNECT response after connecting to > a remote modem. The mode...

'do over' doesn't work
hi, why my code doesn't work with 'do over'. thanks. ash007. DATA TABLE_BIDON; INPUT X1 X2 X3 X4 X5 $; CARDS; 2 . 5 1161 AB=C9LIEN 35 6 3 1336 ALM=C9RIC 82 1 5 1499 ;RUN; DATA TABLE_BIDON (DROP =3D _I); SET TABLE_BIDON; ARRAY A_VARNUM[*] _NUMERIC_; ARRAY A_VARCAR[*] _CHARACTER_; DO OVER A_VARNUM[*]; IF A_VARNUM[*] =3D . THEN A_VARNUM[*] =3D 0; END; DO OVER A_VARCAR[*]; IF COMPRESS(A_VARCAR[*]) IN (".","") THEN A_VARCAR[*] =3D "Z"; END; RUN; ...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal'''''''''''''' #2
Hi, Thanks for ur help there HJ. I know how to do the tasks you specified there. I would like for the update query to use field values from some of the fields on the form (frmInvoices) such as InvoiceNumber, DateFrom, DateTo. My problem is that an append/update query can't find the values in the open Form (frmInvoices) when I specify them as; [Forms]![frmInvoices]![InvoiceNumber] a select query has no problem finding the field values on a form. please help. Aaron Hi Aaron, Could you post the entire code that you are having trouble with? Now it is not possible to see what goes wrong. HJ "Aaron" <aaron@rapid-motion.co.uk> wrote in message news:260d7f40.0408120245.2f3d01f8@posting.google.com... > Hi, > > Thanks for ur help there HJ. > > I know how to do the tasks you specified there. > > I would like for the update query to use field values from some of the > fields on the form (frmInvoices) such as InvoiceNumber, DateFrom, > DateTo. My problem is that an append/update query can't find the > values in the open Form (frmInvoices) when I specify them as; > > [Forms]![frmInvoices]![InvoiceNumber] > > a select query has no problem finding the field values on a form. > > please help. > > Aaron First off, if you are not always using all the parameters specified in your form, then you have to add parameters to your query on the fly. Also, you can't just do something like qdf.SQL = "SE...

if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.') Any shorter ?
Hi, there. =20 I'm just curious if it ever dawned on anybody how to abbreviate this line : if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.')=20 =20 Igor Kurbeko Clinical Programmer Analyst 678 336 4328 ikurbeko@atherogenics.com =20 no brain no pain =20 how about: if not (str_mo in ('','.') or str_da in ('','.') or str_yy in ('','.')) OR if not (missing(str_mo) or missing(str_da) or missing(str_yy)) Eric On 22 Oct 03 21:13:37 GMT, ikurbeko@ATHER...

unix2dos ( tr '\12' '\15\12' ) doesn't run
Hi, m3vmsa3.caddebug /tmp > tr '\12' '\15\12' < foo > foo.tr m3vmsa3.caddebug /tmp > od -t c foo 0000000 o n e \n t w o \n t h r e e \n 0000016 m3vmsa3.caddebug /tmp > od -t c foo.tr 0000000 o n e \r t w o \r t h r e e \r 0000016 Why does tr not add '\12' to foo.tr? Thanks in advance, Jose Luis On Tue, 18 Dec 2007 04:08:26 -0800 (PST), Jose Luis wrote: > > Hi, > > m3vmsa3.caddebug /tmp > tr '\12' '\15\12' < foo > foo.tr > m3vmsa3.caddebug /tmp > od -t c ...

Don't understand: when('foo' and/or 'bar')
Would someone be so kind to explain the following (quotes are for win32 perl): perl -E" $u='foo'; given($u){ when('foo' and 'bar'){say 'f'} default{say 'd'} } " d perl -E" $u='bar'; given($u){ when('foo' and 'bar'){say 'f'} default{say 'd'} } " f perl -E" $u='baz'; given($u){ when('foo' and 'bar'){say 'f'} default{say 'd'} } " d perl -E" $u='foo'; given($u){ when('foo' or 'bar'){say 'f'} default{...

I don't work for IBM and I don't make promises I can't deliver on
I wish I could afford an advertising campaign to compete with what they have on the Internet now. I promise to go totally ballistic at the next LLLNL contract. Robert. On 8/12/2011 11:24 PM, Robert Myers wrote: > I wish I could afford an advertising campaign to compete with what they > have on the Internet now. > > I promise to go totally ballistic at the next LLLNL contract. > > Robert. I don't work for IBM (anymore) either. If you are talking about the death of Blue Waters, I don't believe they said they couldn't deliver. They said they chose not to because they would lose a bunch of money on the project since it turned out to cost a lot more than the initial guess. And I guess Ben chose not to print some more to pay for it. On Aug 24, 11:17=A0pm, Del Cecchi <delcec...@gmail.com> wrote: > On 8/12/2011 11:24 PM, Robert Myers wrote: > > > I wish I could afford an advertising campaign to compete with what they > > have on the Internet now. > > > I promise to go totally ballistic at the next LLLNL contract. > > > Robert. > > I don't work for IBM (anymore) either. =A0If you are talking about the > death of Blue Waters, I don't believe they said they couldn't deliver. > They said they chose not to because they would lose a bunch of money on > the project since it turned out to cost a lot more than the initial guess= .. > > And I guess Ben chose not to print some mor...

Why do I get 'Can't activate network card' ?
Hi, I have RH8 and I am using Gnome GUI trying to connect to a LAN hub which connects to a router which connects to a cable modem to the web. My other boxes are XP and all are fine on the network and web. At this point I just need to get to the Internet not communicate the win network. When I try to Activate I get the message Can't Activate. This is my latest effort - but its still not getting to the network. with ifconfig I have.. Line 1. Link encap: Ethernet HWaddr 00:60 etc Line 2. UP BROADCAST etc Line 3. RX Pack 1161 errors - rest are 0's Line 4. TX packs all 0's Line 5. Collisions 0's - TX eque 0's Line 6. RX bytes 143421 TX 0 Line 7. Int 10 base o I also get a loopback congig which does give the inet address on the second line .. 127.0.01 Masl. 255.0.0.0. also UP LPPOP RUNNING With lspci I get the card.. 00:0d.0 Ethernet Controller: Realtek Semi Conductor Co .RTL-8139/ etc... lsmod I get.. 8139too -- I noticed this # is in the Realtek line. When I ping I get 'Network not reachable' I am lost here as I still cannot get to the network. I am missing something somewhere but have no clue where to go now. Rock wrote: > > Hi, > > I have RH8 and I am using Gnome GUI trying to connect to a LAN hub > which connects to a router which connects to a cable modem to the web. > > My other boxes are XP and all are fine on the network and web. At this > point I just need to get to the Internet not communicate t...

M$ can't create an OS that doesn't get sick from viruses
Read and weep Win### http://www.slashgear.com/microsoft-testing-fix-for-windows-phone-sms-bug-desktop-software-not-immune-29204989/ ...

Array#uniq
I am confused about "Array#uniq". In http://groups.google.com/group/comp.lang.ruby/msg/e57b80fbcd61aaab it is described, that one has to redefine "eql?" and "hash", if one needs an own "Array#uniq" interpretation. I made tests with the result, that neither "eql?" nor "hash" is called. What went wrong here? >>>>> code >>>>> class String alias :org_hash :hash alias :org_eql? :eql? def hash puts 'String#hash called' self.org_hash end def eql?(other) puts 'String#e...

A function with 'and' , 'not' , 'null' , 'car' and 'cdr'
What's this ? (defun enigma (x) (and (not (null x)) (or (null (car x)) (enigma (cdr x))))) "I suppose I should learn Lisp, but it seems so foreign." - Paul Graham, Nov 1983 On Wed, Oct 07 2015, CAI GENGYANG wrote: > What's this ? > > > (defun enigma (x) > (and (not (null x)) > (or (null (car x)) > (enigma (cdr x))))) Bad taste? It returns T if the list X contains nil as an element. It would be clearer to write (some #'null x). Helmut CAI GENGYANG ...

to get my ''PLP''
I tried to install the MATLAB in my computer but idon't have my personal license password.i would like how to get my PLP? buy it Hi, http://www.mathworks.com/support/solutions/data/1-16LU2.html J�r�me ...

Can't clean. Says it's printing. It isn't.
I'm trying to clean cartridge heads in an HP660C printer that has been unused for some time. I printed one test page which showed streaks. No other jobs had been set up for printing nor were being printed. When I went to the services page and tried to clean the heads it kept coming up with a message that I can't because the printer is printing. It wasn't. I tried "purge print documents", and turning the printer off and on again. Still wouldn't clean. Thanks for any suggestions. I really need to get some letters printed soon. "Martin" <marty123@optonline.net> wrote in message news:sDY7d.28771$kq6.18831495@news4.srv.hcvlny.cv.net... > I'm trying to clean cartridge heads in an HP660C printer that has been > unused for some time. I printed one test page which showed streaks. No > other jobs had been set up for printing nor were being printed. When I went > to the services page and tried to clean the heads it kept coming up with a > message that I can't because the printer is printing. It wasn't. > > I tried "purge print documents", and turning the printer off and on again. > Still wouldn't clean. > > Thanks for any suggestions. I really need to get some letters printed > soon. > Removed and reinstalled cartridges. Problem solved. Not sure why. ...

error: expected '=', ',', ';', 'asm' or '__attrib
Hi I'm trying to compile an ADC Driver & come acrosss the following error. I've no experience writing drivers before, and hence have no clue how to fix it. Hope someone out there has encountered the problem & suggesst a fix for the same. The Error is I get is : qadc.c: At top level: qadc.c:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'qadc_read' make: *** [qadc.o] Error 1 [root@localhost qadc]# ########################################################################### ADC Driver Code ##...

error: expected '=', ',', ';', 'asm' or '__attrib
Hi I'm trying to compile an ADC Driver & come acrosss the following error. I've no experience writing drivers before, and hence have no clue how to fix it. Hope someone out there has encountered the problem & suggesst a fix for the same. The Error is I get is : qadc.c: At top level: qadc.c:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'qadc_read' make: *** [qadc.o] Error 1 [root@localhost qadc]# ########################################################################### ADC Driver Code ########################################################################### #define MODULE #define __KERNEL__ #include <linux/config.h> #include <linux/module.h> #include <linux/kernel.h> /* printk */ #include <linux/fs.h> / #include <linux/errno.h> /* error codes */ #include <linux/types.h> /* size_t */ #include <linux/proc_fs.h> /* proc file system */ #include <linux/fcntl.h> #include <asm/system.h> /* cli, flags */ #include <asm/uaccess.h> /* copy from/to user */ /*Registers to get qadc access*/ volatile unsigned short * qadcmcr = (unsigned short *)0x40190000; volatile unsigned short * qacr0 = (unsigned short *)0x4019000a; volatile unsigned short * qacr1 = (unsigned short *)0x4019000c; volatile unsigned short * qacr2 = (unsigned short *)0x4019000e; volatile unsigned short * qasr0 = (unsigned short *)0x40190010; volatile unsigned short * qasr1...

Does '!=' equivelent to 'is not'
I'm a bit confusing about whether "is not" equivelent to "!=" if a != b: ... if a is not b: ... What's the difference between "is not" and "!=" or they are the same thing? pirata wrote: > I'm a bit confusing about whether "is not" equivelent to "!=" > > if a != b: > ... > > if a is not b: > ... > > > What's the difference between "is not" and "!=" or they are the same thing? No, they are not the same thing. == and != test to see if the *value* of two variables are the same. Like so: >>> a = 'hello world' >>> b = 'hello world' >>> a == b True a and b both have the value of 'hello world', so they are equal is and is not, however, do not test for value equivalence, they test for object identity. In other words, they test to see if the object the two variables reference are the same object in memory, like so: >>> a is b False a and b are assigned to two different objects that happen to have the same value, but nevertheless there are two separate 'hello world' objects in memory, and therefore you cannot say that a *is* b Now look at this: >>> c = d = 'hello world' >>> c == d True >>> c is d True In this case, they are again the same value, but now the is test also shows that they are the same *object* as well, because...

Can't find 'Prototype' syntax in JavaScript Bible'
'JavaScript Bible' v6 by Danny Goodman doesn't seem to describe the snytax used in Prototype.js. Namely, I could not find discussion of 'Object.extend' and the ':' feature (e.g., 'toColorPart:'), as in: Object.extend(Number.prototype, { toColorPart: function() { var digits = this.toString(16); if (this < 16) return '0' + digits; return digits; }, Similarly (or perhaps, not so similar), what this is about: var Try = { these: function() { .... } } Can someone please tell me where to find this in the book, or if it's n...

Web resources about - can't get the $_GET['id'] after the header is sent but page doesn't redirect - comp.lang.php

Resources last updated: 3/23/2016 5:21:20 PM