SunQuest
           PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 25th, 2002, 09:56 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
how fo i call a nother page with my page and pass parameters

How do I call a php page
within a php page and pass parameters

Reply With Quote
  #2  
Old July 25th, 2002, 10:01 PM
russ russ is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: London, UK
Posts: 129 russ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to russ Send a message via Yahoo to russ
RE: how fo i call a nother page with my page and pass parameters

require("page.php"); ?

Reply With Quote
  #3  
Old July 26th, 2002, 12:54 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: how fo i call a nother page with my page and pass parameters

thank you
here is what I am trying to do

in my test.php

I have the following code

<?
while (OCIFetchInto($iStatement, &$arrEmployee,
OCI_ASSOC+OCI_RETURN_NULLS))

{

?>

<tr>
<td>

<?= $arrEmployee['NAME'] ?></td>
<td><?= $arrEmployee['CHILD']
include 'test.php?param1=$arrEmployee['COL1']&
&param2=$arrEmployee['COL2']
&param3=$arrEmployee['COL3']';
?>
</td>

</tr>

<?
}

?>

why does it not work
How can i pass parapeters that I am getting from a query to the page

Reply With Quote
  #4  
Old July 26th, 2002, 02:03 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: RE: how fo i call a nother page with my page and pass parameters


Quote:
thank you
here is what I am trying to do

in my test.php

I have the following code

<?
while (OCIFetchInto($iStatement, &$arrEmployee,
OCI_ASSOC+OCI_RETURN_NULLS))

{

?>

<tr>
<td>

<?= $arrEmployee['NAME'] ?></td>
<td><?= $arrEmployee['CHILD']
include 'test.php?param1=$arrEmployee['COL1']&
¶m2=$arrEmployee['COL2']
¶m3=$arrEmployee['COL3']';
?>
</td>

</tr>

<?
}

?>

why does it not work
How can i pass parameters that I am getting from a query to the page


Reply With Quote
  #5  
Old July 26th, 2002, 03:36 PM
Taoism Taoism is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Winnipeg, MB, Canada
Posts: 81 Taoism User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 sec
Reputation Power: 2
RE: how fo i call a nother page with my page and pass parameters

It would help to know what test.php is supposed to do...

However, without knowing that, all I can suggest is to run the while loop without using the test.php in the loop, unless there is code you specifically need to include every time (which could slow your app down if there is a ton of looping).

I just *know* that there is a better way to structure that loop... but without knowing what is in test.php it is hard to suggest what to do...

For example, if test.php has more code to process the values out of the array, you don't include it like you are passing a $_GET string...

Just simply:
php Code:
Original - php Code
  1.  
  2. <?php
  3. //loop starts up here
  4. param1=$arrEmployee['COL1'];
  5. param2=$arrEmployee['COL2'];
  6. param3=$arrEmployee['COL3'];
  7. //now param1,param2,param3 will be usable by test.php
  8. include('test.php');
  9. //loop ends down here
  10.  


Think about restructuring so that you aren't including that file over and over...

Cheers,
Keith.

Reply With Quote
  #6  
Old July 26th, 2002, 03:43 PM
CmdrDats CmdrDats is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: <br><img src='http://www.dats.co.za/icon.gif'>
Posts: 269 CmdrDats User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to CmdrDats Send a message via AIM to CmdrDats Send a message via Yahoo to CmdrDats
RE: how fo i call a nother page with my page and pass parameters

You should create a function in test.php and after including it call it and pass the variables along into the function. that's the cleanest way of doing it..

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > how fo i call a nother page with my page and pass parameters


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway