[PHP] Re: PHP newbie ... function with several returns ?

2003-03-15 Thread Robert Dyke

"Jome" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Robert Dyke wrote:
> > Hi ... PHP newbie here.
> >
> > I'm migrating from ASP/vbScript.
> >
> > I'd like to set up a subroutine that will change several variables at
> > once.
> >
> > In VB, I can say:
> >
> > Private Sub Change_Variables ($variable1, $variable2)
> > $variable1 = "Something different from it's original value"
> > $variable2 = "I'm changed also!!"
> > End Sub
> >
> > // in my code I can call it like this:
> > $My_variable1 = "This is the original value of variable1"
> > $My_variable2 = "This is the original value of variable2"
> >
> > Call Change_Variables ($My_variable1, $My_variable2)
> >
> > // after calling this subroutine the variables are changed:
> >
> > print $My_variable1  // yeilds: "Something different from it's
> > original value"
> > print $My_variable2  // yields: "I'm changed also!!"
> >
> > I try to convert this to PHP, and I'm getting stuck.  I'm sure
> > there's a kind of function that can do this.
> >
> > Any ideas?
>
> VB defaults to pass by reference while PHP defaults to pass by
> value.
>
> Read more at: http://www.php.net/manual/en/language.references.pass.php
>
>   Jome

THANKS!!  I inserted the ampersands and it works beautifully ...





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



[PHP] PHP newbie ... function with several returns ?

2003-03-15 Thread Robert Dyke
Hi ... PHP newbie here.

I'm migrating from ASP/vbScript.

I'd like to set up a subroutine that will change several variables at once.

In VB, I can say:

Private Sub Change_Variables ($variable1, $variable2)
$variable1 = "Something different from it's original value"
$variable2 = "I'm changed also!!"
End Sub

// in my code I can call it like this:
$My_variable1 = "This is the original value of variable1"
$My_variable2 = "This is the original value of variable2"

Call Change_Variables ($My_variable1, $My_variable2)

// after calling this subroutine the variables are changed:

print $My_variable1  // yeilds: "Something different from it's original
value"
print $My_variable2  // yields: "I'm changed also!!"

I try to convert this to PHP, and I'm getting stuck.  I'm sure there's a
kind of function that can do this.

Any ideas?

TIA



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



[PHP] Re: How to compile Apache/PHP

2001-12-24 Thread Robert Dyke

Hi Todd:

There is an extremely good book for what you need.  It's called "PHP:  Fast
and easy web development" by Julie C. Meloni (PrimaTech publishers).

The first three chapters cover installation of MySQL, Apache Web Server, and
PHP -- in that order, and with emphasis on configuring them to all work
together.  It gives very easy, step-by-step instructions for both Windows
and Linux environment.  You can't go wrong with these instructions.

You might find it at a library, or you can always find it in a book store.

Good luck!!!

-RD


"Todd Cary" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am quite new to the Linux environment and do not have experience with
> "make" files.  The platform is RH Linux 7.2 with the included Apache and
> the PHP rpm, "php-devel-4.0.4pl1-9.i386.rpm".  I need someone to give me
> the step by step process of creating a version of Apache that will
> process PHP extensions.
>
> Many thanks..
>
> Todd
>
> --
> Todd Cary
> Ariste Software
> [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] 4.0.6 Vs. 4.1.0 ?

2001-12-23 Thread Robert Dyke

Hi ... I'm getting ready to do a custom install of PHP on a Pair Networks
server, and I'm wondering which version I should go with.  It seems like
version 4.1.0 has some major changes and new features, which can sometimes
create bugs in the world of software.

What are your thoughts?  Pros and Cons?

Thanks in advance.


Robert Dyke
Montana Software
http://www.montanasoft.com/
[EMAIL PROTECTED]

* For the best results please include the text of this message (cut and
paste if necessary) in your reply *






-- 
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] If/else conditional statement ... in an include file ...

2001-12-23 Thread Robert Dyke

I apologize for not including all of the information.  I did this as an
include file, which explains why it isn't working:

< !--- beginning of myinclude.php  >



< ! --- end of myinclude.php --- >



< !  beginning of testfile.php --- >

Html here that should display only if $varA  == True

< ?
}  // generic parser error generated here
Else {
?>

HTML that only displays if $varA != True


< ! - End of testfile.php  >


In ASP this works, in PHP it doesn't ... any ideas?


"Michael Sims" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> At 01:11 PM 12/23/2001 -0700, Robert Dyke wrote:
> >Hello:
> >
> >In ASP I can write a Conditional statement like this:
> >
> ><% If $varA == True Then %>
> >Straight HTML in here that only displays if $varA == True
> ><% Else %>
> >Straight HTML in here that only displays if $varA != True
> ><% End if %>
> >
> >Translating this to PHP doesn't work:
> >
> >   // error is generated here ...
> >
> >
> >Is there some way to do it this way in PHP?  I'd rather not create a huge
> >variable and then echo that.
>
> As others have pointed out, the above should work provided that you are
> terminating your curly braces properly.
>
> Another (perhaps easier) option would be to use "alternate syntax" which
is
> more similar to VBScript.  For example, the following works in PHP:
>
> 
> ...html...
> 
> ...html...
> 
>
> Note the colon's which are required.  The endif will need a semicolon if
> there are any other commands after it in the same code block.  Also, I
> don't believe you can mix alternate syntax and normal syntax in the same
> control structure.  For example, the following will probably give an
error:
>
>  if (condition):
>  if (other condition) {
>  do stuff
>  }
> endif;
> ?>
>
> You'd have to use alternate syntax on the nested if statement as well...
>
> I personally prefer alternate syntax when I'm breaking into and out of PHP
> a lot, like the example above.  For more info:
>
> http://www.php.net/manual/en/control-structures.alternative-syntax.php
>



-- 
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] If/else conditional statement ...

2001-12-23 Thread Robert Dyke

Hello:

In ASP I can write a Conditional statement like this:

<% If $varA == True Then %>
Straight HTML in here that only displays if $varA == True
<% Else %>
Straight HTML in here that only displays if $varA != True
<% End if %>

Translating this to PHP doesn't work:

   // error is generated here ...


Is there some way to do it this way in PHP?  I'd rather not create a huge
variable and then echo that.

Thanks in advance.


Robert Dyke
Montana Software
http://www.montanasoft.com/
[EMAIL PROTECTED]

* For the best results please include the text of this message (cut and
paste if necessary) in your reply *






-- 
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] Verisign pfpro functions in Windows environment ... newbie ...

2001-07-20 Thread Robert Dyke

Hi ... I posted this in the php.windows newsgroup and got no answer ...

I'm trying to connect to Verisign Payflo Pro on my home development
machine.  The idea is that I'll do the development in a windows environment,
then upload to a Linux server.

I've loaded the PHP4 win32 binaries (4.0.6), but when I try to use the
pfpro function (which was cut and pasted from the php.net documentation), I
get the following error:

Fatal error: Call to undefined function: pfpro_init()

I've checked the PHP.net documentation and it says "These pfpro functions
are only available if PHP has been compiled with the --with-pfpro[=DIR]
option."

Does anybody know where I can get the win32 binary compiled with that
option?  Is there a line I can add in the php.ini file?

TIA

--

Robert Dyke
[EMAIL PROTECTED]




--

Robert Dyke
Montana Software
http://www.montanasoft.com/
[EMAIL PROTECTED]

* For the best results please include the text of this message (cut and
paste if necessary) in your reply *






-- 
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]