[PHP] newbie question about one php script passing control to another

2008-03-20 Thread Rod Clay
Hello.  I am new to php programming, but have spent many years 
programming in many other languages, most recently perl (with which php 
seems to have much in common!).  In every other language I've worked 
with there is a way for one program to pass control to another.  
However, so far in all of the books and other documentation I've looked 
at for php, I cannot find a way for one php program to pass control to 
another.  Is this possible in php, and, if so, please let me know how.  
Thank you.


Rod Clay
[EMAIL PROTECTED]

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



RE: [PHP] newbie question about one php script passing control to another

2008-03-20 Thread admin
Im not sure I understand the question.

Pass control from index.php to welcome.php ???


index.php : ? echo form action=welcome.php method=postinput type=hidden 
name=tagme value=yesinput type=submit value='Continue'/form; ?

welcome.php ? if($_POST['tagme'] == yes){
echo Congrats you are there;}ELSE{echo You failed;}
?

That kind of pass control?



Hello.  I am new to php programming, but have spent many years 
programming in many other languages, most recently perl (with which php 
seems to have much in common!).  In every other language I've worked 
with there is a way for one program to pass control to another.  
However, so far in all of the books and other documentation I've looked 
at for php, I cannot find a way for one php program to pass control to 
another.  Is this possible in php, and, if so, please let me know how.  
Thank you.

Rod Clay
[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



Re: [PHP] newbie question about one php script passing control to another

2008-03-20 Thread Rod Clay
Yes, let me try to say more about exactly what I'm trying to do.  I have 
a php script running in a browser window (opened specifically for this 
purpose) in which the user keys a blog item, then hits 'submit.'  After 
this script has successfully added the new blog item to the database, 
what I'd like to do is automatically close this window, and pass control 
to the php script that displays the updated list of blog items (with of 
course the newly added blog item) in the original browser window (the 
window the user was looking at when s/he clicked on the 'Add a blog' 
link). 


[EMAIL PROTECTED] wrote:

Im not sure I understand the question.

Pass control from index.php to welcome.php ???


index.php : ? echo form action=welcome.php method=postinput type=hidden name=tagme 
value=yesinput type=submit value='Continue'/form; ?

welcome.php ? if($_POST['tagme'] == yes){
echo Congrats you are there;}ELSE{echo You failed;}
?

That kind of pass control?



Hello.  I am new to php programming, but have spent many years 
programming in many other languages, most recently perl (with which php 
seems to have much in common!).  In every other language I've worked 
with there is a way for one program to pass control to another.  
However, so far in all of the books and other documentation I've looked 
at for php, I cannot find a way for one php program to pass control to 
another.  Is this possible in php, and, if so, please let me know how.  
Thank you.


Rod Clay
[EMAIL PROTECTED]

  


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



Re: [PHP] newbie question about one php script passing control to another

2008-03-20 Thread Daniel Brown
On Thu, Mar 20, 2008 at 12:37 PM, Rod Clay [EMAIL PROTECTED] wrote:
 Yes, let me try to say more about exactly what I'm trying to do.  I have
  a php script running in a browser window (opened specifically for this
  purpose) in which the user keys a blog item, then hits 'submit.'  After
  this script has successfully added the new blog item to the database,
  what I'd like to do is automatically close this window, and pass control
  to the php script that displays the updated list of blog items (with of
  course the newly added blog item) in the original browser window (the
  window the user was looking at when s/he clicked on the 'Add a blog'
  link).

That would be more of a JavaScript issue, really.  Have the user
click a link to refresh the parent and close the child.

On a different note, you probably got made fun of pretty often for
you name (especially last-name-first), eh?  My father's name was Dick
--- no joke.  Yeah he got hell all the time.  ;-P

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

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



Re: [PHP] newbie question about one php script passing control to another

2008-03-20 Thread Rick Pasotto
On Thu, Mar 20, 2008 at 12:08:39PM -0400, Rod Clay wrote:
 Hello.  I am new to php programming, but have spent many years
 programming in many other languages, most recently perl (with which
 php  seems to have much in common!).  In every other language I've
 worked  with there is a way for one program to pass control to
 another.   However, so far in all of the books and other documentation
 I've looked  at for php, I cannot find a way for one php program to
 pass control to  another.  Is this possible in php, and, if so, please
 let me know how.   Thank you.

This may be what you are looking for:

include('next_program');
exit();

If you do this, you have to keep in mind that all the variables you set
in the first program are *still* set in the second.

This is useful when your first program needs to choose which of two or
more programs to run next depending on its calculations. For example, if
your first program does error checking then it might want to run an
all_ok program or an edit program.

-- 
To be without a plan is the true genius and glory of the antislavery
 movement. The mission of that movement is to preach eternal truths, and
 to  bear witness to everlasting testimony against the giant falsehoods
 which bewitch and enslave the land. -- Nathaniel Peabody Rogers
Rick Pasotto[EMAIL PROTECTED]http://www.niof.net

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



Re: [PHP] newbie question about one php script passing control to another

2008-03-20 Thread tedd

At 12:08 PM -0400 3/20/08, Rod Clay wrote:
Hello.  I am new to php programming, but have spent many years 
programming in many other languages, most recently perl (with which 
php seems to have much in common!).  In every other language I've 
worked with there is a way for one program to pass control to 
another.  However, so far in all of the books and other 
documentation I've looked at for php, I cannot find a way for one 
php program to pass control to another.  Is this possible in php, 
and, if so, please let me know how.  Thank you.


Rod Clay
[EMAIL PROTECTED]


Rod:

If what you mean is one program to launch another, then look at this:

http://webbytedd.com/bb/php-run-php/

If you want to pass variables, there's several ways to do that -- 
but, that's a different question.


Cheers,

tedd


--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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