[PHP] Re: Passing Variables to an iframe

2008-09-26 Thread Nathan Rixham

Waynn Lue wrote:

I was hoping to do some logic in a script, and then pass the results of that
script to an iframe for more processing.


why pass the results back to the client when your not finished 
processing them? simply include the next script and only pass user the 
*final* results (?)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Passing variables.

2006-06-08 Thread Barry

William Stokes schrieb:

Hello,

I've used like 3 hours to get this done but I can't figure this out. Hope 
someone here can help.


I have a form that a user can use to edit www pages. Page content is stored 
in DB as a HTML code. First user has to select, from select menu,  which 
page to edit. Then the selected page content html is retrieved to a 
textarea where it can be edited with tinyMCE editor. Then there's two 
buttons. Publish to save the edited content back to DB (no problems there) 
and Preview to open the full page layout in a popup window. The problem is 
that I can't pass the edited data from the textarea to the popup window. 
Here's last (desperate) attempt:



Hint: Fool around with the target property of HTML ;)

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: passing variables with HTTP_GET_VARS

2005-04-02 Thread AndreaD
By the way these variables are not part of a form they are just generated by 
index.php
AndreaD [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Can someone show me a simple example of how to make variables availble to 
 all pages in my site via $http_post_vars and $http_get_vars.


 just say I have a page index.php and that is doing a calucualtion and 
 creating a couple of variables called $age and $height.

 How so I make these variables globally available and how do all the other 
 pages show/retrieve them??


 Many Thanks


 AD 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: passing variables between pages without sessions

2005-03-13 Thread Jim Plush
Ross, is there a reason you don't want to use sessions again?
Creating an associative array of each pages answers is much cleaner than 
passing hidden fields or get vars.

Another option you could use it write the files to disk after each page 
save, that way if anything goes wrong(IE user computer shuts down) you 
dont have to have them start from scratch, you can load all the data 
from disk and have them start where they left off. If you're going to do 
multi page that option is the best for not pissing off customers because 
they can finish the form on their timeline.

Ross Hulford wrote:
I am creating a form but instead of having a long form I want to break it 
down into a few stages but need to pass the variables bewteen the pages.

I have done this before using sessions but would like to know if there is an 
alternative way to do this?

R. 
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Passing Variables

2004-07-11 Thread Tim Van Wassenhove
In article [EMAIL PROTECTED], Harlequin wrote:
 I'm just working on my syntax for passing a variable UserID from one page
 to the next and it works a little like this so far:
 
?php echo for example: ['$UserID']; ?

As you seem to have _many_ problems, i can only advise you to read the
manual.. and read it again.. and again... http://www.php.net/manual.

You can find the answer in the section on variables, predefined
variables to be more precise.

-- 
Tim Van Wassenhove http://home.mysth.be/~timvw

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Passing Variables

2004-07-11 Thread Harlequin
Thanks Tim. Solved the problem.

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-
Harlequin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'm just working on my syntax for passing a variable UserID from one
page
 to the next and it works a little like this so far:

 On my form I have:
 form action='updated.php?UserID=\$UserID\...

 The URL posts:
 http://...load.php?UserID=JDoe;

 And when I echo the $UserID on this page I get:
 Code:
 ?php echo for example: ['$UserID']; ?

 Generates:
 for example: ['\JDoe\']

 Which part of my syntax is incorrect...?



 -- 
 -
  Michael Mason
  Arras People
  www.arraspeople.co.uk
 -

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Passing Variables

2004-07-11 Thread John Taylor-Johnston
To go back to a previous conversation, I would not put it on the action=. You are 
using METHOD=post?
I wold use input name=UserID value==\$UserID\ type=hidden or to really hide them 
use session variables so they are completely hidden. Or use a cookie (but that is not 
the most secure way).


Harlequin wrote:

 I'm just working on my syntax for passing a variable UserID from one page
 to the next and it works a little like this so far:

 On my form I have:
 form action='updated.php?UserID=\$UserID\...

 The URL posts:
 http://...load.php?UserID=JDoe;

 And when I echo the $UserID on this page I get:
 Code:
 ?php echo for example: ['$UserID']; ?

 Generates:
 for example: ['\JDoe\']

 Which part of my syntax is incorrect...?

 --
 -
  Michael Mason
  Arras People
  www.arraspeople.co.uk
 -

--
John Taylor-Johnston
-
If it's not open-source, it's Murphy's Law.

  ' ' '   Collège de Sherbrooke:
 ô¿ô   http://www.collegesherbrooke.qc.ca/languesmodernes/
   - Université de Sherbrooke:
  http://compcanlit.ca/
  819-569-2064



[PHP] Re: passing variables to subsequent pages

2003-11-02 Thread Robb Kerr
Both suggestions were very helpful. But, I've still got a problem. The
$MANUFACTURERS variable contains an array. I'm trying to pass this array
with either the GET or POST method. I've tried the following to no avail...

input name=manufacturer[] type=hidden multiple id=manufacturer[]
value=?php $manufacturer ?

input name=manufacturer[] type=hidden multiple id=manufacturer[]
value=?php echo $manufacturer ?

input name=manufacturer[] type=hidden multiple id=manufacturer[]
value=?php $manufacturer ?

input name=manufacturer[] type=hidden multiple id=manufacturer[]
value='?=$_GET['manufacturer']?'  //as per Justin's suggestion

input name=manufacturer[] type=hidden multiple id=manufacturer[]
value=$manufacturer

input name=manufacturer[] type=hidden multiple id=manufacturer[]
value=$manufacturer


Except for the last two entries, the others all passed
...manufacturer%5B%5D=Array...

Any more suggestions?

Thanx,
-- 
Robb Kerr
Digital IGUANA

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Passing variables between pages

2003-10-14 Thread Gabriel Peugnet
Like John said:

You can use:

In the second page:
$user = $_POST['username'];// sent by the first page
...
echo form ...
input type='hidden' name='username' value='$user'
...
/form;

So, when you submit the form, in the third page you will be able to get the
username.
$user = $_POST['username'];

Yo can do this in N number of pages. If you always pass and obtain the
variable via POST or GET no matter how much pages yo use. In the 20th page
you'll get the variable.



Rashini Jayasinghe [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]

Hi,

I want to pass a variable between three pages. I tried to get a username
from the first page through a form. Use that username in a select statement
in the second page to query a table.Everything is fine up to that point. now
I want to pass the same username to the third page where I have to use it to
select a table name by that username and it doesn't work. I tried
$_POST['username'] and the value is not passed to the third page. Is there a
way of doing this?
Please help.

Thank You.

Rashini

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Passing Variables

2003-06-21 Thread Thomas Seifert
If you don't want them seen anywhere, then you've got to use 
sessions.


Thomas

On Sat, 21 Jun 2003 08:53:12 -0500 [EMAIL PROTECTED] (Jay Fitzgerald) wrote:

 I have been searching for an answer to this for a couple of hours now and 
 cant find anything. I believe that there is a secure way of doing this but 
 I think my brain is having a momentary lapse...
 
 I have these variables:
 
 $eventid = 1;
 $age = 15;
 
 Is there a way to pass these variables to the next page so I can continue 
 using them without doing something like this:
 
 A HREF=test.php?eventid=1age=15
 
 I would rather not have the variables be seen or known to the end user for 
 security reasons because they could change them in the URL. I know it has 
 something to do with $_GET and $_POST because I do have register_globals 
 set to OFF in my php file and I do not want to turn them on
 
 TIA
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Passing Variables

2003-06-21 Thread nabil
use hidden field (pure html) and then u have it as $yourhiddenfield on the
next page even u have the register global off..

Nabil


Jay Fitzgerald [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I have been searching for an answer to this for a couple of hours now and
 cant find anything. I believe that there is a secure way of doing this but
 I think my brain is having a momentary lapse...

 I have these variables:

 $eventid = 1;
 $age = 15;

 Is there a way to pass these variables to the next page so I can continue
 using them without doing something like this:

 A HREF=test.php?eventid=1age=15

 I would rather not have the variables be seen or known to the end user for
 security reasons because they could change them in the URL. I know it has
 something to do with $_GET and $_POST because I do have register_globals
 set to OFF in my php file and I do not want to turn them on

 TIA




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: Passing Variables

2003-06-21 Thread George Pitcher
Nabil,

That is one way but it means that Jay would have to use a form and not a
link.

You could set a cookie. That would work, but it relies on the user allowing
cookies.

George

 -Original Message-
 From: nabil [mailto:[EMAIL PROTECTED]
 Sent: 21 June 2003 2:58 pm
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Passing Variables


 use hidden field (pure html) and then u have it as $yourhiddenfield on the
 next page even u have the register global off..

 Nabil


 Jay Fitzgerald [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  I have been searching for an answer to this for a couple of
 hours now and
  cant find anything. I believe that there is a secure way of
 doing this but
  I think my brain is having a momentary lapse...
 
  I have these variables:
 
  $eventid = 1;
  $age = 15;
 
  Is there a way to pass these variables to the next page so I
 can continue
  using them without doing something like this:
 
  A HREF=test.php?eventid=1age=15
 
  I would rather not have the variables be seen or known to the
 end user for
  security reasons because they could change them in the URL. I
 know it has
  something to do with $_GET and $_POST because I do have register_globals
  set to OFF in my php file and I do not want to turn them on
 
  TIA
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: Passing Variables

2003-06-21 Thread Jay Fitzgerald
That was my thought too, George. But if the user does not have cookies 
enabled, then I believe, as Thomas pointed out, that a SESSION is the only 
way to handle the variables. I have never done a correct session so I am 
trying to learn how to do them without having a userid and password for 
each user. I have played with sessions but I don't know if I am doing them 
correctly or how to do sessions without authentication.

Jay



At 03:14 PM 6/21/2003 +0100, George Pitcher wrote:
Nabil,

That is one way but it means that Jay would have to use a form and not a
link.
You could set a cookie. That would work, but it relies on the user allowing
cookies.
George

 -Original Message-
 From: nabil [mailto:[EMAIL PROTECTED]
 Sent: 21 June 2003 2:58 pm
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Passing Variables


 use hidden field (pure html) and then u have it as $yourhiddenfield on the
 next page even u have the register global off..

 Nabil


 Jay Fitzgerald [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  I have been searching for an answer to this for a couple of
 hours now and
  cant find anything. I believe that there is a secure way of
 doing this but
  I think my brain is having a momentary lapse...
 
  I have these variables:
 
  $eventid = 1;
  $age = 15;
 
  Is there a way to pass these variables to the next page so I
 can continue
  using them without doing something like this:
 
  A HREF=test.php?eventid=1age=15
 
  I would rather not have the variables be seen or known to the
 end user for
  security reasons because they could change them in the URL. I
 know it has
  something to do with $_GET and $_POST because I do have register_globals
  set to OFF in my php file and I do not want to turn them on
 
  TIA
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Re: Passing Variables

2003-06-21 Thread George Pitcher
Jay,

I've never ventured into 'sessions' (not ones without drinks) but I've a
feeling that if the user has turned cookies off then sessions are out as
well as they require a cookie being stored on the user's machine.

Someone will surely correct me if I am wrong.

I went to the PHP conference in Frankfurt about 18 months ago and Rasmus was
talking about 'clean' URLs (ithout the 'query' string. I never did find out
how though?

Cheers

George

 -Original Message-
 From: Jay Fitzgerald [mailto:[EMAIL PROTECTED]
 Sent: 21 June 2003 3:19 pm
 To: George Pitcher; nabil; [EMAIL PROTECTED]
 Subject: RE: [PHP] Re: Passing Variables


 That was my thought too, George. But if the user does not have cookies
 enabled, then I believe, as Thomas pointed out, that a SESSION is
 the only
 way to handle the variables. I have never done a correct
 session so I am
 trying to learn how to do them without having a userid and password for
 each user. I have played with sessions but I don't know if I am
 doing them
 correctly or how to do sessions without authentication.

 Jay



 At 03:14 PM 6/21/2003 +0100, George Pitcher wrote:
 Nabil,
 
 That is one way but it means that Jay would have to use a form and not a
 link.
 
 You could set a cookie. That would work, but it relies on the
 user allowing
 cookies.
 
 George
 
   -Original Message-
   From: nabil [mailto:[EMAIL PROTECTED]
   Sent: 21 June 2003 2:58 pm
   To: [EMAIL PROTECTED]
   Subject: [PHP] Re: Passing Variables
  
  
   use hidden field (pure html) and then u have it as
 $yourhiddenfield on the
   next page even u have the register global off..
  
   Nabil
  
  
   Jay Fitzgerald [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]
I have been searching for an answer to this for a couple of
   hours now and
cant find anything. I believe that there is a secure way of
   doing this but
I think my brain is having a momentary lapse...
   
I have these variables:
   
$eventid = 1;
$age = 15;
   
Is there a way to pass these variables to the next page so I
   can continue
using them without doing something like this:
   
A HREF=test.php?eventid=1age=15
   
I would rather not have the variables be seen or known to the
   end user for
security reasons because they could change them in the URL. I
   know it has
something to do with $_GET and $_POST because I do have
 register_globals
set to OFF in my php file and I do not want to turn them on
   
TIA
   
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Passing Variables

2003-06-21 Thread Thomas Seifert
you can transfer the session-id (which is unique) through the url too.
but then its only the session-id and not the actual data and the session-id
can't be guessed that simple to reach another user's data.


Thomas

On Sat, 21 Jun 2003 15:31:56 +0100 [EMAIL PROTECTED] (George Pitcher) wrote:

 Jay,
 
 I've never ventured into 'sessions' (not ones without drinks) but I've a
 feeling that if the user has turned cookies off then sessions are out as
 well as they require a cookie being stored on the user's machine.
 
 Someone will surely correct me if I am wrong.
 
 I went to the PHP conference in Frankfurt about 18 months ago and Rasmus was
 talking about 'clean' URLs (ithout the 'query' string. I never did find out
 how though?
 
 Cheers
 
 George
 
  -Original Message-
  From: Jay Fitzgerald [mailto:[EMAIL PROTECTED]
  Sent: 21 June 2003 3:19 pm
  To: George Pitcher; nabil; [EMAIL PROTECTED]
  Subject: RE: [PHP] Re: Passing Variables
 
 
  That was my thought too, George. But if the user does not have cookies
  enabled, then I believe, as Thomas pointed out, that a SESSION is
  the only
  way to handle the variables. I have never done a correct
  session so I am
  trying to learn how to do them without having a userid and password for
  each user. I have played with sessions but I don't know if I am
  doing them
  correctly or how to do sessions without authentication.
 
  Jay
 
 
 
  At 03:14 PM 6/21/2003 +0100, George Pitcher wrote:
  Nabil,
  
  That is one way but it means that Jay would have to use a form and not a
  link.
  
  You could set a cookie. That would work, but it relies on the
  user allowing
  cookies.
  
  George
  
-Original Message-
From: nabil [mailto:[EMAIL PROTECTED]
Sent: 21 June 2003 2:58 pm
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Passing Variables
   
   
use hidden field (pure html) and then u have it as
  $yourhiddenfield on the
next page even u have the register global off..
   
Nabil
   
   
Jay Fitzgerald [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I have been searching for an answer to this for a couple of
hours now and
 cant find anything. I believe that there is a secure way of
doing this but
 I think my brain is having a momentary lapse...

 I have these variables:

 $eventid = 1;
 $age = 15;

 Is there a way to pass these variables to the next page so I
can continue
 using them without doing something like this:

 A HREF=test.php?eventid=1age=15

 I would rather not have the variables be seen or known to the
end user for
 security reasons because they could change them in the URL. I
know it has
 something to do with $_GET and $_POST because I do have
  register_globals
 set to OFF in my php file and I do not want to turn them on

 TIA

   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
   
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: Passing Variables

2003-06-21 Thread Jeff Harris
On Jun 21, 2003, George Pitcher claimed that:

|Jay,
|
|I've never ventured into 'sessions' (not ones without drinks) but I've a
|feeling that if the user has turned cookies off then sessions are out as
|well as they require a cookie being stored on the user's machine.
|
|Someone will surely correct me if I am wrong.
|
|I went to the PHP conference in Frankfurt about 18 months ago and Rasmus was
|talking about 'clean' URLs (ithout the 'query' string. I never did find out
|how though?
|
|Cheers
|
|George
|

http://marc.theaimsgroup.com/?l=php-generalm=105597453308214w=2

form name=myform method=POST action=validate.php
input type=hidden name=secret1 value=15
input type=hidden name=secret2 value=secret login code
a href=javascript:void(document.myform.submit())next page/a/form

If you really want to keep the values a secret, you will have to
substitute them with a reverable hash or some other method to keep prying
eyes away.

Jeff

-- 
Registered Linux user #304026.
lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import
Key fingerprint = 52FC 20BD 025A 8C13 5FC6  68C6 9CF9 46C2 B089 0FED
Responses to this message should conform to RFC 1855.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: passing variables to flash

2003-02-21 Thread Lord Loh.
See the flash docs. There are ways of making javascript and flash interact.
So make a dynamically generated javascript which will pass variable to
flash!

Or are there special reasonds to use only GET ?

Lord Loh.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: passing variables and functions between a base class and subclass

2003-02-06 Thread Justin Garrett
?php

class base {
var $a;

function hello(){
echo hello;
}
}

class sub extends base {

function hi(){
$this-a = hi;
$this-hello();
}
}

$foo = new sub;
$foo-hi();
echo $foo-a;
?

Justin Garrett

Electroteque [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 hi there sorry about the long subject , but i have not mastered yet how to
 pass funtcions and variables between a base and subclass , i cant seem to
 access variables properly between the bass class and subclass and
functions
 from the subclass in the base class ?





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: passing variables to a sql statement

2003-01-18 Thread Bobby Patel
It seems that error is from an ill-formed MySql statement. Try this,
$descripQuery = SELECT descrip from project_descrip where rowid=$foo;
echo $descripQuery ; // put in this echo after the query.
$descripResult = mysql_query($descripQuery);
echo mysql_error(); file://put this echo after query execution

Now, run it and see on screen what query is actually executed.

Jennifer [EMAIL PROTECTED] wrote in message
003401c2bf2b$0a042d20$8101a8c0@fvcrx01">news:003401c2bf2b$0a042d20$8101a8c0@fvcrx01...
 hi, i'm hoping someone can help me out here - im trying to pass a variable
from a string in the href tag, however my sql breaks when i put a var in the
statment.
 when i replace $foo with a number, the page works fine. can someone please
tell me what im doing wrong?

 here is the error i get:

 Warning: Supplied argument is not a valid MySQL result resource in
/home/villany2k1/www.villany2k1.com/htdocs/projects/projects_descrip.php on
line 11



 here is my code:

 ?php
 $hostName=localhost;
 $userName=;
 $password=;
 $database= projects;
 $tableName=project_descrip;

 $descripQuery = SELECT descrip from project_descrip where rowid=$foo;
 mysql_connect($hostName, $userName, $password);
 $descripResult = mysql_db_query($database,$descripQuery);
while($row = mysql_fetch_object($descripResult)){

 $foo = $row-descrip;

 echo(font face=verdana size=1);
 echo(a href='projects_descrip.php?rowid=$foobar' . $foo/a .  |
);
 echo(/font);

   }


 ?

 thanks in advance,
 jennifer




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Passing Variables

2002-11-23 Thread Stephan Seidt
if you mean something like bla.php?foo=bar, etc and you have register_globas enabled
it'll be stored as $_GET['foo'] ($_REQUEST['foo'])

On Sat, 23 Nov 2002 11:42:49 -0800
[EMAIL PROTECTED] (Craig Edgmon) wrote:

 I am sure this question has been answered, but there is a ton of data to
 sift through on this. I am running Apache 1.3 and the latest PHP 4.2.3. .
 I am just working with variables and I cannot seem to get them to pass from
 my html file to the php call. I will get the html portion fine, but not the
 variable. I have checked my language and have compared my files with
 supposed good code from a reliable source with the same results. Any idea on
 this. It happens on multiple systems.
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Passing variables between servers

2002-08-22 Thread Anil Kumar K.


You cannot avoid using cookies. When you use Sessions web server is making
use of cookies (unless you go for URL rewriting) which remains in the
browser until one quits the browser.

To tackle your situation, you can effectively make use of a database table 
and a session cookie: 

1. set a session cookie (different from one set by the server) as a soon
as as a login is successful. This cookie should be set in such a way that
the browser will send it back to any server in your domain. The value for
this cookie can be the same as the value PHP generated for the Session ID.
If you prefer to use some other value make sure that it is different for
each session for each user to avoid security issues.

2. Store this value and the user ID (or something else to identify that
user in your app) in a table.

3. Remove this row from the table when the user logs out or on Session 
timeout.

Now, when the user is taken to your ASP server, browser will send that
cookie set by the PHP server along with the request and the ASP server can
query the database for that cookie value to get the user ID. If it can
find it in the table the application can make sure that the request is
valid and the rest of the info can be pulled from the database.


   Anil




On Wed, 21 Aug 2002, Mark McCulligh wrote:

 I have two server.  One running PHP/Linux the other running ASP/2000.
 The user logins into the PHP server and session variables are made to hold
 their username, password, department, etc..  The site from time to time
 redirect the user to the ASP server.  I want to pass the session variable
 across to the other server.  I can't use the GET method.
 (www.domain.com/form.asp?username=Mark.) because putting the password on
 the address bar is not an option.  The ASP server will redirect them back
 when they are done on it. It will pass back the variables just in case the
 session on the PHP server has expired for the PHP server can create a new
 session if needed.
 
 I don't want to use a cookie.
 
 I was thinking of using cURL but I can't fine any information about using it
 in ASP.  I know how to use cURL in PHP to redirect the user to the ASP
 server and pass the variables in the POST method, but not the other way.
 
 Any ideas would be a GREAT help.
 Mark.
 
 _
 Mark McCulligh, Application Developer / Analyst
 Sykes Canada Corporation www.SykesCanada.com
 [EMAIL PROTECTED]
 
 
 

-- 
+91 471 324341 (Office)
+91 98473 22280 (Cell)

Linuxense Information Systems Pvt. Ltd., Trivandrum, India
http://www.linuxense.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Passing variables between servers

2002-08-21 Thread Seairth Jacobs

Is there any reason to pass the data to the ASP server other than the need
for the ASP server to pass it back in case the PHP server session has
expired?  If not, why not just store the login information in a local table
referencable by a primary key that you pass around instead?  You could even
do this with GET.

---
Seairth Jacobs
[EMAIL PROTECTED]


Mark McCulligh [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have two server.  One running PHP/Linux the other running ASP/2000.
 The user logins into the PHP server and session variables are made to hold
 their username, password, department, etc..  The site from time to time
 redirect the user to the ASP server.  I want to pass the session variable
 across to the other server.  I can't use the GET method.
 (www.domain.com/form.asp?username=Mark.) because putting the password
on
 the address bar is not an option.  The ASP server will redirect them back
 when they are done on it. It will pass back the variables just in case the
 session on the PHP server has expired for the PHP server can create a new
 session if needed.

 I don't want to use a cookie.

 I was thinking of using cURL but I can't fine any information about using
it
 in ASP.  I know how to use cURL in PHP to redirect the user to the ASP
 server and pass the variables in the POST method, but not the other way.

 Any ideas would be a GREAT help.
 Mark.

 _
 Mark McCulligh, Application Developer / Analyst
 Sykes Canada Corporation www.SykesCanada.com
 [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Passing variables between servers

2002-08-21 Thread Mark McCulligh

The session variables are need on both server for authorization needs.
The two servers host two separate Intranet apps and I am trying to join the
two together into one Intranet app.  The variable will be used on both
sides.

The reason I don't what to use cookie is your users keep disabling them.
They think a web site can use a cookie to break into their computer. They
also disable JavaScript a lot too.
_
Mark McCulligh, Application Developer / Analyst
Sykes Canada Corporation www.SykesCanada.com
[EMAIL PROTECTED]
- Original Message -
From: Seairth Jacobs [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Wednesday, August 21, 2002 2:18 PM
Subject: Re: Passing variables between servers


 Is there any reason to pass the data to the ASP server other than the need
 for the ASP server to pass it back in case the PHP server session has
 expired?  If not, why not just store the login information in a local
table
 referencable by a primary key that you pass around instead?  You could
even
 do this with GET.

 ---
 Seairth Jacobs
 [EMAIL PROTECTED]


 Mark McCulligh [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I have two server.  One running PHP/Linux the other running ASP/2000.
  The user logins into the PHP server and session variables are made to
hold
  their username, password, department, etc..  The site from time to time
  redirect the user to the ASP server.  I want to pass the session
variable
  across to the other server.  I can't use the GET method.
  (www.domain.com/form.asp?username=Mark.) because putting the
password
 on
  the address bar is not an option.  The ASP server will redirect them
back
  when they are done on it. It will pass back the variables just in case
the
  session on the PHP server has expired for the PHP server can create a
new
  session if needed.
 
  I don't want to use a cookie.
 
  I was thinking of using cURL but I can't fine any information about
using
 it
  in ASP.  I know how to use cURL in PHP to redirect the user to the ASP
  server and pass the variables in the POST method, but not the other way.
 
  Any ideas would be a GREAT help.
  Mark.
 
  _
  Mark McCulligh, Application Developer / Analyst
  Sykes Canada Corporation www.SykesCanada.com
  [EMAIL PROTECTED]
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Passing variables between servers

2002-08-21 Thread Jay Blanchard

[snip]
The session variables are need on both server for authorization needs.
The two servers host two separate Intranet apps and I am trying to join the
two together into one Intranet app.  The variable will be used on both
sides.

The reason I don't what to use cookie is your users keep disabling them.
They think a web site can use a cookie to break into their computer. They
also disable JavaScript a lot too.
[/snip]

What about installing PHP on the IIS server and when time comes to pass back
the information using the same method?

Trying to think outside the box ...

Jay

***
* Texas PHP Developers Conf  Spring 2003  *
* T Bar M Resort  Conference Center  *
* New Braunfels, Texas*
* San Antonio Area PHP Developers Group   *
* Interested? Contact [EMAIL PROTECTED] *
***



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Passing variables between servers

2002-08-21 Thread Mark McCulligh

I have thought about this also, but I need the variables in the ASP session
and I don't have the time line to rewrite the ASP pages over in PHP.  The
current ASP app took a year to develop.

I have thought about having PHP on both servers and having the PHP on the
2000 server just save the variables to a XML file or ini file, then have the
ASP code read it in, but I thought there is probable some easy solution out
there for passing information around.  cURL looked like a solution but I
can't find information on it using ASP.

Maybe I am looking of a easy solutions that doesn't exist and will have to
just use the longer one.

Thanks for your input, Mark.
_
Mark McCulligh, Application Developer / Analyst
Sykes Canada Corporation www.SykesCanada.com
(888)225-6824 ex. 3262
[EMAIL PROTECTED]
- Original Message -
From: Jay Blanchard [EMAIL PROTECTED]
To: 'Mark McCulligh' [EMAIL PROTECTED]; 'Seairth Jacobs'
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, August 21, 2002 3:34 PM
Subject: RE: [PHP] Re: Passing variables between servers


 [snip]
 The session variables are need on both server for authorization needs.
 The two servers host two separate Intranet apps and I am trying to join
the
 two together into one Intranet app.  The variable will be used on both
 sides.

 The reason I don't what to use cookie is your users keep disabling them.
 They think a web site can use a cookie to break into their computer. They
 also disable JavaScript a lot too.
 [/snip]

 What about installing PHP on the IIS server and when time comes to pass
back
 the information using the same method?

 Trying to think outside the box ...

 Jay

 ***
 * Texas PHP Developers Conf  Spring 2003  *
 * T Bar M Resort  Conference Center  *
 * New Braunfels, Texas*
 * San Antonio Area PHP Developers Group   *
 * Interested? Contact [EMAIL PROTECTED] *
 ***




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Passing variables between servers

2002-08-21 Thread MET

http://www.w3.org/TR/SOAP/

~ Matthew

-Original Message-
From: Mark McCulligh [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 21, 2002 4:14 PM
To: Jay Blanchard
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Passing variables between servers


I have thought about this also, but I need the variables in the ASP
session and I don't have the time line to rewrite the ASP pages over in
PHP.  The current ASP app took a year to develop.

I have thought about having PHP on both servers and having the PHP on
the 2000 server just save the variables to a XML file or ini file, then
have the ASP code read it in, but I thought there is probable some easy
solution out there for passing information around.  cURL looked like a
solution but I can't find information on it using ASP.

Maybe I am looking of a easy solutions that doesn't exist and will have
to just use the longer one.

Thanks for your input, Mark. _
Mark McCulligh, Application Developer / Analyst
Sykes Canada Corporation www.SykesCanada.com
(888)225-6824 ex. 3262
[EMAIL PROTECTED]
- Original Message -
From: Jay Blanchard [EMAIL PROTECTED]
To: 'Mark McCulligh' [EMAIL PROTECTED]; 'Seairth Jacobs'
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, August 21, 2002 3:34 PM
Subject: RE: [PHP] Re: Passing variables between servers


 [snip]
 The session variables are need on both server for authorization needs.

 The two servers host two separate Intranet apps and I am trying to 
 join
the
 two together into one Intranet app.  The variable will be used on both

 sides.

 The reason I don't what to use cookie is your users keep disabling 
 them. They think a web site can use a cookie to break into their 
 computer. They also disable JavaScript a lot too. [/snip]

 What about installing PHP on the IIS server and when time comes to 
 pass
back
 the information using the same method?

 Trying to think outside the box ...

 Jay

 ***
 * Texas PHP Developers Conf  Spring 2003  *
 * T Bar M Resort  Conference Center  *
 * New Braunfels, Texas*
 * San Antonio Area PHP Developers Group   *
 * Interested? Contact [EMAIL PROTECTED] *
 ***




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Passing variables between servers

2002-08-21 Thread Garth Dahlstrom

Why not share a session DB across both servers?

Since your users disable cookies you'll have a url that looks
like this anyway: http://www.myPHPserver.com/index.php?sid=12345
if you wanted to maintain session state

so, when redirecting to the ASP server do: 
header('location: http://www.myASPserver.com/default.asp?sid=12345')

then have default.asp open the DB that has the sessions for
the PHP server through ODBC or ADO or whatever and match the 
session id pulling out the stored info for that session.

-GED



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Passing variables to page via POST - How?

2002-07-18 Thread Anup

Hey, I'm new, but I have some advice.
Do you have to POST? becuase you can use sessions, and PHP has a bunch os
session functions.
Secondly, POST will not attach any variables to the URL, this is done by
GET.
To access the POST variables traverse through the $HTTP_POST_VARS (or $_POST
array, i think) to retrieve your values.
But if you can try using sessions, more secure, and as easy to use as POST,
just traverse $HTTP_SESSION_VARS.
Monty [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 This is probably more of an HTML question... Is there a way to pass
 variables to another page via POST instead of via the URL? I need to pass
 several variables, one that is an array and another that is a fairly long
 string, so, I can't really do this via the URL.

 My initial idea was to just create a very simple form that only has hidden
 fields with the data I want to pass, along with an image Submit button
that
 would call the page and pass the hidden field variables.

 Is that the only/best way to accomplish this?

 Thanks.

 Monty





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Passing variables

2002-07-09 Thread Richard Lynch

After reading Kevin Yank's Managing Users ... at www.sitepoint.com, I 
tried the following 2 scripts. Unfortunately, the variable $course is NOT 
being passed to the 2nd script. Thus, per the script, the Home page is 
displayed. Why?

In addition to needing session_start() in page 2, you simply cannot reliably
use session_start() which sends a Cookie and a Location: to the browser.

You're going to have to send your data as GET data, or not do all those
header(Location: ...) calls, and just combine the three scripts into one.


-- 
Like Music?  http://l-i-e.com/artists.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Passing Variables

2002-05-23 Thread Michael Virnstein

and please, next time paste the error or tell us at least,
if it is a php error or a mysql error and the line on which it occured
and mark that line in your sample code, so someone can look at it ,
understand it and help you.

Regards Michael

Michael Virnstein [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 $this usually is a self-reference inside a class.
 Use it with care!
 try to echo $sql;, perhaps this tells you more.

 Regards Michael

 James Opere [EMAIL PROTECTED] schrieb im Newsbeitrag
 FC788AB9771FD6118E6F0002A5AD7B8F7268AB@ICRAFNTTRAIN">news:FC788AB9771FD6118E6F0002A5AD7B8F7268AB@ICRAFNTTRAIN...
  Hi All,
   I'm trying to pass variables from one form to the other.I have a
problem
  when i want to do the the following:
  1.COUNT($variable)
  2.DISTINCT($variable)
  .
  I realise i can not use the brackets in my query and the variable be
  recognised.When i add COUNT without the brackets i still get an error.
  Example.
  test.html
  form action=me.php method=post
  input type=text name=this
   ..
  This is sent to :
 
  me.php
  ?php
  $db=mysql_connect('localhost','','');
  mysql_select_db($database,$db);
  $sql=select COUNT($this) from $table group by  $this;
  
  ?
   This  gives an error.
  Please help.
 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Passing Variables

2002-05-23 Thread Michael Virnstein

$this usually is a self-reference inside a class.
Use it with care!
try to echo $sql;, perhaps this tells you more.

Regards Michael

James Opere [EMAIL PROTECTED] schrieb im Newsbeitrag
FC788AB9771FD6118E6F0002A5AD7B8F7268AB@ICRAFNTTRAIN">news:FC788AB9771FD6118E6F0002A5AD7B8F7268AB@ICRAFNTTRAIN...
 Hi All,
  I'm trying to pass variables from one form to the other.I have a problem
 when i want to do the the following:
 1.COUNT($variable)
 2.DISTINCT($variable)
 .
 I realise i can not use the brackets in my query and the variable be
 recognised.When i add COUNT without the brackets i still get an error.
 Example.
 test.html
 form action=me.php method=post
 input type=text name=this
  ..
 This is sent to :

 me.php
 ?php
 $db=mysql_connect('localhost','','');
 mysql_select_db($database,$db);
 $sql=select COUNT($this) from $table group by  $this;
 
 ?
  This  gives an error.
 Please help.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Passing Variables

2002-05-23 Thread Nicole Amashta

Why do you need the group by clause? Do one or the other, not both.

either do a

select count(id) from table
or

select field, count(id) from table group by field

Check your query,

Nicole Amashta
www.aeontrek.com

James Opere wrote:
 Hi All,
  I'm trying to pass variables from one form to the other.I have a problem
 when i want to do the the following:
 1.COUNT($variable)
 2.DISTINCT($variable)
 .
 I realise i can not use the brackets in my query and the variable be
 recognised.When i add COUNT without the brackets i still get an error.
 Example.
 test.html
 form action=me.php method=post
 input type=text name=this
  ..
 This is sent to :
 
 me.php
 ?php 
 $db=mysql_connect('localhost','','');
 mysql_select_db($database,$db);
 $sql=select COUNT($this) from $table group by  $this;
 
 ?
  This  gives an error.
 Please help.
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: passing variables to scripts

2002-04-28 Thread Yuri Petro

Which version of PHP you're running? May be you need to set register_globals
= On in your php.ini file.

--
Kind regards,
Yuri.

 www.AceHoster.com  Quality web hosting


Mark Gallagher [EMAIL PROTECTED] ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 (yes, newbie - but I *have* tried everything I know, I swear)

 I'm trying to write a comments system for my site (because I think I
 can).  Basically, the script receives the ID of a particular entry (the
 site is a blog) via ?entry_id=entry_id.  It checks to see if there's
 a corresponding text file (entry_id.txt) and if so, it prints the
 contents of the text file and invites the user to input a comment.  If
 not, it prints no comments and invites the user... yadda yadda.

 Now, unless I'm mistaken, passing the arguments are done like so:
 http://www.foo.com/comments.php?entry_id=test
 Right?

 Unfortunately, it doesn't work.  That is to say, everything about the
 script works, except recognition of the $entry_id variable.  Something
 as simple as: titlecomments for entry ?php echo($entry_id);
 ?/title returns titlecomments for entry /title.

 Saving the text file's URL to a variable:
 ?php
 $filename = http://www.foo.com/$entry_id; .txt;
 ?

 Doesn't work either.

 I had a semi-hunch (brought on by my own inexperience, no doubt) that
 maybe I had to start a session or something on the referring page. Tried
 that (session_start();), didn't have any effect.  Bah.

 Can anyone point out what I'm doing wrong?

 TIA

 --
 Mark Gallagher




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Passing variables with include()

2002-01-14 Thread Tino Didriksen

 include(http://www.someremote.server/calculate_drivers.php;);

Very simple really: You cannot include remote files...

--|--
Tino Didriksen
http://ProjectJJ.dk/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Passing variables with include()

2002-01-14 Thread Stefan Rusterholz

Sure you can. Right out from the manual:

If URL fopen wrappers are enabled in PHP (which they are in the default
configuration), you can specify the file to be include()ed using an URL
instead of a local pathname. See Remote files and fopen() for more
information.

best regards
Stefan Rusterholz

- Original Message -
From: Tino Didriksen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 14, 2002 1:53 PM
Subject: [PHP] Re: Passing variables with include()


  include(http://www.someremote.server/calculate_drivers.php;);

 Very simple really: You cannot include remote files...

 --|--
 Tino Didriksen
 http://ProjectJJ.dk/



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Passing variables with include()

2002-01-14 Thread Imar de Vries

A lot of different answers, which I will respond to:

- The variable is definately set before the include call is made, there is
no doubt about that  at all :)

- Including remote files *is* possible. The php manual does not mention this
does not work, and when I add the variable to the call (include
/calculate_drivers?serie_id=3.php) the code is processed perfectly. The
thing is, I can not pass the variable with the call, because it's value is
determined by the form field. I could use a switch statement of course, but
that adds a lot more text to the code.

- I'm not sure changing the file extension will help (because the code in
that remote php file has to be processed on the remote server, in order to
be able to query the db), but I will give it a try.

--
Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Passing variables with include()

2002-01-14 Thread Imar de Vries

Imar De Vries wrote:

 - Including remote files *is* possible. The php manual does not mention this
 does not work, and when I add the variable to the call (include
 /calculate_drivers?serie_id=3.php) the code is processed perfectly. The
 thing is, I can not pass the variable with the call, because it's value is
 determined by the form field. I could use a switch statement of course, but
 that adds a lot more text to the code.

I just changed the code to (include
.../calculate_drivers?serie_id=$serie_id.php)

... and this worked! Weird solution...
--
Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Passing variables with include()

2002-01-14 Thread Martin Wickman

Imar De Vries wrote:

 Imar De Vries wrote:
 
 
- Including remote files *is* possible. The php manual does not mention this
does not work, and when I add the variable to the call (include
/calculate_drivers?serie_id=3.php) the code is processed perfectly. The
thing is, I can not pass the variable with the call, because it's value is
determined by the form field. I could use a switch statement of course, but
that adds a lot more text to the code.

 
 I just changed the code to (include
 .../calculate_drivers?serie_id=$serie_id.php)
 
 ... and this worked! Weird solution...

Not really. The http://.../foo.php request returns html and not php. 
The foo.php file is parsed and executed by the remote server and 
returned to you as html. By adding serie_id=xxx you actually give the 
remote php-script the name and value of the variable.

You should think of include/require as a way to *include* any file 
into your script. Instead of cutting and pasting code into your file, 
you use include. Thats the way it works in practice. No magic is going 
on here :-)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Passing variables with include()

2002-01-14 Thread Scott Houseman

Hi Al.

While we are on topic, what are the key differences between include() 
require() ?

Cheers

Scott

- Original Message -
From: Martin Wickman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 14, 2002 3:40 PM
Subject: [PHP] Re: Passing variables with include()


 Imar De Vries wrote:

  Imar De Vries wrote:
 
 
 - Including remote files *is* possible. The php manual does not mention
this
 does not work, and when I add the variable to the call (include
 /calculate_drivers?serie_id=3.php) the code is processed perfectly.
The
 thing is, I can not pass the variable with the call, because it's value
is
 determined by the form field. I could use a switch statement of course,
but
 that adds a lot more text to the code.
 
 
  I just changed the code to (include
  .../calculate_drivers?serie_id=$serie_id.php)
 
  ... and this worked! Weird solution...

 Not really. The http://.../foo.php request returns html and not php.
 The foo.php file is parsed and executed by the remote server and
 returned to you as html. By adding serie_id=xxx you actually give the
 remote php-script the name and value of the variable.

 You should think of include/require as a way to *include* any file
 into your script. Instead of cutting and pasting code into your file,
 you use include. Thats the way it works in practice. No magic is going
 on here :-)


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Passing variables with include()

2002-01-14 Thread Stefan Rusterholz

Since some time there has only one difference left (don't know at which
version it changed):
include causes a warning and require an error on fail. (very useful for
debugging - require your error-handler and include everything else)

best regards
Stefan Rusterholz

- Original Message -
From: Scott Houseman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, January 13, 2002 2:54 PM
Subject: Re: [PHP] Re: Passing variables with include()


 Hi Al.

 While we are on topic, what are the key differences between include() 
 require() ?

 Cheers

 Scott

 - Original Message -
 From: Martin Wickman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, January 14, 2002 3:40 PM
 Subject: [PHP] Re: Passing variables with include()


  Imar De Vries wrote:
 
   Imar De Vries wrote:
  
  
  - Including remote files *is* possible. The php manual does not
mention
 this
  does not work, and when I add the variable to the call (include
  /calculate_drivers?serie_id=3.php) the code is processed
perfectly.
 The
  thing is, I can not pass the variable with the call, because it's
value
 is
  determined by the form field. I could use a switch statement of
course,
 but
  that adds a lot more text to the code.
  
  
   I just changed the code to (include
   .../calculate_drivers?serie_id=$serie_id.php)
  
   ... and this worked! Weird solution...
 
  Not really. The http://.../foo.php request returns html and not php.
  The foo.php file is parsed and executed by the remote server and
  returned to you as html. By adding serie_id=xxx you actually give the
  remote php-script the name and value of the variable.
 
  You should think of include/require as a way to *include* any file
  into your script. Instead of cutting and pasting code into your file,
  you use include. Thats the way it works in practice. No magic is going
  on here :-)
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Passing variables with include()

2002-01-14 Thread Martin Wickman

Scott Houseman wrote:

 Hi Al.
 
 While we are on topic, what are the key differences between include() 
 require() ?


Unlike include(), require()  will always read in the target file, 
even if the line it's on never executes. If you want to conditionally 
include a file, use include(). The conditional statement won't affect 
the require(). However, if the line on which the require() occurs is 
not executed, neither will any of the code in the target file be 
executed.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Passing variables with include()

2002-01-14 Thread Stefan Rusterholz

 Scott Houseman wrote:

  Hi Al.
 
  While we are on topic, what are the key differences between include() 
  require() ?


 Unlike include(), require()  will always read in the target file,
 even if the line it's on never executes. If you want to conditionally
 include a file, use include(). The conditional statement won't affect
 the require(). However, if the line on which the require() occurs is
 not executed, neither will any of the code in the target file be
 executed.

I'm pretty sure that at last for PHP 4.06 or higher this is deprecated. I
don't know why it is still in the manual.
Please correct me if I'm wrong.

best regards
Stefan Rusterholz


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: passing variables between pages without using url??

2001-11-03 Thread Galkov Vladimir

may be you find accepteble usint
input name=id value=? print $id? type=HIDDEN ???



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: passing variables between scripts?

2001-08-31 Thread Paul Procacci

Sessions would definately save the data.  :)

Jon Thompson Coon wrote:

 I can't cope the fact that I loose my variables every time I reload the
 page. If someone could point me to the right direction, I'd be grateful.

 Present problem:

 I have a script that has some globals (surprise). Within this script,
 pretty deep in a function call tree, a function saves a query into an
 array and saves it to a global. Then an user makes an selection and the
 script reloads itself. After this I'd like to my hands on the saved
 query, but the global variable where it's saved seems to get initialised
 on reload. How to get around this? Sessions? I'm pretty new (a
 forthnight and wery little documentation) to server side programming, so
 I'm probably misunderstanding some basics.

 Most of my problems are related to this area, so anyone bold enough to
 anwer will probably pounded with several questions more.

 Thank you in advance
 Jon Thompson Coon


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: passing variables between scripts? End of story

2001-08-31 Thread Jon Thompson Coon

Thank you. Question answered. Several times over.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: passing variables between PHP and Perl

2001-08-21 Thread Richard Lynch

http://php.net/exec/

You can get back whatever Perl spews out to 'stdout' using that.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Tom Beidler [EMAIL PROTECTED]
Newsgroups: php.general
To: php list [EMAIL PROTECTED]
Sent: Sunday, August 19, 2001 6:31 PM
Subject: passing variables between PHP and Perl


 I'm integrating a telephony service into a clients site. I'm pretty handy
 with PHP but I don't have much knowledge of perl. I've setup up my
client's
 site using PHP and the service provided me with a Perl script to make the
 telephone connection. I used virtual() in my PHP script to pass variables
to
 the Perl script but now I need to deal with passing the results from the
 Perl back to PHP.

 Is there something like virtual() in Perl that I could use to relay the
 variables back to my script? Can I call up the Perl variables from my PHP
 script after virtual()?

 Any help would be appreciated.

 Tom



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Passing variables to a file

2001-08-21 Thread Richard Lynch

You could give them a session ID, and then keep foo completely on the
server.
http://php.net/session_start

If you just want it invisible to most users but not really *SECRET*, a
simple POST form works.  They can still see it if they do View Source in
the browser.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Seb Frost [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Sunday, August 19, 2001 4:44 PM
Subject: Passing variables to a file


 OK I know this can be done like so:

 file.php4?foo=bar

 but what if I want to keep the value of foo secret from the user?

 - seb


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: passing variables between PHP and Perl

2001-08-21 Thread Dave

Just a quick addition...  when a PHP script is run as a shell script from a Perl
script (that make sense?) it cannot pass back exit variables to the Perl
script...

Would love to be proven wrong on this as I had to dust off Perl programming for
a RADIUS interface some time ago.

Dave


http://php.net/exec/

You can get back whatever Perl spews out to 'stdout' using that.

 I'm integrating a telephony service into a clients site. I'm pretty handy
 with PHP but I don't have much knowledge of perl. I've setup up my
client's
 site using PHP and the service provided me with a Perl script to make the
 telephone connection. I used virtual() in my PHP script to pass variables
to
 the Perl script but now I need to deal with passing the results from the
 Perl back to PHP.

 Is there something like virtual() in Perl that I could use to relay the
 variables back to my script? Can I call up the Perl variables from my PHP
 script after virtual()?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: passing variables from PHP to Perl script

2001-08-18 Thread Richard Lynch

 I'm trying to integrate an Internet Telephony service for a client. I have
a
 number of variables I need to dump into the clients database and then to
 pass to the Internet Telephony service via a Perl script they have
provided
 for me that will reside on the client's server. Can I somehow pass them
 behind the scenes or should I use a redirect. There is info I need to
keep
 away from the end user, mainly the phone number.

exec(/path/to/perl/script '$phone_number' '$more_data' '$whatever',
$results, $errorcode);
while (list(,$line) = each($results)){
echo $line, BR\n;
}
if ($errorcode){
echo OS Error Code: $errorcode.  Usually path/permissions.  man
errno.BR\n);
}

Or is the Perl script on a *DIFFERENT* server from your PHP script?...  Then
you'll need to use cURL or fopen or something to talk to that server.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Passing variables

2001-05-23 Thread Jon Yaggie

I dont know any other way.  best is if you ssl available to use it on the forms that 
pass these variable but using a form all variables are passed this way either post or 
get through the url.  

Jon