php-general Digest 8 May 2001 07:22:01 -0000 Issue 673

Topics (messages 51803 through 51866):

Converting a binary integer to a number
        51803 by: Siegfried Kettlitz
        51805 by: Zak Greant
        51813 by: Siegfried Kettlitz

OpenSSL compile option
        51804 by: phpman

Re: variable functions: empty/isset/unset invalid?
        51806 by: Gyozo Papp

Variable question
        51807 by: King, Justin
        51808 by: Jack Dempsey
        51810 by: Gyozo Papp
        51811 by: King, Justin
        51814 by: John Vanderbeck
        51815 by: King, Justin
        51816 by: Jack Dempsey
        51818 by: King, Justin
        51820 by: John Vanderbeck
        51821 by: CC Zona
        51824 by: King, Justin
        51825 by: King, Justin
        51828 by: ..s.c.o.t.t.. [gts]

Bound comboboxes on form
        51809 by: Dezider Góra

Re: Book Question - PHP and MySQL Web Development
        51812 by: Luke Welling

Variable Variable with array
        51817 by: Brandon Orther
        51823 by: Gyozo Papp

Mcrypt + urlencode : how to pass encrypted values
        51819 by: Robert Mena

Multiple select box and form submitting
        51822 by: ..s.c.o.t.t.. [gts]
        51830 by: Johnson, Kirk

Re: Variable question (eval is cool)
        51826 by: ..s.c.o.t.t.. [gts]

Need help with Database and variables
        51827 by: Ryan W. Zajicek

Re: Visual PHP Studio 1.0 Field Test 1
        51829 by: Michael Stearne

still getting multiple definitions of symbol _DayNameLong
        51831 by: Jeff Orrok

Variable Variable
        51832 by: Brandon Orther
        51833 by: Altunergil, Oktay

updating flash file with php
        51834 by: py
        51862 by: Luke Welling

PHPmyadmin
        51835 by: Theo Richel
        51836 by: Ryan W. Zajicek
        51837 by: John Vanderbeck
        51838 by: Jack Dempsey

Re: PHPmyadmin - problem remains
        51839 by: Theo Richel

PEAR Versions
        51840 by: Michael Stearne

logical expression 'simplifier'
        51841 by: Gyozo Papp

Refreshing multiple frames?
        51842 by: Brandon Orther
        51843 by: Zak Greant
        51849 by: Data Driven Design
        51860 by: Luke Welling

Problem with PHP 4.0.5
        51844 by: Alvaro Collado
        51845 by: John Vanderbeck
        51848 by: Alvaro Collado
        51850 by: Philip Olson

arrays and strings... a little confusing.
        51846 by: Christian Dechery

session_start ()
        51847 by: shawn
        51866 by: elias

PHP vs Coldfusion and ADO vd API
        51851 by: Jeff
        51855 by: Michael Kimsal

getimagesize
        51852 by: todd kennedy

if else and or ?
        51853 by: Andras Kende
        51856 by: Maxim Maletsky

Call to a member function on a non-object
        51854 by: Ender

Re: Pregunta
        51857 by: Michael Hall

Whether through PHP/MySQL can I talk to Flash Generator's Flash ?
        51858 by: Manisha

Re: PostgreSQL vs. Interbase
        51859 by: Luke Welling

Re: [PHP-DEV] Dynamic Update of DNS ??
        51861 by: Stig Venaas

English ISP
        51863 by: tcuhost.hotmail.com

Re: how to get RAW POST DATA!
        51864 by: ondi

Converting mySQL to PostgreSQL
        51865 by: Jason

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


I have binary data (ie: 0x7b c8 15 0c ) and want to convert it into a 32Bit 
integer (here: 123456789012).

Currently I use this (intel-little-endian):
$integer = hexdec( bin2hex( strrev( readpos( $fd,$position,4 ) ) ) );
readpos reads 4 bytes from a file

Is there a better, faster or easier way to do the same thing?




Use unpack():

// Grab as many signed 32-bit integers as possible
$array = unpack ('l*', $data);


--zak

----- Original Message -----
From: "Siegfried Kettlitz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 12:36 PM
Subject: [PHP] Converting a binary integer to a number


> I have binary data (ie: 0x7b c8 15 0c ) and want to convert it into a
32Bit
> integer (here: 123456789012).
>
> Currently I use this (intel-little-endian):
> $integer = hexdec( bin2hex( strrev( readpos( $fd,$position,4 ) ) ) );
> readpos reads 4 bytes from a file
>
> Is there a better, faster or easier way to do the same thing?
>
> --
> 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]
>





Thanx, I think that will save some time. 

> Use unpack():
> 
> // Grab as many signed 32-bit integers as possible
> $array = unpack ('l*', $data);
> 







Anyone familiar with the new OpenSSL support to work as far as opening and
communicating via a SSL socket?
I saw info regarding it at

http://www.php.net/manual/en/ref.openssl.php

however cannot get the functions to work. i'm just clueless about how to get
it functional.

-dave








> Thanks for the additional code, now I see what you are after. Sorry, I don't
> know the answer, other than using curly braces will fix the problem for
> empty(). Also, a User Contributed Note at
> http://www.php.net/manual/en/functions.php#functions.user-defined has this
> to say:
> 
> <quote>
> there are tons of good uses for this sort of functionality. But it should be
> noted that this will not work with 
> include() 
> include_once() 
> require() 
> require_once() 
> 
> it's safe to assume that this is for safty.
> </quote>
These funtions are directives rather than normal php functions as the manual says. 
I'm  just guessing, maybe empty(), isset() and other variable-testing functions are 
also directives with a function-syntax wrapper and this is the reason why PHP doesn't 
find them as functions (not in the target-list :).

> 
> Kirk
> 
> > -----Original Message-----
> > From: Philip Olson [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 07, 2001 11:45 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [PHP] variable functions: empty/isset/unset invalid?
> > 
> > 
> > 
> > I wish it were that easy.  Also, I'm looking for words on WHY this
> > behavior exists.
> > 
> >   http://www.php.net/manual/en/functions.variable-functions.php
> > 
> > <?php
> > 
> >   // works
> >   if (empty($var)) print '$var is empty<br>';
> >   
> >   // works
> >   $foo = 'is_string';
> >   $var = 'abcdef';   
> >   if ($foo($var)) print '$var is a string<br>';
> >   
> >   // works
> >   $foo = 'strlen';
> >   $var = 'abcdef';
> >   if ($foo($var) > 5) print '$var is over 5 chars<br>';
> >   
> >   // doesn't work : Fatal Error : Call to undefined function: empty()
> >   // same with isset() and unset()
> >   $foo = 'empty';
> >   if ($foo($var)) print '$var is empty';
> >   
> > ?>
> > 
> > In otherwords, only these few functions aren't working as "variable
> > functions" but result in a "Fatal Error" instead.  Why?
> > 
> > 
> > Regards,
> > Philip
> > 
> > On Mon, 7 May 2001, Johnson, Kirk wrote:
> > 
> > > Change the parens around $var to curly braces:
> > > 
> > > if ($foo{$var}) print 'worked.';
> > > 
> > > Kirk
> 
> -- 
> 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]
> 





How can I evaluate a variable in a string?  For example if I have a
string defined as "my user name is $user_data["username"]", how do I
echo that string and have php evaluate $user_data["username"].
 
Thanks in advance..
 
-Justin




you can do it a couple ways...

echo "my user name is " . $user_data["username"];

or

echo "my username is ${user_data["username"]}";

-----Original Message-----
From: King, Justin [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 3:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Variable question


How can I evaluate a variable in a string?  For example if I have a
string defined as "my user name is $user_data["username"]", how do I
echo that string and have php evaluate $user_data["username"].
 
Thanks in advance..
 
-Justin

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






Try this one :

$user_data['username'] = 'Alphonse';
$str = "my user name is {$user_data['username']}";


Papp Gyozo 
- [EMAIL PROTECTED]

----- Original Message ----- 
From: "King, Justin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 7. 21:48
Subject: [PHP] Variable question


How can I evaluate a variable in a string?  For example if I have a
string defined as "my user name is $user_data["username"]", how do I
echo that string and have php evaluate $user_data["username"].
 
Thanks in advance..
 
-Justin

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






I think you're misunderstanding my question.  I'm pulling
$user_data["username"] from a databse so the string my user name is
$user_data["username"]" is exactly as the database hands it to me.  I
know how to simply concat information.

-Justin

-----Original Message-----
From: "Jack Dempsey" <[EMAIL PROTECTED]> 
Sent: Monday, May 07, 2001 12:55 PM
To: King, Justin; [EMAIL PROTECTED]
Subject: RE: [PHP] Variable question

you can do it a couple ways...

echo "my user name is " . $user_data["username"];

or

echo "my username is ${user_data["username"]}";

-----Original Message-----
From: King, Justin [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 3:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Variable question


How can I evaluate a variable in a string?  For example if I have a
string defined as "my user name is $user_data["username"]", how do I
echo that string and have php evaluate $user_data["username"].
 
Thanks in advance..
 
-Justin

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





I'm not sure what you mean...

[code]
$query = "SELECT username FROM Users WHERE userid=1";
$result = mysql_query($query, $link);
$user_data = mysql_fetch_assoc($result);
echo "my user name is ".$user_data["username"];
[/code]

Is that _not_ what you mean?

- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign, the industry source for game design and development issues
 

> -----Original Message-----
> From: King, Justin [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 3:58 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Variable question
> 
> 
> I think you're misunderstanding my question.  I'm pulling
> $user_data["username"] from a databse so the string my user name is
> $user_data["username"]" is exactly as the database hands it to me.  I
> know how to simply concat information.
> 
> -Justin
> 
> -----Original Message-----
> From: "Jack Dempsey" <[EMAIL PROTECTED]> 
> Sent: Monday, May 07, 2001 12:55 PM
> To: King, Justin; [EMAIL PROTECTED]
> Subject: RE: [PHP] Variable question
> 
> you can do it a couple ways...
> 
> echo "my user name is " . $user_data["username"];
> 
> or
> 
> echo "my username is ${user_data["username"]}";
> 
> -----Original Message-----
> From: King, Justin [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 3:49 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Variable question
> 
> 
> How can I evaluate a variable in a string?  For example if I have a
> string defined as "my user name is $user_data["username"]", how do I
> echo that string and have php evaluate $user_data["username"].
>  
> Thanks in advance..
>  
> -Justin
> 
> -- 
> 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]
> 
> 




Here let me flesh this out a bit more

Consider the query "SELECT datafield FROM myTable WHERE id=1";

This would return "My username is $userdata["username"]";

I want to then output what the database returns, and have php evaluate
my variables. 

-Justin





ok, look into eval()

-----Original Message-----
From: King, Justin [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 4:07 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Variable question


Here let me flesh this out a bit more

Consider the query "SELECT datafield FROM myTable WHERE id=1";

This would return "My username is $userdata["username"]";

I want to then output what the database returns, and have php evaluate
my variables. 

-Justin


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






A simple eval($mysqldata) isn't going to do it though since the string
is "Your username is $userdata["username"]"; it'll just spit a parse
error.  I've already tried that

-Justin

-----Original Message-----
From: "Jack Dempsey" <[EMAIL PROTECTED]> 
Sent: Monday, May 07, 2001 1:13 PM
To: King, Justin; [EMAIL PROTECTED]
Subject: RE: [PHP] Variable question

ok, look into eval()

-----Original Message-----
From: King, Justin [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 4:07 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Variable question


Here let me flesh this out a bit more

Consider the query "SELECT datafield FROM myTable WHERE id=1";

This would return "My username is $userdata["username"]";

I want to then output what the database returns, and have php evaluate
my variables. 

-Justin


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





How about manually parsing the string out to give you chunks, that can then
be eval'd easy.

- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign, the industry source for game design and development issues


> -----Original Message-----
> From: King, Justin [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 4:18 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Variable question
>
>
> A simple eval($mysqldata) isn't going to do it though since the string
> is "Your username is $userdata["username"]"; it'll just spit a parse
> error.  I've already tried that
>
> -Justin
>
> -----Original Message-----
> From: "Jack Dempsey" <[EMAIL PROTECTED]>
> Sent: Monday, May 07, 2001 1:13 PM
> To: King, Justin; [EMAIL PROTECTED]
> Subject: RE: [PHP] Variable question
>
> ok, look into eval()
>
> -----Original Message-----
> From: King, Justin [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 4:07 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Variable question
>
>
> Here let me flesh this out a bit more
>
> Consider the query "SELECT datafield FROM myTable WHERE id=1";
>
> This would return "My username is $userdata["username"]";
>
> I want to then output what the database returns, and have php evaluate
> my variables.
>
> -Justin
>
>
> --
> 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]
>





In article 
<[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("King, Justin") wrote:

> A simple eval($mysqldata) isn't going to do it though since the string
> is "Your username is $userdata["username"]"; it'll just spit a parse
> error.  I've already tried that

The code being eval'd has to be a valid PHP statement.  So if you want to 
echo that string, then "echo" must be part of the eval'd code.  Terminated 
with semi-colon, etc.

eval("echo 'Your username is ' . $userdata['username'];");

-- 
CC





I understand that, but that's what I'm trying to get around doing.

-Justin

-----Original Message-----
From: CC Zona <[EMAIL PROTECTED]> 
Sent: Monday, May 07, 2001 1:24 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Variable question

In article 
<[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("King, Justin") wrote:

> A simple eval($mysqldata) isn't going to do it though since the string
> is "Your username is $userdata["username"]"; it'll just spit a parse
> error.  I've already tried that

The code being eval'd has to be a valid PHP statement.  So if you want
to 
echo that string, then "echo" must be part of the eval'd code.
Terminated 
with semi-colon, etc.

eval("echo 'Your username is ' . $userdata['username'];");

-- 
CC

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





I'm trying to get around having to do that, I don't know regular
expressions so it makes it difficult :(

-Justin

-----Original Message-----
From: "John Vanderbeck" <[EMAIL PROTECTED]> 
Sent: Monday, May 07, 2001 1:21 PM
To: King, Justin; [EMAIL PROTECTED]
Subject: RE: [PHP] Variable question

How about manually parsing the string out to give you chunks, that can
then
be eval'd easy.

- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign, the industry source for game design and development issues


> -----Original Message-----
> From: King, Justin [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 4:18 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Variable question
>
>
> A simple eval($mysqldata) isn't going to do it though since the string
> is "Your username is $userdata["username"]"; it'll just spit a parse
> error.  I've already tried that
>
> -Justin
>
> -----Original Message-----
> From: "Jack Dempsey" <[EMAIL PROTECTED]>
> Sent: Monday, May 07, 2001 1:13 PM
> To: King, Justin; [EMAIL PROTECTED]
> Subject: RE: [PHP] Variable question
>
> ok, look into eval()
>
> -----Original Message-----
> From: King, Justin [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 4:07 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Variable question
>
>
> Here let me flesh this out a bit more
>
> Consider the query "SELECT datafield FROM myTable WHERE id=1";
>
> This would return "My username is $userdata["username"]";
>
> I want to then output what the database returns, and have php evaluate
> my variables.
>
> -Justin
>
>
> --
> 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]
>


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





this also works, since you mentioned that you're trying to
get away from evalling an "echo" statement.

$bob = "Roy";
$s = 'Hey there $bob';
$s = '$somevar = "'. $s .'";';
eval ($s);
print $somevar;

prints: "Hey there Roy";

personally, i think that using regexps to implement 
an entire symbol parsing engine to do what you ask
is something that you really do not need to do.

instead of trying to reinvent the wheel, use
the free ferarri that PHP provides you :)



> -----Original Message-----
> From: King, Justin [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 4:29 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Variable question
> 
> 
> I'm trying to get around having to do that, I don't know regular
> expressions so it makes it difficult :(
> 
> -Justin
> 
> -----Original Message-----
> From: "John Vanderbeck" <[EMAIL PROTECTED]> 
> Sent: Monday, May 07, 2001 1:21 PM
> To: King, Justin; [EMAIL PROTECTED]
> Subject: RE: [PHP] Variable question
> 
> How about manually parsing the string out to give you chunks, that can
> then
> be eval'd easy.
> 
> - John Vanderbeck
> - Admin, GameDesign (http://gamedesign.incagold.com/)
> - GameDesign, the industry source for game design and development issues
> 
> 
> > -----Original Message-----
> > From: King, Justin [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 07, 2001 4:18 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [PHP] Variable question
> >
> >
> > A simple eval($mysqldata) isn't going to do it though since the string
> > is "Your username is $userdata["username"]"; it'll just spit a parse
> > error.  I've already tried that
> >
> > -Justin
> >
> > -----Original Message-----
> > From: "Jack Dempsey" <[EMAIL PROTECTED]>
> > Sent: Monday, May 07, 2001 1:13 PM
> > To: King, Justin; [EMAIL PROTECTED]
> > Subject: RE: [PHP] Variable question
> >
> > ok, look into eval()
> >
> > -----Original Message-----
> > From: King, Justin [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 07, 2001 4:07 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [PHP] Variable question
> >
> >
> > Here let me flesh this out a bit more
> >
> > Consider the query "SELECT datafield FROM myTable WHERE id=1";
> >
> > This would return "My username is $userdata["username"]";
> >
> > I want to then output what the database returns, and have php evaluate
> > my variables.
> >
> > -Justin
> >
> >
> > --
> > 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]
> >
> 
> 
> -- 
> 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]
> 




I want to create two bound comboboxes for selecting cell operators
within a range of available countries.
I want it behave like this:
Combo 1 will consist of list of available contries -> user selects a
country and the second combo will requery the database and show the list
od of all available ooperators in this contry.
I've searched the phpclasses and found the class called "linked_select",
but I'm having problems with it.
So I'm thinking about embedding and iframe which will contain only the
second combo and requerying will be done replacing a a source url when
user selects a country from first combo using a javascript onChange
event.
Now here's my question. Is this doable?
If yes, how do I get the value from the second combo into original form
for submitting? When I create an iframe from within a from, will the
value be submitted with the form or not?

Any thoughts greatly welcome.
tia,
    Dezider.






Egon Wrote:
> On Tue, May 08, 2001 at 01:24:02AM +1000, Luke Welling wrote:
>
> > I was wondering if anybody out there who has a copy of my book has found
any
> > errors.
> >
> > If you have noticed any errors in "PHP and MySQL Web Development" by
Luke
> > Welling and Laura Thomson, and have a second, could you drop me an
email?
> >
> > I don't think there will be too many, but I would like to get anything
> > possible fixed for the second printing.
>
> Can you provide a link to a bugs page? If I get something like that, I
> will link it under "more infos" on the books page on php.net.
>
> This works very well with our German PHP book and the second printing is
> on the way.
That sounds like an excellent idea.  It will be a very short page today, but
I am sure it will grow.
http://www.tangledweb.com.au/errata.php

Thanks.

Luke Welling.






Hello,

        I am trying to use variable variable.  with arrays.  this may be hard to
understand so here is an example:

$menu1[0] = "1";
$menu1[1] = "2";
$menu1[2] = "3";

$menu2[0] = "1";
$menu2[1] = "2";
$menu2[2] = "3";

$menu3[0] = "1";
$menu3[1] = "2";
$menu3[2] = "3";

does anyone know the proper way to use variable variable with arrays?

Thanks

Brandon





are you thinking of what this snippet does:

$menu = 'menu2';
$i = 2;
echo ${$menu}[$i];

----- Original Message ----- 
From: "Brandon Orther" <[EMAIL PROTECTED]>
To: "PHP User Group" <[EMAIL PROTECTED]>
Sent: 2001. május 7. 22:16
Subject: [PHP] Variable Variable with array


> Hello,
> 
> I am trying to use variable variable.  with arrays.  this may be hard to
> understand so here is an example:
> 
> $menu1[0] = "1";
> $menu1[1] = "2";
> $menu1[2] = "3";
> 
> $menu2[0] = "1";
> $menu2[1] = "2";
> $menu2[2] = "3";
> 
> $menu3[0] = "1";
> $menu3[1] = "2";
> $menu3[2] = "3";
> 
> does anyone know the proper way to use variable variable with arrays?
> 
> Thanks
> 
> Brandon
> 
> 
> -- 
> 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]
> 





Hi I am developing an application which will encrypt
(using mcrypt library) some data.

Everyting is ok except the fact that I can no longer
have links (GET) passing the values. 

For ex.
I used to have
a href="script.php?plaintext=foobar"

now I need to pass that foobar value encrypted.

a
href="script.php?iv=Z%A3%BCH%B7%ED%EDo&encrypted=ÀšœÒÿk‰~"

How do I make it work?  urlencode seems to break when
I use with encrypted data.

hidden post variables are not an option.  Sessions
either.

thanks

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/




i apologize in advance if the answer to my question is
glaringly obvious.

i've got a multiple select on a form and want to
find out *all* selected values.

the form looks like so:

<SELECT NAME="form[category]" MULTIPLE>
<OPTION VALUE="0">First
<OPTION VALUE="1">Second
<OPTION VALUE="2">Third
</SELECT>

when the form submits, $form['category'] is not
an array of selected values, but rather a single
value.  even if i select two or three things,
$form['category'] is still one value.  can
anyone tell me how to get a list of all selected
values in the box?

thanks in advance...




Use empty brackets in the name attribute, e.g., <SELECT NAME="form[]"
MULTIPLE>. PHP will then create an array indexed by numbers. PHP will
automatically assign indices in assignments if you omit the index: 

<?
$array[] = "foo";
$array[] = "bar";
echo $array[0]."<br>";
echo $array[1]."<br>";
?>

Kirk

> -----Original Message-----
> From: ..s.c.o.t.t.. [gts] [mailto:[EMAIL PROTECTED]]
> Subject: [PHP] Multiple select box and form submitting
> 
> i've got a multiple select on a form and want to
> find out *all* selected values.
> 
> the form looks like so:
> 
> <SELECT NAME="form[category]" MULTIPLE>
> <OPTION VALUE="0">First
> <OPTION VALUE="1">Second
> <OPTION VALUE="2">Third
> </SELECT>
> 
> when the form submits, $form['category'] is not
> an array of selected values, but rather a single
> value.  even if i select two or three things,
> $form['category'] is still one value.  can
> anyone tell me how to get a list of all selected
> values in the box? 




$bob = "Roy";
$s = 'Hey there $bob';
$s = 'print "'. $s .'";';
eval ($s);

prints: "Hey there Roy";

perhaps that's what you're looking for?


> -----Original Message-----
> From: John Vanderbeck [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 4:21 PM
> To: King, Justin; [EMAIL PROTECTED]
> Subject: RE: [PHP] Variable question
> 
> 
> How about manually parsing the string out to give you chunks, that can then
> be eval'd easy.
> 
> - John Vanderbeck
> - Admin, GameDesign (http://gamedesign.incagold.com/)
> - GameDesign, the industry source for game design and development issues
> 
> 
> > -----Original Message-----
> > From: King, Justin [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 07, 2001 4:18 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [PHP] Variable question
> >
> >
> > A simple eval($mysqldata) isn't going to do it though since the string
> > is "Your username is $userdata["username"]"; it'll just spit a parse
> > error.  I've already tried that
> >
> > -Justin
> >
> > -----Original Message-----
> > From: "Jack Dempsey" <[EMAIL PROTECTED]>
> > Sent: Monday, May 07, 2001 1:13 PM
> > To: King, Justin; [EMAIL PROTECTED]
> > Subject: RE: [PHP] Variable question
> >
> > ok, look into eval()
> >
> > -----Original Message-----
> > From: King, Justin [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 07, 2001 4:07 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [PHP] Variable question
> >
> >
> > Here let me flesh this out a bit more
> >
> > Consider the query "SELECT datafield FROM myTable WHERE id=1";
> >
> > This would return "My username is $userdata["username"]";
> >
> > I want to then output what the database returns, and have php evaluate
> > my variables.
> >
> > -Justin
> >
> >
> > --
> > 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]
> >
> 
> 
> -- 
> 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]
> 




Hello,

I was wondering if I do a database query like "SELECT count(*) FROM
table_name AS song_count" if there is a way I can assign song_count to a
variable that is accessable anywhere on the page and not just in a "WHILE"
statement?

Thanks is advance

Ryan
mailto:[EMAIL PROTECTED]





Yeah, I hope it's a MacOS app also.

Michael


Meir kriheli wrote:

>On Tuesday 08 May 2001 00:39, elias wrote:
>
>Is it a windows app (I hope it isn't)?
>







Thanks to Andrew and Cameron for assisting with my mosxs build of php
and apache.

But I am still stuck with the following:

dyld: /usr/sbin/httpd multiple definitions of symbol _DayNameLong
/usr/sbin/httpd definition of _DayNameLong
/System/Library/Apache/Modules/libphp4.so definition of _DayNameLong
/usr/sbin/apachectl start: httpd could not be started


--
:-J
--




Hello,

I can't find Variable Variable in the php manual.  If someone has a link to
the section in the PHP manual about this please send me a link.

Thank you,
Brandon Orther





http://www.php.net/manual/en/language.variables.variable.php

-----Original Message-----
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 4:53 PM
To: PHP User Group
Subject: [PHP] Variable Variable


Hello,

I can't find Variable Variable in the php manual.  If someone has a link to
the section in the PHP manual about this please send me a link.

Thank you,
Brandon Orther


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




Hello,
any of you has a tutorial/info on how to update a flash file (swf) with a php script ?
(data coming from a text file and a database)

py




py wrote:
> any of you has a tutorial/info on how to update a flash file (swf) with a
php script ?
> (data coming from a text file and a database)
I have not seen a tutorial, but there are two simple working examples in
Rasmus' Intro to PHP presentation here:
http://conf.php.net/pres/index.php?p=slides%2Fintro&id=ac2

Cheers,

Luke Welling
----------
PHP and MySQL Web Development
by Luke Welling and Laura Thomson
http://www.amazon.com/exec/obidos/ASIN/0672317842/tangledwebdesign











Can anyone please tell me how to load a structure and datadumpfile  (*.sql)
into an empty database by means of PHPMyadmin? (I know there is a separate
forum for this, but either this is a stupid question or there is no one
there who knows an answer, it stays silent).
I know how to do it through Telnet, but I have no Telnet access right now.

Thanks in advance,

Theo Richel





Theo,

Make sure the database exists, then click on the database name on the left
hand side of the screen.  Now on the right hand side of the screen it should
say something like no tables exist and below that you'll see some form
fields.  Look for the one that says "Run SQL query/queries on database" and
you should see a "browse" button just below that.  Click the browse button
and select the location of the sql file and click "go".  (Just a side note
here, the file has to be on your local hard drive).

Thank You

Ryan W. Zajicek
mailto:[EMAIL PROTECTED]


-----Original Message-----
From: Theo Richel [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 4:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHPmyadmin




Can anyone please tell me how to load a structure and datadumpfile  (*.sql)
into an empty database by means of PHPMyadmin? (I know there is a separate
forum for this, but either this is a stupid question or there is no one
there who knows an answer, it stays silent).
I know how to do it through Telnet, but I have no Telnet access right now.

Thanks in advance,

Theo Richel


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






I'm curious,

Where can I get a copy of PHPmyadmin?
Up till now, I have done all my database work strictly through php code and
sql statements, which as you can imagine is cumbersome.  Sounds like this
might be easier?  I'm starting up another project right now, and will have
to be creating a bunch of new databases, and tables.

Thanks!

- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign, the industry source for game design and development issues


> -----Original Message-----
> From: Ryan W. Zajicek [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 5:19 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [PHP] PHPmyadmin
>
>
> Theo,
>
> Make sure the database exists, then click on the database name on the left
> hand side of the screen.  Now on the right hand side of the
> screen it should
> say something like no tables exist and below that you'll see some form
> fields.  Look for the one that says "Run SQL query/queries on
> database" and
> you should see a "browse" button just below that.  Click the browse button
> and select the location of the sql file and click "go".  (Just a side note
> here, the file has to be on your local hard drive).
>
> Thank You
>
> Ryan W. Zajicek
> mailto:[EMAIL PROTECTED]
>
>
> -----Original Message-----
> From: Theo Richel [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 4:08 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHPmyadmin
>
>
>
>
> Can anyone please tell me how to load a structure and
> datadumpfile  (*.sql)
> into an empty database by means of PHPMyadmin? (I know there is a separate
> forum for this, but either this is a stupid question or there is no one
> there who knows an answer, it stays silent).
> I know how to do it through Telnet, but I have no Telnet access right now.
>
> Thanks in advance,
>
> Theo Richel
>
>
> --
> 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]
>
>





http://www.phpwizard.net/projects/phpMyAdmin/

-----Original Message-----
From: John Vanderbeck [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 5:21 PM
To: Ryan W. Zajicek; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP] PHPmyadmin


I'm curious,

Where can I get a copy of PHPmyadmin?
Up till now, I have done all my database work strictly through php code and
sql statements, which as you can imagine is cumbersome.  Sounds like this
might be easier?  I'm starting up another project right now, and will have
to be creating a bunch of new databases, and tables.

Thanks!

- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign, the industry source for game design and development issues


> -----Original Message-----
> From: Ryan W. Zajicek [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 5:19 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [PHP] PHPmyadmin
>
>
> Theo,
>
> Make sure the database exists, then click on the database name on the left
> hand side of the screen.  Now on the right hand side of the
> screen it should
> say something like no tables exist and below that you'll see some form
> fields.  Look for the one that says "Run SQL query/queries on
> database" and
> you should see a "browse" button just below that.  Click the browse button
> and select the location of the sql file and click "go".  (Just a side note
> here, the file has to be on your local hard drive).
>
> Thank You
>
> Ryan W. Zajicek
> mailto:[EMAIL PROTECTED]
>
>
> -----Original Message-----
> From: Theo Richel [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 4:08 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHPmyadmin
>
>
>
>
> Can anyone please tell me how to load a structure and
> datadumpfile  (*.sql)
> into an empty database by means of PHPMyadmin? (I know there is a separate
> forum for this, but either this is a stupid question or there is no one
> there who knows an answer, it stays silent).
> I know how to do it through Telnet, but I have no Telnet access right now.
>
> Thanks in advance,
>
> Theo Richel
>
>
> --
> 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]






Yes the database exists
Indeed there are no tables
There IS an option to run SQL Queries
BUT
There is no Browse button here.
(there is a browse button when one HAS a table  - but this one is for
browsing the table - and in the insert file option there is a way to browse
to the file on the local disk (but this one doesn't know how to handle an
sql file or create a table from it).

Thanks for the input.

Theo

-----Original Message-----
From: Ryan W. Zajicek [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 11:19 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP] PHPmyadmin

Theo,

Make sure the database exists, then click on the database name on the left
hand side of the screen.  Now on the right hand side of the screen it should
say something like no tables exist and below that you'll see some form
fields.  Look for the one that says "Run SQL query/queries on database" and
you should see a "browse" button just below that.  Click the browse button
and select the location of the sql file and click "go".  (Just a side note
here, the file has to be on your local hard drive).

Thank You

Ryan W. Zajicek
mailto:[EMAIL PROTECTED]


-----Original Message-----
From: Theo Richel [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 4:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHPmyadmin




Can anyone please tell me how to load a structure and datadumpfile  (*.sql)
into an empty database by means of PHPMyadmin? (I know there is a separate
forum for this, but either this is a stupid question or there is no one
there who knows an answer, it stays silent).
I know how to do it through Telnet, but I have no Telnet access right now.

Thanks in advance,

Theo Richel


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





    I have a version of PEAR installed now with 4.0.3pl1.  I need some 
of the newer versions of the functions that have been added since then.  
I need mysql's afftedRows for instance.  I see in the 4.0.5 of PEAR that 
was given with 4.0.5 that some function have "since 4.0.5" in PEAR.php 
in particular.  Is there anyway to upgrade my PEAR to a new version 
without going to 4.0.5 on the web server?

Thanks,
Michael






Hello, girls and boys,

my question sounds a bit strange, but it 's very important for me to simplify my 
database queries.
So, is there any known and implementable algorithm that simplifies an arbitrary 
logical expression such as:
(either in PHP-style and in mathematical forms separated by comma)
(A && B) || (B && C) , (A ^ B) v (B ^ C) to:
---------------------
(A || C) && B ,  (A v C) ^ B. // applying distribution rule - I guess this is the 
english name 

or an other ( in PHP-style or if you love better )
(A && B) || B , (A ^ B) v B  to :
--------------
B 

As above I mentioned i'm looking for an algorithm that can be implemented in PHP which 
does as most as possible.
This kind of simplifications is also used in the 'FROM' clause of the SQL-query, and 
that's why I can't pass this job to the DB.

Papp Gyozo 
- [EMAIL PROTECTED]





Hello,

I am using php with frames for a menu bar.  In one frame I have a menu.
When the link is clicked on the menu I would like two frames to be updated.
Is there a way to do this?

Brandon





You are going to need Javascript to do this.

--zak


----- Original Message -----
From: "Brandon Orther" <[EMAIL PROTECTED]>
To: "PHP User Group" <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 5:19 PM
Subject: [PHP] Refreshing multiple frames?


> Hello,
>
> I am using php with frames for a menu bar.  In one frame I have a menu.
> When the link is clicked on the menu I would like two frames to be
updated.
> Is there a way to do this?
>
> Brandon
>
>
> --
> 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]
>





Link to another frameset page if you choose not to use javascript. But IMO
there's no such thing as a proper use of frames. Frames should never be used
for anything.

Data Driven Design
P.O. Box 1084
Holly Hill, Florida 32125-1084

http://www.datadrivendesign.com
http://www.rossidesigns.net
----- Original Message -----
From: Brandon Orther <[EMAIL PROTECTED]>
To: PHP User Group <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 7:19 PM
Subject: [PHP] Refreshing multiple frames?


> Hello,
>
> I am using php with frames for a menu bar.  In one frame I have a menu.
> When the link is clicked on the menu I would like two frames to be
updated.
> Is there a way to do this?
>
> Brandon
>
>
> --
> 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]
>
>






"Brandon Orther" wrote:
> I am using php with frames for a menu bar.  In one frame I have a menu.
> When the link is clicked on the menu I would like two frames to be
updated.
> Is there a way to do this?

As others have said, this is a JavaScript task not a PHP task.

I am pretty sure there is an example at www.htmlgoodies.com.

Cheers,

Luke Welling
----------
PHP and MySQL Web Development
by Luke Welling and Laura Thomson
http://www.amazon.com/exec/obidos/ASIN/0672317842/tangledwebdesign







I have installed PHP4.0.5 in a Red Hat Linux 6.0 with Apache.
When I run the test no problem, all is OK, but when I run a html index file in 
Netscape ( LocalHost )
whith a single code like this 

<? echo("Anythig"); ?> 

nothing was display, nothing.

When I change the code for an know error for example <xxxx > Netscape prints the full 
text of the tag
"<xxxx >" .

Please help me.

Thanks





Try,

<?PHP
echo "This is a test<br>\n";
?>

Some systems are configured to not allow the shorthand "<?" and instead
REQUIRE the full code start "<?PHP"


- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign, the industry source for game design and development issues


> -----Original Message-----
> From: Alvaro Collado [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 8:36 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Problem with PHP 4.0.5
>
>
> I have installed PHP4.0.5 in a Red Hat Linux 6.0 with Apache.
> When I run the test no problem, all is OK, but when I run a html
> index file in Netscape ( LocalHost )
> whith a single code like this
>
> <? echo("Anythig"); ?>
>
> nothing was display, nothing.
>
> When I change the code for an know error for example <xxxx >
> Netscape prints the full text of the tag
> "<xxxx >" .
>
> Please help me.
>
> Thanks
>
>






Mr . John Vanderbeck

None of both codes works, all this test were do.
The Netscape ingnore all the tags with <? or <?php for echo or print command.

Thanks

-------------------------------------------------------------------------------------------
Try,

<?PHP
echo "This is a test<br>\n";
?>

Some systems are configured to not allow the shorthand "<?" and instead
REQUIRE the full code start "<?PHP"

- John Vanderbeck
- Admin, GameDesign (http://gamedesign.incagold.com/)
- GameDesign, the industry source for game design and development issues







1. What file extension are you using for your test file?
2. Is this extension found around httpd.conf in a form similar to :

   AddType application/x-httpd-php .php .php3 .html .phtml .parsemephp

When you stated "All works ok except ..." what works ok?

Regards,
Philip

On Mon, 7 May 2001, Alvaro Collado wrote:

> 
> Mr . John Vanderbeck
> 
> None of both codes works, all this test were do.
> The Netscape ingnore all the tags with <? or <?php for echo or print command.
> 
> Thanks
> 
> 
>-------------------------------------------------------------------------------------------
> Try,
> 
> <?PHP
> echo "This is a test<br>\n";
> ?>
> 
> Some systems are configured to not allow the shorthand "<?" and instead
> REQUIRE the full code start "<?PHP"
> 
> - John Vanderbeck
> - Admin, GameDesign (http://gamedesign.incagold.com/)
> - GameDesign, the industry source for game design and development issues
> 
> 
> 






Whats is the difference between [] and {} ?

        define(NL,"<br>\n");
        $str="How do you do?";
        echo $str[3].NL;
        echo $str{3}.NL;
        $array = array("how","do","you","do?");
        echo $array[2].NL;
        echo $array{2}.NL;

this outputs
d
d
you
you

so there's no difference right? When does a string become an array and 
vice-versa?
if I do $str=(array)$str; then $str[0] will contain "How do you do?" but if 
I do $array=(string)$array then $array contains the string "Array", so it 
doesn't work both ways. How does PHP works with this? I come from C where a 
string and an array of char is exactly the same thing, so this kinda 
confuses me.
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer





When using session_start () over alot of pages, do i need to reregister the origional 
session? 
example:

page1:session_start();
          session_register('data');

page2:session_start();

page3:session_start();
          session_register('data');

new to sessions, (no really), so thanks for the help, ill be going through the manual 
while I wait :-)

Shawn




You register it just when you want to assign to it a value,
ie:
 page1.php
session_start();
session_register("username");

$username = "shawn";

page2.php
session_start();
echo "Welcome $username";

page3.php
session_start();
echo "Welcome again $username"


so basically, register once and use session_start() to retreive whatever
registered sessions!

-elias
http://www.eassoft.cjb.net

""shawn"" <[EMAIL PROTECTED]> wrote in message
003001bfb88d$d88bbfc0$[EMAIL PROTECTED]">news:003001bfb88d$d88bbfc0$[EMAIL PROTECTED]...
When using session_start () over alot of pages, do i need to reregister the
origional session?
example:

page1:session_start();
          session_register('data');

page2:session_start();

page3:session_start();
          session_register('data');

new to sessions, (no really), so thanks for the help, ill be going through
the manual while I wait :-)

Shawn







I have two questions:

1) I've seen a lot of benching by pc magazine and they're saying how
great cold fusion is and how bad php is.  However, they don't use Zend
in any of their tests.  Does anyone know of benchmarks against popular
systems that include php + Zend?

2) What is the performance gain by using an API vs database abstraction
layers, like ADO?

Thanks,

Jeff







On Mon, 7 May 2001, Jeff wrote:

> I have two questions:
> 
> 1) I've seen a lot of benching by pc magazine and they're saying how
> great cold fusion is and how bad php is.  However, they don't use Zend
> in any of their tests.  Does anyone know of benchmarks against popular
> systems that include php + Zend?

Every PHP4 includes 'Zend' - it's the underlying engine that powers PHP.
Did you mean the zend optimizer?  the zend cache?  The only thing an
optimizer or cache would buy you is speed, which PHP is definitely not
lacking compared with many other systems.  The most recent 'shoot out' in
memory is ZDNet's 'eweek' thing.  They flat out print that PHP is the
fastest in their benchmark, ASP being the second fastest (becoming the
first after MS tweaked the benchmark and resubmmited optimized code).  CF
was third or fourth down.  But they rated it highest because of purported
ease of development (GUI editor, drag and drop queries, etc.)


> 
> 2) What is the performance gain by using an API vs database abstraction
> layers, like ADO?

An any abstraction layer is going to add at least a small % to the overall
processing time, because it's abstracting - having to do extra conversions
that wouldn't be necessary hardcoding for one database.  But you gain
flexbility should you need to move datbases later on.

 > > Thanks,
> 
> Jeff
> 
> 
> -- 
> 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]
> 





i'm having some odd problems with getimagesize.

sometimes it works, sometimes it doesn't.

this is the code i'm calling it with:
$p_size = getimagesize($photos[$start]);

where $photos[$start] has the value im000301.jpg.  the php file and the
image file are located in the same directory.

this does work however:
$p_size = getimagesize("im000301.jpg");


any clues?

thanks.
todd





Hello,

I started to do a php page with mysql connection..

My problem is:

I do query from a mysql, I try to setup usernames + passwords
to protect the database

They would need to use specific user+password+cities to be able to connect.
Bad passwd would just print an access denied messsage..

http://www.cmtsite.com/schedules/
name=1 passwd=1 city=HOU
name=2 passwd=2 city=LAX
name=3 passwd=3 city=TAM
pl: http://www.cmtsite.com/schedules/media.php?city=HOU&name=1&passwd=1

Actually its working ok but i have add more user+pass but then it just goes
to the }else statement ??

I really would like to store  the usernames, passwords in the php code for
simplicity...

ATLWL  31128595
ATLSM  31128576
DFWSS  31133977
HOUFA  31146832
HOUBL  31146825
LAXSC  31152972
MIAJJ  31164255
TAMVH  31182684
TAMTK  31182685


Below my php file...

Thanks for any help!

Andrew

> <?
> include ('../menu.html');
>
> if
> (
> (($name=="1") and ($passwd=="1") and ($city=="HOU"))
> or
> (($name=="2") and ($passwd=="2") and ($city=="LAX"))
> or
> (($name=="3") and ($passwd=="3") and ($city=="TAM"))
> )
> {
>
> echo "<br>";
>
> echo "<center><font face=verdana color=red size=2><b>";
>
> if (strstr($city,"HOU")) {
> echo "Market: Houston, Texas";
> }
> if (strstr($city,"LAX")) {
> echo "Market: Los Angeles, California";
> }
> if (strstr($city,"ATL")) {
> echo "Market: Atlanta, Georgia";
> }
> if (strstr($city,"TAM")) {
> echo "Market: Tampa, Florida";
> }
> if (strstr($city,"ORL")) {
> echo "Market: Orlando, Florida";
> }
> if (strstr($city,"DFW")) {
> echo "Market: Dallas/Fort Worth, Texas";
> }
> if (strstr($city,"BIR")) {
> echo "Market: Birmingham, Alabama";
> }
> if (strstr($city,"MIA")) {
> echo "Market: Miami, Florida";
> }
>
> echo "</b></font><center><br>";
>
> $db=mysql_connect("zz.com:3306","zz","zz");
> mysql_select_db("cmt",$db);
>
> if (strstr($city,"HOU")) {
> $aresult=mysql_query("select * from media where d like '%HOU%' or d like
'%MCA%' or d like '%BMT%' order by i" ,$db);
> }
> else {
> $aresult=mysql_query("select * from media where d like '$city' order by i"
,$db);
> }
>
> echo "
> <table align=center width=95% cellspacing=0 cellpadding=2 border=1>
> <tr>
> <td><font face=verdana size=2><b>Market</b></td>
> <td><font face=verdana size=2><b>Station</b></td>
> <td><font face=verdana size=2><b>Local Date</b></td>
> <td><font face=verdana size=2><b>TV Date</b></td>
> <td><font face=verdana size=2><b>Log Action</b></td>
> <td><font face=verdana size=2><b>Log Date</b></td>
> </tr>";
>
> while($amyrow = mysql_fetch_array($aresult))
>         {
>   echo "<Tr><td><font face=verdana size=1>";
>                echo $amyrow["d"];
> echo "</td><td><font face=verdana size=1>";
>                  echo $amyrow["c"];
>         echo "</td><td><font face=verdana size=1>";
>                  echo $amyrow["i"];
>         echo "</td><td><font face=verdana size=1>";
>                  echo $amyrow["j"];
>         echo "</td><td><font face=verdana size=1>";
>                  echo $amyrow["f"];
>         echo "</td><td><font face=verdana size=1>";
>                  echo $amyrow["k"];
>         echo "</td>";
>         }
>
> echo "</td></tr></table>";
>
> echo "<br>";
>
> include ('../sql-bottom.html');
>
> } else {
>
> echo "<br><br><center><font face=verdana size=2><b>Access Denied. Please
check your password.</b></font><center><br><br>";
>
> }
>
> echo "<br>";
>
>
> ?>





there are two ways to simplify your code:

1. database. Keep the usernames in another table. Check against it to verify
that the passwords are correct and then go ahead pulling the data out.
2. read on about eval(). php.net/eval eval converts your string into php
code. So your if else statements could become dynamic. Not recomended
though. 

try it with a different table first.

Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-----Original Message-----
From: Andras Kende [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 27, 2001 12:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP] if else and or ?


Hello,

I started to do a php page with mysql connection..

My problem is:

I do query from a mysql, I try to setup usernames + passwords
to protect the database

They would need to use specific user+password+cities to be able to connect.
Bad passwd would just print an access denied messsage..

http://www.cmtsite.com/schedules/
name=1 passwd=1 city=HOU
name=2 passwd=2 city=LAX
name=3 passwd=3 city=TAM
pl: http://www.cmtsite.com/schedules/media.php?city=HOU&name=1&passwd=1

Actually its working ok but i have add more user+pass but then it just goes
to the }else statement ??

I really would like to store  the usernames, passwords in the php code for
simplicity...

ATLWL  31128595
ATLSM  31128576
DFWSS  31133977
HOUFA  31146832
HOUBL  31146825
LAXSC  31152972
MIAJJ  31164255
TAMVH  31182684
TAMTK  31182685


Below my php file...

Thanks for any help!

Andrew

> <?
> include ('../menu.html');
>
> if
> (
> (($name=="1") and ($passwd=="1") and ($city=="HOU"))
> or
> (($name=="2") and ($passwd=="2") and ($city=="LAX"))
> or
> (($name=="3") and ($passwd=="3") and ($city=="TAM"))
> )
> {
>
> echo "<br>";
>
> echo "<center><font face=verdana color=red size=2><b>";
>
> if (strstr($city,"HOU")) {
> echo "Market: Houston, Texas";
> }
> if (strstr($city,"LAX")) {
> echo "Market: Los Angeles, California";
> }
> if (strstr($city,"ATL")) {
> echo "Market: Atlanta, Georgia";
> }
> if (strstr($city,"TAM")) {
> echo "Market: Tampa, Florida";
> }
> if (strstr($city,"ORL")) {
> echo "Market: Orlando, Florida";
> }
> if (strstr($city,"DFW")) {
> echo "Market: Dallas/Fort Worth, Texas";
> }
> if (strstr($city,"BIR")) {
> echo "Market: Birmingham, Alabama";
> }
> if (strstr($city,"MIA")) {
> echo "Market: Miami, Florida";
> }
>
> echo "</b></font><center><br>";
>
> $db=mysql_connect("zz.com:3306","zz","zz");
> mysql_select_db("cmt",$db);
>
> if (strstr($city,"HOU")) {
> $aresult=mysql_query("select * from media where d like '%HOU%' or d like
'%MCA%' or d like '%BMT%' order by i" ,$db);
> }
> else {
> $aresult=mysql_query("select * from media where d like '$city' order by i"
,$db);
> }
>
> echo "
> <table align=center width=95% cellspacing=0 cellpadding=2 border=1>
> <tr>
> <td><font face=verdana size=2><b>Market</b></td>
> <td><font face=verdana size=2><b>Station</b></td>
> <td><font face=verdana size=2><b>Local Date</b></td>
> <td><font face=verdana size=2><b>TV Date</b></td>
> <td><font face=verdana size=2><b>Log Action</b></td>
> <td><font face=verdana size=2><b>Log Date</b></td>
> </tr>";
>
> while($amyrow = mysql_fetch_array($aresult))
>         {
>   echo "<Tr><td><font face=verdana size=1>";
>                echo $amyrow["d"];
> echo "</td><td><font face=verdana size=1>";
>                  echo $amyrow["c"];
>         echo "</td><td><font face=verdana size=1>";
>                  echo $amyrow["i"];
>         echo "</td><td><font face=verdana size=1>";
>                  echo $amyrow["j"];
>         echo "</td><td><font face=verdana size=1>";
>                  echo $amyrow["f"];
>         echo "</td><td><font face=verdana size=1>";
>                  echo $amyrow["k"];
>         echo "</td>";
>         }
>
> echo "</td></tr></table>";
>
> echo "<br>";
>
> include ('../sql-bottom.html');
>
> } else {
>
> echo "<br><br><center><font face=verdana size=2><b>Access Denied. Please
check your password.</b></font><center><br><br>";
>
> }
>
> echo "<br>";
>
>
> ?>


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




Okay I get the: Call to a member function on a non-object error when trying to execute 
this script:

It happens in this area:

$db=mysql_connect(localhost,'***','***') or die("Unable to connect to database");
 
 $edlist = new EditList("serverId", "hlstats_Servers", "server");
 $edlist->columns[] = new EditListColumn("game", "Game", 0, true, "hidden", $gamecode);
 $edlist->columns[] = new EditListColumn("address", "IP Address", 15, true, 
"ipaddress", "", 15);
 $edlist->columns[] = new EditListColumn("port", "Port", 5, true, "text", "27015", 5);
 $edlist->columns[] = new EditListColumn("name", "Server Name", 22, true, "text", "", 
64);
 $edlist->columns[] = new EditListColumn("rcon_password", "Rcon Password", 10, false, 
"text", "", 48);
  $edlist->columns[] = new EditListColumn("publicaddress", "Public Address", 20, 
false, "text", "", 64);
  $edlist->columns[] = new EditListColumn("statusurl", "Status URL", 20, false, 
"text", "", 255);


 
 if ($HTTP_POST_VARS)
 {
  if ($edlist->update())
   message("success", "Operation successful.");
  else
   message("warning", $edlist->error());
 }
 
?>
Enter the addresses of all servers that you want to accept data from here.<p>

<?php
 
 $result = $db->query("
  SELECT
   serverId,
   address,
   port,
   name,
   publicaddress,
   statusurl,
   rcon_password
  FROM
   hlstats_Servers
  WHERE
   game='cstrike'
  ORDER BY
   address ASC,
   port ASC
 ");

More specificially it happens on this line:  $result = $db->query("

What am I doing wrong here?


Best regards,

Ender [Clan Leader]
[EMAIL PROTECTED]





Hombre, necesitamos un poco mas de informacion para ayudarte. Cuales
versiones de PHP y IIS, por ejemplo, y cual version de Windows?
Como lo instalaste? Como modulo o como CGI?

La pagina de prueba, tiene todos los "tags" que necesita? (es decir, <?php
y ?>. Tiene el archivo la extension ".php"?

Como has escrito "Este es un ejemplo de php"? Has utilizado "print" o
"echo" o "printf"?

Yo no se mucho de IIS, pero acaso tienes que configurarlo para que
reconoce la extension ".php". Acaso ya reconoce solo las extensiones
".htm" y ".asp".

Bueno, espero que este sea util.

Mick

On Mon, 7 May 2001, "Lic. Santa Ortiz Rodriguez" wrote:

> Estoy apenas en la instalacion, baje el archivo el cual me indica que 
> configura automaticamente el iis, lo corro y trato de hacer la pagina de 
> prueba, "Este es un ejemplo de php", lo copia igual pero al abrir la pagina 
> no se ve nada, aparece en blanco, no se que es lo que me hace falta algo de 
> hacer.
> 
> -- 
> 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]
> 
> 





Hi all,


I am trying using PHP with Flash Generator.

The designer has given me a Flash file created using Macromedia's Flash 
Generator 2.

The platform is BSDi / Lang - PHP / Database - MySQL.

I want to change the content INSIDE the Flash file dynamically (not the 
flash itself). From books I know Flash Generator allows to do so, but if 
any body can give me some clear cut idea about following, (as book info in 
not sufficient)

1. What are the components required on Server ?
2. Any client components are required except player ?
3. Which database driver shall I use ?
4. With PHP how to do it ?
5. If any body can send me a sample script
6. Any other source to get more info (book / site / mailing list etc)


I do not know how to see 'Archive' of this mailing list. Can any body give 
me the URL ?


Regards,
manisha






"Altunergil, Oktay"wrote:
> The link that goes to interbase's web site in freshmeat.com redirects to
> http://www.borland.com/interbase/
> which does not list the product as free or open source?
>
> Is there another version?
>
> oktay

My understanding is that the current open source version is available from:
http://www.borland.com/devsupport/interbase/opensource/

Ongoing "certified" versions with Borland support will be available from
somewhere on borland.com for a price and any future open source versions
will be available from SourceForge.

Cheers,

Luke Welling
----------
PHP and MySQL Web Development
by Luke Welling and Laura Thomson
http://www.amazon.com/exec/obidos/ASIN/0672317842/tangledwebdesign






On Mon, May 07, 2001 at 06:54:53PM +0200, Vincen Pujol wrote:
>                  Hi,
>          Sorry for the crossposting but I don't know where to find a 
> solution for this. I need to be able to update dynamically entries in a DNS 
> (Bind 9). My DNS supports dynamic updates but how to do dynamic updates in 
> my DNS server from a PHP Script ??

Might be interesting to add such a thing to PHP as a PEAR extension
maybe, but you could use a separate program for that, and just execute
it from PHP. Another possibility is to use my LDAP back-end for BIND
rather than dynamic updates. The effect is mostly the same. BIND will
look up the data in LDAP every time (lose some performance, normally
not a problem), and you can modify the data at any time from for
instance PHP by accessing the LDAP server. If anyone wants to look at
the LDAP back-end, see http://www/dns/bind/bind-sdb/. If you look at
it, please look at version .4 and the dnsZone. Versions prior to .4
shouldn't be used any more, I'll change the web page shortly.

Stig




A good friend of mine just moved to England.  Devon to be exact.  He's
having quite a time finding a reliable internet provider.  Anybody know of
any reliable providers in that area?





What You mean?
I cant read STDIN in cgi-bin module by my self?
its worse that I thought :((((



"Yasuo Ohgaki" wrote in message <9d0gam$rdu$[EMAIL PROTECTED]>...
>This is not possible with current PHP.
>If you search recent php-dev list archive, you will find some more info.
>
>""ondi"" <[EMAIL PROTECTED]> wrote in message
>9cucc2$ae3$[EMAIL PROTECTED]">news:9cucc2$ae3$[EMAIL PROTECTED]...
>> the array $HTTP_POST_VARS contains parsed data with "_" instead of spaces
>> and split all RAW data by "=" !!! thats too bad!
>
>???? Sounds more like you are talking about HTTP GET.
>If it is the case, $HTTP_SERVER_VARS[' QUERY_STRING'] ?
>
>Regards,
>--
>Yasuo Ohgaki








Hi,

I am in need a transfering an existing mySQL database to PostgreSQL. I have
seen info on the converter. Before I get started I wanted to see info anyone
has any insight or tips on converting these DBs (ie- is it problematic,
inconsistent, etc). Thanks!

John



Reply via email to