Re: [PHP] "The Kewl Script"

2001-09-30 Thread Ashley M. Kirchner

"Maxim Maletsky (PHPBeginner.com)" wrote:

> I ported it to use a hybrid of CSS/HTML which slows a bit the browser
> down but having less size it is way better acceptable than before, plus
> kewl script is now smart enough to choose where to use CSS and where
> FONT depending on occurrences of that color.

I'd just like to know what browsers (and versions) on what platforms are
you viewing these pages of yours.  I have Nutscrape 4.78 and 6.1 and IE 5.5,
as well as 6.0, on Winblows 98, and all four of them can not display your
rendered page.  IE just plain crashes.  At least Nutscrape tries, and
manages just fine, with the image all compressed and unidentifiable.


> So, what will be the next step now?

Make it work properly?  

--
H | "Life is the art of drawing without an eraser." - John Gardner
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  Director of Internet Operations / SysAdmin. 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.



-- 
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] "The Kewl Script"

2001-09-30 Thread Maxim Maletsky \(PHPBeginner.com\)

You're absolutely right, Ashley.

The only browser you can go wild with is IE - which crashes eventually.
;-)

If I could reduce the sizes of HTML itself then, and only then, it makes
sense working on the compatibilities. With PHP it should not be a
problem as managing to find out users setups is relatively easy.


Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]] 
Sent: domenica 30 settembre 2001 9.51
To: [EMAIL PROTECTED]
Subject: Re: [PHP] "The Kewl Script"


"Maxim Maletsky (PHPBeginner.com)" wrote:

> I ported it to use a hybrid of CSS/HTML which slows a bit the browser 
> down but having less size it is way better acceptable than before, 
> plus kewl script is now smart enough to choose where to use CSS and 
> where FONT depending on occurrences of that color.

I'd just like to know what browsers (and versions) on what platforms
are you viewing these pages of yours.  I have Nutscrape 4.78 and 6.1 and
IE 5.5, as well as 6.0, on Winblows 98, and all four of them can not
display your rendered page.  IE just plain crashes.  At least Nutscrape
tries, and manages just fine, with the image all compressed and
unidentifiable.


> So, what will be the next step now?

Make it work properly?  

--
H | "Life is the art of drawing without an eraser." - John Gardner
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  Director of Internet Operations / SysAdmin. 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.



-- 
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] session & class driving me nuts

2001-09-30 Thread andreas \(@work\)

hi ,

gallerie.php:
---

session_start();

class ABCD {
function add_pic($picture,$galerie) {
 code here
   }
}



$artego = new ABCD;

$artego->add_pic("Santiego","Humstein");   <-- line XX

. more code





when i run this script i get:

Fatal error: Call to a member function on a non-object in
/home/sites/site76/web/galerie/shop.php on line XX


if i remove

session_start();


THEN IT WORKS !



but i need the session


WHATS GOING ON ?



thank you

andreas



-- 
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] problem about ereg function

2001-09-30 Thread mydata

hi,
I am using ereg funtion to deal with data submmited by form
detail shown below:

I am using a form to submit some html code include image path code
In submitted php page, I want to replace image path code in html code
(submitted by last page' form), unfortunately the image path code include
some php variable (eg "imag src ='$phpvaribe'"),I want to use ereg function
to replace image path code by the value I need. but when I use eregi_replace
fuction try to replace it . but browser show me parsing error . I don't know
how to use eregi_replace() when php varible in string which needed to be
replaced. Could someone help me. My error code show below:

MY ERROR CODE:

eregi_replace("^\"(.)*{$img1_name}\"$","$replacestring",$content)


remark:the $img1_name is the php variable in the string which needed to be
replaced



-- 
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] php_admin_flag safe_mode off

2001-09-30 Thread Richard Kurth

Way will this Command not work in the httpd.conf file
I have safe mode turned on in the php.ini file but I what it off in
one of my sites so I added  php_admin_flag safe_mode off to the virtualhost
that I want it off in like below

other stuff
 php_admin_flag safe_mode off


According to the manual you can turn any variable that is in the php.ini
file on or off in the https.conf file by adding








Best regards,
 Richard  
mailto:[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: Search "all" in mysql

2001-09-30 Thread Henrik Hansen

[EMAIL PROTECTED] (Mark Charette) wrote:

 > Actually, if you want to return all, just drop the "where" clause
 > completely.

but thet you have to check the input:

normally you would have:

select blah from table where field like '%something%'

if nothing if selected you just insert a % on something's place

select blah from table where field like '%%%'

and no check on input is needed (AKAIK).

-- 
Henrik Hansen

-- 
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: PHPEd

2001-09-30 Thread Henrik Hansen

[EMAIL PROTECTED] (Kath) wrote:

 > Is it worth picking up the retail NuSphere copy of PHPEd?
 > 
 > I'm using the 1.75 Alpha now and enjoy it a lot over what I was using
 > prior (Dreamweaver).
 > 
 > Only peeve is what seems like a memory leak (PHPEd will crash after a
 > bit of very minor web browser/message client/email use) in 1.75.  Have
 > issues like this been resolved?

get the latest free preview from phped.com version 2.96.1 is MUCH
better than 1.75 and it's still free.

-- 
Henrik Hansen

-- 
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: Running a script with Crontab

2001-09-30 Thread Henrik Hansen

[EMAIL PROTECTED] (Carlos Fernando Scheidecker Antunes) wrote:

 > Hello All,
 > 
 > I wrote an script to do database maintenance and I forgot how to run a
 > script on the command line without opening it with a web browser. My
 > idea is to add a crontab daily entry to run this script.
 > 
 > Can anyone enlight me on this
 > 

http://alt-php-faq.org/#id81

-- 
Henrik Hansen

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

2001-09-30 Thread P.Agenbag

Hi, I'm not sure this is the right list to post this, and i'm not even
sure if there is already a solution to this problem, in which case,
sorry...

Ok, my problem: PHP has (as you all know) a mail() function which is
very handy to send mail to people. Now, with the advent and subsequent
ease of MySQL into the picture, anyone who have a bit of time on their
hands and a table filled wiith e-mail addresses, can easily write a loop
sending  bulk mail or spam to thousands of users listed in the table.
The problem with this as you might know, is that the mail() function
seems to invoke a new sendmail process (on Unix boxes) for each mail()
call, meaning that you can very quickly crash your sendmail if you have
a fast enough server and a large enough list of addresses in the table.
I know that using php to send so much mail is not the right answer, but
there are people out there who DON'T know this, and are using this
method, or at least trying to, causing great headaches to many
administrators, as there is no way of preventing someone (barring a full
on removal of the user's rights) from doing so again and again.
Now, my question is, isn't it possible to re-write the mail function to
instead of treating each call to the mail function as a separate event,
to rather see it as a "global event", ie., when called, it will always
assume that more is coming until it gets a "finished" call. This way,
surely, it should be possible to have the entire batch sent directly to
the mail queue instead of trying to send the messages immediately as it
comes in, thereby clogging sendmail and causing it to shut down...

Unfortunately, I am not a programmer, so I would not be able to help
much when it comes to doing this, but maybe the guys working on the code
could look into this? Like I said, I am not sure if there might already
be another way of solving this (not third party solutions like mailling
list managers...) but if there is, and someone reading this and knows of
one, please post me the solution! I really need to know that a single
user on one of my websites cannot cause the entire systems mail to clog.

Thanks alot, and keep up the good work, PHP is still the best!

Petre Agenbag
South Africa



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

2001-09-30 Thread Rouvas Stathis

Search the archives for the following e-mail :

Subject: RE: [PHP3] Checking screen resolution and/or window size
Date: Wed, 23 Feb 2000 09:54:05 -0500
From: "Michael Geier" <[EMAIL PROTECTED]>

I think this will cover your questions.

-Stathis.




Nikola Veber wrote:
> 
> Hi !
> 
> I would like to know if it is possible to determine the screen
> resolution of the visitor using php ?
> 
> Thanks
> Nikola
> 
> --
> 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: mysql_fetch_array() doesn't work

2001-09-30 Thread Web user

Hello,
First, Thank you all for your help!
I  finally found the reason for why does  the IE always show info as below:
"Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in c:\program files\apache
group\apache\htdocs\web\site1\list.php on line --[the number of line]"

It is because the echo (including print) doesn't work at the line below,
echo "";
showing the error info as I mentioned. ( but it should work according to PHP
books)

It only works when  the $arr['user_id'] is out of the quotes.
echo "";
then IE showed no error any longer.

So I have to let all $arr['key']  out of the quotes, then the scripts are
Ok.

Regards
Mike

















-- 
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: mysql_fetch_array() doesn't work

2001-09-30 Thread Web user

Hello,
First, Thank you all for your help!
I  finally found the reason for why does  the IE always show info as below:
"Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in c:\program files\apache
group\apache\htdocs\web\site1\list.php on line --[the number of line]"

It is because the echo (including print) doesn't work at the line
below,
echo "";
showing the error info as I mentioned. ( but it should work according to PHP
books)

It only works when  the $arr['user_id'] is out of the quotes.
echo "";
then IE showed no error any longer.

So I have to let all $arr['key']  out of the quotes, then the scripts are
Ok.

Regards
Mike















-- 
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] Warning: unexpected regex error (14)

2001-09-30 Thread Big5ive

Hi folks!

Warning: unexpected regex error (14) in C:\WINDOWS\Profiles\Flo\My
Documents\Projekte\www.big5ive.homeip.net\BBB\control\members_edit.php on
line 18

members_edit.php :

 
  Members verwalten
 
 
 
  Members verwalten
  
   
Benutzername
Status
Registriert seit
   
   http://big5ive.homeip.net/BBB/members/members.txt";;
$fp=fopen("$memberlist","r");
$user=fgets($fp, 4096);
$list = split("|",$user, 3);
echo "$list[0]$list[1]$list[2]";
   ?>
   
 


How can i fix this error?
Content of members.txt is
Big5ive|Admin|24.09.2001

The script should read the text file and split the content by | and write it
in a table.
Any help would be amazing!

--
Big5ive



-- 
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] still problem with getting HIGHest and LOWest VALUES

2001-09-30 Thread Teqila MAN

The table has values :

id - price 
1  -  15 
2 -   24000
3 -   65000 
4 -   20 


When i want to sort it 

$x = mysql_query("SELECT * FROM $dealer_tabela ORDER BY cena"); 
   while ($row  =  mysql_fetch_array($x))
   {
   $id=$row["id"];
   $price=$row["price"];
   print("$price\n");
   }

It returns me values :
15
20
24000
65000

What is false! It sorts this by getting first values ? How to fix it ?

Thanks for your help
tm.


-- 
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: Warning: unexpected regex error (14)

2001-09-30 Thread CC Zona

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Big5ive) wrote:

> $list = split("|",$user, 3);
> echo " align=left>$list[0]$list[1]$list[2]";
>?>
>
>  
> 
> 
> How can i fix this error?
> Content of members.txt is
> Big5ive|Admin|24.09.2001
> 
> The script should read the text file and split the content by | and write it
> in a table.

Split is a regex function, and "|" is a regex special character meaning 
"or" when it's not escaped. You don't have need for regex matching here, so 
just use explode() instead:

explode("|",$user, 3);

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




Re: [PHP] still problem with getting HIGHest and LOWest VALUES

2001-09-30 Thread News

I'm not much into PHP, but looking at it from SQL I guess you have defined
the price column as a string? Make it an integer...?

Marc

- Original Message -
From: "Teqila MAN" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 30 September 2001 16:22
Subject: [PHP] still problem with getting HIGHest and LOWest VALUES


> The table has values :
>
> id - price
> 1  -  15
> 2 -   24000
> 3 -   65000
> 4 -   20
>
>
> When i want to sort it
>
> $x = mysql_query("SELECT * FROM $dealer_tabela ORDER BY cena");
>while ($row  =  mysql_fetch_array($x))
>{
>$id=$row["id"];
>$price=$row["price"];
>print("$price\n");
>}
>
> It returns me values :
> 15
> 20
> 24000
> 65000
>
> What is false! It sorts this by getting first values ? How to fix it ?
>
> Thanks for your help
> tm.
>
>
> --
> 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: still problem with getting HIGHest and LOWest VALUES

2001-09-30 Thread Hidulf

try this

$x = mysql_query("SELECT * FROM $dealer_tabela ORDER BY cena");
$row = mysql_fetch_array($x);

natsort($row);

print 'id - price\n';
while (list ($key, $val) = each ($row)) {
print $key .' - ' .$val .'\n';
}

--
Hidulf
http://www.hidulf.com
"Teqila Man" <[EMAIL PROTECTED]> wrote in message
001801c149bb$63026d60$017f@tm">news:001801c149bb$63026d60$017f@tm...
> The table has values :
>
> id - price
> 1  -  15
> 2 -   24000
> 3 -   65000
> 4 -   20
>
>
> When i want to sort it
>
> $x = mysql_query("SELECT * FROM $dealer_tabela ORDER BY cena");
>while ($row  =  mysql_fetch_array($x))
>{
>$id=$row["id"];
>$price=$row["price"];
>print("$price\n");
>}
>
> It returns me values :
> 15
> 20
> 24000
> 65000
>
> What is false! It sorts this by getting first values ? How to fix it ?
>
> Thanks for your help
> tm.
>



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




Odp: [PHP] still problem with getting HIGHest and LOWest VALUES

2001-09-30 Thread Teqila MAN

Yes i have it defined as text so what should i put instead ?

- Wiadomość oryginalna -
Od: News <[EMAIL PROTECTED]>
Do: <[EMAIL PROTECTED]>
Wysłano: 30 września 2001 16:47
Temat: Re: [PHP] still problem with getting HIGHest and LOWest VALUES


> I'm not much into PHP, but looking at it from SQL I guess you have defined
> the price column as a string? Make it an integer...?
>
> Marc
>
> - Original Message -
> From: "Teqila MAN" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: 30 September 2001 16:22
> Subject: [PHP] still problem with getting HIGHest and LOWest VALUES
>
>
> > The table has values :
> >
> > id - price
> > 1  -  15
> > 2 -   24000
> > 3 -   65000
> > 4 -   20
> >
> >
> > When i want to sort it
> >
> > $x = mysql_query("SELECT * FROM $dealer_tabela ORDER BY cena");
> >while ($row  =  mysql_fetch_array($x))
> >{
> >$id=$row["id"];
> >$price=$row["price"];
> >print("$price\n");
> >}
> >
> > It returns me values :
> > 15
> > 20
> > 24000
> > 65000
> >
> > What is false! It sorts this by getting first values ? How to fix it ?
> >
> > Thanks for your help
> > tm.
> >
> >
> > --
> > 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] determine the size of picture ?

2001-09-30 Thread Teqila MAN

How to find out what is the size of the picture in pixels ?

TM


-- 
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] Warning: unexpected regex error (14)

2001-09-30 Thread Rasmus Lerdorf

| is a special regex char and you would need to escape it to use it in a
literal sense.  However, if you are splitting on a simple single char like
that, using split() is very inefficient.  Use explode() instead, and since
explode() doesn't use regular expressions you wouldn't have to escape the
| with explode().

-Rasmus

On Sun, 30 Sep 2001, Big5ive wrote:

> Hi folks!
>
> Warning: unexpected regex error (14) in C:\WINDOWS\Profiles\Flo\My
> Documents\Projekte\www.big5ive.homeip.net\BBB\control\members_edit.php on
> line 18
>
> members_edit.php :
> 
>  
>   Members verwalten
>  
>  
>  
>   Members verwalten
>   
>
> Benutzername
> Status
> Registriert seit
>
> $memberlist="http://big5ive.homeip.net/BBB/members/members.txt";;
> $fp=fopen("$memberlist","r");
> $user=fgets($fp, 4096);
> $list = split("|",$user, 3);
> echo " align=left>$list[0]$list[1]$list[2]";
>?>
>
>  
> 
>
> How can i fix this error?
> Content of members.txt is
> Big5ive|Admin|24.09.2001
>
> The script should read the text file and split the content by | and write it
> in a table.
> Any help would be amazing!
>
> --
> Big5ive
>
>
>
>


-- 
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] determine the size of picture ?

2001-09-30 Thread Rasmus Lerdorf

getimagesize()

On Sun, 30 Sep 2001, Teqila MAN wrote:

> How to find out what is the size of the picture in pixels ?
>
> TM
>
>
>


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

2001-09-30 Thread Kurt Lieber

use qmail.

php is a powerful language -- and with any powerful language, stupid
people can wreak havoc by using it improperly.  There are literally
dozens of PHP mailing list managers out there that bypass the mail()
function and use sockets directly.  Perhaps you can recommend those to
your hosting clients.  (They're free, as in beer and speech, so cost
shouldn't be an issue)

--kurt

> The 
> problem with this as you might know, is that the mail() 
> function seems to invoke a new sendmail process (on Unix 
> boxes) for each mail() call, meaning that you can very 
> quickly crash your sendmail if you have a fast enough server 
> and a large enough list of addresses in the table. 


-- 
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: PHPEd

2001-09-30 Thread Kath

I'm looking to support the company though and my boss said he would buy
software for us.

- k

- Original Message -
From: "Henrik Hansen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 30, 2001 6:08 AM
Subject: [PHP] Re: PHPEd


> [EMAIL PROTECTED] (Kath) wrote:
>
>  > Is it worth picking up the retail NuSphere copy of PHPEd?
>  >
>  > I'm using the 1.75 Alpha now and enjoy it a lot over what I was using
>  > prior (Dreamweaver).
>  >
>  > Only peeve is what seems like a memory leak (PHPEd will crash after a
>  > bit of very minor web browser/message client/email use) in 1.75.  Have
>  > issues like this been resolved?
>
> get the latest free preview from phped.com version 2.96.1 is MUCH
> better than 1.75 and it's still free.
>
> --
> Henrik Hansen
>
> --
> 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] Recursion

2001-09-30 Thread Andres Montiel

One of my classes next semester needs me to program using a language
that does "recurison". I don't really know what this means, though. Can
PHP do this?

Thanks!



-- 
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] Making variable global / accessing variable

2001-09-30 Thread Martin

Hello!

How can I make a variable, which name I give to a function, global in
this function?

I want to make something like:

function MyFunc($sVarName)
{GLOBAL [$sVarName]_error, $sVarName_ok;

}

So if $sVarName = "sHello", I want to access $sHello_error and
$sHello_ok in this function.

Any idea how I can make this variable gloabl and whats the easyst way to
access this var then?

Martin



-- 
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] Running a script with Crontab

2001-09-30 Thread ani

This is what I do, maybe is gonna help you

bash file structure:

 #!/bin/bash
 ##
 ##  mysql maintenance
 ##
 /usr/bin/mysql -u username --password=yourpassword 

[PHP] fopen

2001-09-30 Thread Kmarada

is it possible to use fopen to open 5000 files differents simultaneous and
edit it simultaneous ?

i have one file. if four user edit it simultaneous what happen? there is
something to lock the file until one finish to edit?



-- 
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: fopen

2001-09-30 Thread Martin

Kmarada schrieb:

> is it possible to use fopen to open 5000 files differents simultaneous and
> edit it simultaneous ?

I think, this depends how many files your operating-system can handle.

> i have one file. if four user edit it simultaneous what happen? there is
> something to lock the file until one finish to edit?

see "flock".



-- 
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: Recursion

2001-09-30 Thread Martin

Hi Andres,

Yes, PHP support "recoursion". That means, that you are calling a function
again and again, but with new start-parameters. For example, if you want to
search a harddisc for a file, you will call your
function SearchFolder($path)
with "C:\". If the function itself detects subfolder, it will call itself,
but with the parameters "C:\Subfolder1", "C:\Subfolder2" and so on. You
have to watch out then, the the function terminated correctly, if the
searched file is found.

Martin




-- 
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] still problem with getting HIGHest and LOWest VALUES

2001-09-30 Thread Don Read


On 30-Sep-2001 Teqila MAN wrote:
> The table has values :
> 
> id - price 
> 1  -  15 
> 2 -   24000
> 3 -   65000 
> 4 -   20 
> 
> 
> When i want to sort it 
> 
> $x = mysql_query("SELECT * FROM $dealer_tabela ORDER BY cena"); 
>while ($row  =  mysql_fetch_array($x))
>{
>$id=$row["id"];
>$price=$row["price"];
>print("$price\n");
>}
> 
> It returns me values :
> 15
> 20
> 24000
> 65000
> 
> What is false! It sorts this by getting first values ? How to fix it ?

You defined cena as a VARCHAR ?, it will sort as a string. Define it as INT (or
FLOAT). 

If you can't change it use:

SELECT id, cena + 0 as price FROM $dealer_tabela ORDER BY price

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
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] Review of PHP-based content management systems? (Nuke, et al)

2001-09-30 Thread Kurt Lieber

Does anyone know of a good, solid review of the top 5 or so PHP-based
content management systems?  Or, at least which are considered the most
popular/widely-used?  I'm familiar with PHP-Nuke, but am looking for
sites that review/compare other systems as well.

--kurt


-- 
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] Review of PHP-based content management systems? (Nuke, et al)

2001-09-30 Thread Navid Yar

Try hotscripts.com. They have rating systems for all kinds of content
management systems available. They also give brief descriptions of each and
a link to their sites as well.

Navid Yar

-Original Message-
From: Kurt Lieber [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 30, 2001 12:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Review of PHP-based content management systems? (Nuke, et
al)


Does anyone know of a good, solid review of the top 5 or so PHP-based
content management systems?  Or, at least which are considered the most
popular/widely-used?  I'm familiar with PHP-Nuke, but am looking for
sites that review/compare other systems as well.

--kurt


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

2001-09-30 Thread Rasmus Lerdorf

Just configure PHP's sendmail_path directive to be:

   sendmail -t -i -Odeliverymode=q

That means any use of the mail() function will simply stick the message in
the outgoing queue.  You can then configure sendmail to run periodically
to process this queue.

Basically: man sendmail

-Rasmus

 On Sun, 30 Sep 2001, P.Agenbag wrote:

> Hi, I'm not sure this is the right list to post this, and i'm not even
> sure if there is already a solution to this problem, in which case,
> sorry...
>
> Ok, my problem: PHP has (as you all know) a mail() function which is
> very handy to send mail to people. Now, with the advent and subsequent
> ease of MySQL into the picture, anyone who have a bit of time on their
> hands and a table filled wiith e-mail addresses, can easily write a loop
> sending  bulk mail or spam to thousands of users listed in the table.
> The problem with this as you might know, is that the mail() function
> seems to invoke a new sendmail process (on Unix boxes) for each mail()
> call, meaning that you can very quickly crash your sendmail if you have
> a fast enough server and a large enough list of addresses in the table.
> I know that using php to send so much mail is not the right answer, but
> there are people out there who DON'T know this, and are using this
> method, or at least trying to, causing great headaches to many
> administrators, as there is no way of preventing someone (barring a full
> on removal of the user's rights) from doing so again and again.
> Now, my question is, isn't it possible to re-write the mail function to
> instead of treating each call to the mail function as a separate event,
> to rather see it as a "global event", ie., when called, it will always
> assume that more is coming until it gets a "finished" call. This way,
> surely, it should be possible to have the entire batch sent directly to
> the mail queue instead of trying to send the messages immediately as it
> comes in, thereby clogging sendmail and causing it to shut down...
>
> Unfortunately, I am not a programmer, so I would not be able to help
> much when it comes to doing this, but maybe the guys working on the code
> could look into this? Like I said, I am not sure if there might already
> be another way of solving this (not third party solutions like mailling
> list managers...) but if there is, and someone reading this and knows of
> one, please post me the solution! I really need to know that a single
> user on one of my websites cannot cause the entire systems mail to clog.
>
> Thanks alot, and keep up the good work, PHP is still the best!
>
> Petre Agenbag
> South Africa
>
>
>
>


-- 
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] Running a script with Crontab

2001-09-30 Thread Jeffrey Paul

At 01:25 PM 9/30/2001, [EMAIL PROTECTED] wrote:
>This is what I do, maybe is gonna help you
>
>bash file structure:
>
>  #!/bin/bash
>  ##
>  ##  mysql maintenance
>  ##
>  /usr/bin/mysql -u username --password=yourpassword <  use yourdatabase;
>  YOUR SQL query HERE;
>  exit
>  EOF
>
>then
>  chmod +x yourbashfile
>
>so "cronjob" this file with the desired frecuency


BAD BAD BAD idea.

if this is a public server (linux that's not running the openwall patch, 
for example) then anyone can see your password with a `ps auxwww` while 
it's running.  Scripts I run from cron are usually recalculation scripts in 
the middle of the night that take 10-15 mins to run, and as such would give 
anyone more than enough time to grab it while the script is running, not 
that it's not possible to grab it even with a shorter execution time as well.

-j



Jeffrey Paul  [EMAIL PROTECTED]  (877) 748 3467
ICQ: 14295546 AIM: kw34hd1 NXTL/DC: 130*21*16749
PGP: 0xF50BB9D7 A21AFD828C30EC77545DA0B3F501F50BB9D7


-- 
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] how many day between the two time format

2001-09-30 Thread yang

i want to check about how many day between the two time format
like
$last_day=time format;
$today=time();
$between_day=?($today-$last_day);
echo $between_day is the between day...





-- 
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] session & class driving me nuts

2001-09-30 Thread Joel Ricker

: hi ,
:
: gallerie.php:
:
: Fatal error: Call to a member function on a non-object in
: /home/sites/site76/web/galerie/shop.php on line XX

If I'm following you right and the class code you are trying to run is in
gallerie.php, then your error is in shop.php.

Joel



-- 
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] still problem with getting HIGHest and LOWest VALUES

2001-09-30 Thread Marc van de Geijn

Define the column as an INT or BIGINT. That should solve the problem.

- Original Message -
From: "Teqila MAN" <[EMAIL PROTECTED]>
To: "News" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: 30 September 2001 17:15
Subject: Odp: [PHP] still problem with getting HIGHest and LOWest VALUES


> Yes i have it defined as text so what should i put instead ?
>
> - Wiadomość oryginalna -
> Od: News <[EMAIL PROTECTED]>
> Do: <[EMAIL PROTECTED]>
> Wysłano: 30 września 2001 16:47
> Temat: Re: [PHP] still problem with getting HIGHest and LOWest VALUES
>
>
> > I'm not much into PHP, but looking at it from SQL I guess you have
defined
> > the price column as a string? Make it an integer...?
> >
> > Marc
> >
> > - Original Message -
> > From: "Teqila MAN" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: 30 September 2001 16:22
> > Subject: [PHP] still problem with getting HIGHest and LOWest VALUES
> >
> >
> > > The table has values :
> > >
> > > id - price
> > > 1  -  15
> > > 2 -   24000
> > > 3 -   65000
> > > 4 -   20
> > >
> > >
> > > When i want to sort it
> > >
> > > $x = mysql_query("SELECT * FROM $dealer_tabela ORDER BY cena");
> > >while ($row  =  mysql_fetch_array($x))
> > >{
> > >$id=$row["id"];
> > >$price=$row["price"];
> > >print("$price\n");
> > >}
> > >
> > > It returns me values :
> > > 15
> > > 20
> > > 24000
> > > 65000
> > >
> > > What is false! It sorts this by getting first values ? How to fix it ?
> > >
> > > Thanks for your help
> > > tm.
> > >
> > >
> > > --
> > > 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]




Re: [PHP] Re: PHPEd

2001-09-30 Thread Henrik Hansen

[EMAIL PROTECTED] (Kath) wrote:

 > I'm looking to support the company though and my boss said he would buy
 > software for us.
 > 

I would say it's much more stable than the version you have been
working with, so should be worth the money.

-- 
Henrik Hansen

-- 
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] instant session expiration problem

2001-09-30 Thread Ryan Mahoney

When a client date is ahead of my server or incorrect the cookie that php 
uses to maintain the session is expired immediately by the web 
browser.  This is an incredible pain!  I had once come across some document 
by Rasmus describing this problem but can't seem to find it now.  Does 
anyone know how to resolve this problem?

Thanks in advance for any help you can provide!  Please e-mail me directly.

Ryan Mahoney


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.251 / Virus Database: 124 - Release Date: 4/26/01



-- 
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] Troublesome complex fetching from database

2001-09-30 Thread Kath

Quite an interesting quandry I have.

What I have is this:

Table schooltypes:
(typeid is a unique# iding the type, schooltypes is the type of school, say
"Elementary School" or "High School")

| typeid | schooltypes |

Table schools:
(typeid is the type the school falls under, schoolid is the unique# iding
the school, schoolname is the general name like "Park Shore High School")

| typeid | schoolid | schoolname |

Table teachers:
(tuserid is their unique id, salutation is the Mr/Mrs/Miss/Ms/Dr, last name
is well, duh :))

| tuserid | salutation | last name |

Table teachers_schools:
(tuserid is the teacher's id, next to the school they are assigned to.  Note
the possiblity for a teacher assigned to more than one school (hello,
cutbacks and skeleton budgets)).

| tuserid | schoolid |

What I need to be able to do is list all this information as such:

School type:

+ School 1
- Teacher and their Teacher ID
- Teacher and their Teacher ID

+ School 2
- Teacher and their Teacher ID
- Teacher and their Teacher ID
- Teacher and their Teacher ID

+ School 3
- Teacher and their Teacher ID
- Teacher and their Teacher ID

Another School Type:

+ School 5
- Teacher and their Teacher ID
- Teacher and their Teacher ID

+ School 7
- Teacher and their Teacher ID
- Teacher and their Teacher ID

Currently, I AM able to list the school type and the school correctly.
However, when I come to listing the teachers in the school, every teacher is
listed under every school, some more than one time.

Any ideas/code snips on how to do this?

In what direction should be I solving this?

Going from type->school->teachers assigned->teacher info?

Or teachers assigned->teacher info->schools->type?

Right now I am doing the first, sorta.

- k


-- 
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] Gain with no pain

2001-09-30 Thread Perfumes2u.com

Hello

I've just seen your site and wondered if you would be interested in joining
our affiliate scheme, placing one of our banners on your site and
earning 10% on all sales as a result of click thru's coming from your site.
If your site receives a large number of hits, contact us directly to receive
a higher commission rate.
Visitors will have to leave your site at some time so why not have the
opportunity of earning income when they do.
Perhaps you could put it on your order confirmation page and earn extra
revenue after customers have placed an order.

At the moment our average sale is in excess of £32.00 so you could expect to 

earn approx in excess of £3.20 per sale.

All the commissions are handled and paid out through our partner YourCheque
who is totally independent.

You can sign up on our site ( www.perfumes2u.com ) or directly at:-

http://www.yourcheque.com/yc-perfumes2u.htm

--
Best regards,

John Ledgermailto:[EMAIL PROTECTED]

www.perfumes2u.com

P.S. You have nothing to lose - you could even use it as a way of saving 10%
on all your own or your staff purchases.


-- 
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] looping through database results

2001-09-30 Thread Karl Nelson

I'm working on a basic calendar app in PHP, but I've hit a snag.

The events are stored in a MySQL database, and the goal is to have the
events displayed on the correct day on the calendar.  The calendar is
generated through a couple of while() statements that loop through the weeks
and days.  I'm having trouble getting the events from the database match up
with the correct days.

I think the problem is that I can only loop through the database results
once.

The code looks something like this (lots of extraneous stuff trimmed):

 while ($day_of_week <= 6)
  {
  while ($event_row = mysql_fetch_array($events))
   {
   $event_day = $event_row["event_day"];
   if ($event_day == $day)
{
$event_name = $event_row["event_name"];
print "$event_name\n";
}
   }
  }

Since it seems to only loop through the while ($event_row =
mysql_fetch_array($events)) statement once (instead of the 30 times I want
it to loop through), I figure the issue is that after the one loop,
$event_row does indeed equal mysql_fetch_array($events).  So I try to unset
the $event_row after the loop, but that didn't work.  I even tried to make
$event_row into a variable variable name.  Couldn't get that to work either.

I'm running PHP version 4.0.6, if that matters.

thanks,
Karl
(feel free to cc [EMAIL PROTECTED], as I'm on the digest)

-- 
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] looping through database results

2001-09-30 Thread Jack Dempsey

hi karl

just to let you know, i believe there's a good calendar app on php.net
before i knew about this though, i wrote my own. some general advice:
i often take results from mysql calls and build data structures with the
data. then, you always have that
data available, and you can loop as many times as you want..think about
making the result add the results to an array,
and then use it where you need it

-jack

-Original Message-
From: Karl Nelson [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 30, 2001 5:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] looping through database results


I'm working on a basic calendar app in PHP, but I've hit a snag.

The events are stored in a MySQL database, and the goal is to have the
events displayed on the correct day on the calendar.  The calendar is
generated through a couple of while() statements that loop through the weeks
and days.  I'm having trouble getting the events from the database match up
with the correct days.

I think the problem is that I can only loop through the database results
once.

The code looks something like this (lots of extraneous stuff trimmed):

 while ($day_of_week <= 6)
  {
  while ($event_row = mysql_fetch_array($events))
   {
   $event_day = $event_row["event_day"];
   if ($event_day == $day)
{
$event_name = $event_row["event_name"];
print "$event_name\n";
}
   }
  }

Since it seems to only loop through the while ($event_row =
mysql_fetch_array($events)) statement once (instead of the 30 times I want
it to loop through), I figure the issue is that after the one loop,
$event_row does indeed equal mysql_fetch_array($events).  So I try to unset
the $event_row after the loop, but that didn't work.  I even tried to make
$event_row into a variable variable name.  Couldn't get that to work either.

I'm running PHP version 4.0.6, if that matters.

thanks,
Karl
(feel free to cc [EMAIL PROTECTED], as I'm on the digest)

--
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] looping through database results

2001-09-30 Thread elists


On Sunday, September 30, 2001, at 02:45 PM, Karl Nelson wrote:

>   while ($event_row = mysql_fetch_array($events))
>{
>$event_day = $event_row["event_day"];
>if ($event_day == $day)
> {
> $event_name = $event_row["event_name"];
> print "$event_name\n";
> }
>}

> Since it seems to only loop through the while ($event_row =
> mysql_fetch_array($events)) statement once (instead of the 30 times I 
> want
> it to loop through), I figure the issue is that after the one loop,
> $event_row does indeed equal mysql_fetch_array($events).  So I try to 
> unset
> the $event_row after the loop, but that didn't work.  I even tried to 
> make
> $event_row into a variable variable name.  Couldn't get that to work 
> either.

Try using:

while ($event_row = mysql_fetch_row($events))

instead. mysql_fetch_row will grab one row of the result array at a 
time, until there are no more rows. This sounds like what you want. What 
you were doing was grabbing the entire result array and storing them in 
one variable.

Hope this helps,
Andrew Elliston

-- 
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] php and java problem

2001-09-30 Thread Nikola Veber

Hi !

I was able to determine the user's screen resolution, but I'd like to let php know 
that(the next page loaded should be in 
the right resolution, I'd like to pass a value to php, but I don't know how).

Thanx
Nikola



-- 
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] looping through database results

2001-09-30 Thread Karl Nelson

Thanks for your help, Andrew, but it didn't seem to work.  As I read the 
manual (http://www.php.net/manual/en/function.mysql-fetch-array.php),
mysql_fetch_array is much like mysql_fetch_row, except that it uses the
field names instead of numbers as the array key.  Somebody correct me if I'm
wrong...

Karl

Andrew Elliston wrote:
> Try using:
>
> while ($event_row = mysql_fetch_row($events))
>
> instead. mysql_fetch_row will grab one row of the result array at a
> time, until there are no more rows. This sounds like what you want. What
> you were doing was grabbing the entire result array and storing them in
> one variable.

-- 
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] lock web page when editing

2001-09-30 Thread Bob

Hey thanks guys I think I've decided on locking it cuz I don't want multiple
people to be editing and then having them click "save" and say "sorry all the
work you just did can't be used".  I'm going to just put a 10 minute limit and
have a status like "please wait ... bob has been editing for 4:39 minutes"

Joe Kaiping wrote:

> Another possibility:
>
> 1. keep track of the last modification time for that page when a user
> requests to start editing the page
>
> 2. lock the page only immediately before the script does the write and then
> unlock it immediately after.  (that way a file never is left locked)
>
> 3. don't allow the write to happen if the last modification time is
> different from the time when the user started applying edits.  (If it's
> different then that means there was an update since that user started
> applying her edits. If that's the case, you would prompt the current user
> that there has been an update since she started making the changes and that
> she needs to reload the page being modified to before she can apply those
> changes.)
>
> ---
>
> And yet another approach is to put the pages (if just files) into CVS and
> have the content management scripts be a UI to the CVS commands used to
> manage those files.
>
> I've implemented this approach for a customer and it works nicely.  CVS
> allows locking or merging options depending on how strict you want to be.
>
> If curious about CVS, check out http://www.cvshome.org/.
>
> -Joe
>
> > -Original Message-
> > From: Bob [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, September 29, 2001 2:28 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] lock web page when editing
> >
> >
> > hi
> >
> > just seeing how everyone would approach this problem.
> >
> > i'm building a content management system and many people can
> > edit a web
> > page.  if someone clicks on "edit" for a web page then i want to lock
> > that page and not allow anyone else to "edit" the same page until the
> > first person is done.  how would i be able to tell if that
> > first person
> > is still editing or they have left???  if they close the browser then
> > the web page would be locked forever.  how do i get around that?
> >
> >
> >
> > _
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > 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]
> >


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
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] looping through database results

2001-09-30 Thread Jack Dempsey

Right, fetch-array just adds extra results to fetch-row.
Have you tried storing your results in an array that you can then loop
over later?

-Original Message-
From: Karl Nelson [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, September 30, 2001 6:33 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] looping through database results

Thanks for your help, Andrew, but it didn't seem to work.  As I read the

manual (http://www.php.net/manual/en/function.mysql-fetch-array.php),
mysql_fetch_array is much like mysql_fetch_row, except that it uses the
field names instead of numbers as the array key.  Somebody correct me if
I'm
wrong...

Karl

Andrew Elliston wrote:
> Try using:
>
> while ($event_row = mysql_fetch_row($events))
>
> instead. mysql_fetch_row will grab one row of the result array at a
> time, until there are no more rows. This sounds like what you want.
What
> you were doing was grabbing the entire result array and storing them
in
> one variable.

-- 
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] socket_get_status()

2001-09-30 Thread Richard Heyes

Hi,

Exactly what does the unread_bytes parameter of the return of
socket_get_status() mean? I thought it would be the amount of data waiting
to be gotten via fgets() or fread(), but not according to my lil' test
(interactive mode):


  bool(false)
  ["blocked"]=>
  bool(true)
  ["eof"]=>
  bool(false)
  ["unread_bytes"]=>
  int(0)
}
echo fgets($fp, 512);
220 heyes-computing.net Ready for action (Mailtraq 1.1.5.1167/SMTP)

--
Richard Heyes
"I know not with what weapons World War III will be fought, but World War IV
will be fought with sticks and stones." - Albert Einstein



-- 
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] Running a Shell Script in PHP HELP!

2001-09-30 Thread Armando Cerna


I have a shell script that I am executing like this $files = `shellscript`; 
but if I do an if ($files) it doesn't read $files as existing.  The contents 
of the shell script is a smbclient line that copies a bunch of DBF files from 
another machine.  Anyone have any idea?  Below is a little snipit of my code

 $files = `updatemp`;


  if ($files) {
print "$files";
print "I am god";

  } else {
print "$files"; 
print "It's ok you'll get it working. =)";
  }






The contents of the updatemp file is as follows

smbclient //machine/c -I 192.168.0.4 -U armando%secret -D a1 -c 'lcd /tmp/dbf 
; prompt ; mget *.dbf ; quit'


Thanks in advance,
Armando

-- 
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] Running a Shell Script in PHP HELP!

2001-09-30 Thread Kath

Executing the script could be good :)

Try a system(); command.

Alas, remember, PHP runs as whatever user apache does, so chances are it has
no privledges to run any of these operations as it is
www/nobody/apache/daemon/etc.

You could sudo it in the system call.

- k

- Original Message -
From: "Armando Cerna" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 30, 2001 7:14 PM
Subject: [PHP] Running a Shell Script in PHP HELP!


>
> I have a shell script that I am executing like this $files =
`shellscript`;
> but if I do an if ($files) it doesn't read $files as existing.  The
contents
> of the shell script is a smbclient line that copies a bunch of DBF files
from
> another machine.  Anyone have any idea?  Below is a little snipit of my
code
>
>  $files = `updatemp`;
>
>
>   if ($files) {
> print "$files";
> print "I am god";
>
>   } else {
> print "$files";
> print "It's ok you'll get it working. =)";
>   }
>
>
>
>
>
>
> The contents of the updatemp file is as follows
>
> smbclient //machine/c -I 192.168.0.4 -U armando%secret -D a1 -c 'lcd
/tmp/dbf
> ; prompt ; mget *.dbf ; quit'
>
>
> Thanks in advance,
> Armando
>
> --
> 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] Running a Shell Script in PHP HELP!

2001-09-30 Thread Armando Cerna

On Sunday 30 September 2001 04:23 pm, Kath wrote:
> Executing the script could be good :)
>
> Try a system(); command.
>
> Alas, remember, PHP runs as whatever user apache does, so chances are it
> has no privledges to run any of these operations as it is
> www/nobody/apache/daemon/etc.
>
> You could sudo it in the system call.
>
> - k
>
> - Original Message -
> From: "Armando Cerna" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, September 30, 2001 7:14 PM
> Subject: [PHP] Running a Shell Script in PHP HELP!
>
> > I have a shell script that I am executing like this $files =
>
> `shellscript`;
>
> > but if I do an if ($files) it doesn't read $files as existing.  The
>
> contents
>
> > of the shell script is a smbclient line that copies a bunch of DBF files
>
> from
>
> > another machine.  Anyone have any idea?  Below is a little snipit of my
>
> code
>
> >  $files = `updatemp`;
> >
> >
> >   if ($files) {
> > print "$files";
> > print "I am god";
> >
> >   } else {
> > print "$files";
> > print "It's ok you'll get it working. =)";
> >   }
> >
> >
> >
> >
> >
> >
> > The contents of the updatemp file is as follows
> >
> > smbclient //machine/c -I 192.168.0.4 -U armando%secret -D a1 -c 'lcd
>
> /tmp/dbf
>
> > ; prompt ; mget *.dbf ; quit'
> >
> >
> > Thanks in advance,
> > Armando
> >
> > --
> > 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 tried system (updatemp) and exec (updatemp) but the permissions and 
sudo thing did not occur to me could you show me an example of how this would 
be done im kindof new to all this.

TIA, 
Armando

-- 
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] Running a Shell Script in PHP HELP!

2001-09-30 Thread Matt Greer

On Sunday 30 September 2001 18:23, Armando Cerna wrote:

> I have tried system (updatemp) and exec (updatemp) 

The system() function requires a string as its argument. So you need to write 
it as system("updatemp"); or system("$files");

Matt

-- 
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] Running a Shell Script in PHP HELP!

2001-09-30 Thread Armando Cerna

On Sunday 30 September 2001 04:31 pm, Matt Greer wrote:
> On Sunday 30 September 2001 18:23, Armando Cerna wrote:
> > I have tried system (updatemp) and exec (updatemp)
>
> The system() function requires a string as its argument. So you need to
> write it as system("updatemp"); or system("$files");
>
> Matt


Yeah I did it like that I just didn't type it out in the email like that, 
sorry for the confustion.  Would the contents of updatemp matter, just in 
case you didn't catch it on the previous email here it is



smbclient //machine/c -I 192.168.0.4 -U armando%secret -D a1 -c 'lcd /tmp/dbf 
; prompt ; mget *.dbf ; quit'

Thanks, 
Armando

-- 
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: how many day between the two time format

2001-09-30 Thread Justin Garrett

If both times are UNIX timestamps

$seconds_per_day = 60 * 60 * 24;
$dif = $today - $last_day;
$days = (int)($dif / $seconds_per_day);

--
Justin Garrett

"Yang" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> i want to check about how many day between the two time format
> like
> $last_day=time format;
> $today=time();
> $between_day=?($today-$last_day);
> echo $between_day is the between day...
>
>
>
>



-- 
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] scrolling news [sort of OT]

2001-09-30 Thread Tyler Longren

Hello all,

Does anyone know of any javascript that will display "scrolling news"?  I'd
like to manipulate this js code with php so it can display whatever's in the
database.

Thanks everyone,
Tyler


-- 
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: Troublesome complex fetching from database

2001-09-30 Thread Justin Garrett

Try the following to organize your results.  You'll have to check the table
names and typos etc.

$sql = "SELECT schooltypes.schooltypes,
   schools.schoolname,
   teachers.lastname,
   teachers.tuserid
FROM   schooltypes,
  schools,
  teachers,
  teachers_school
   WHERE schooltypes.typeid = schools.typeid
   AND  schools.schoolid = teachers_schools.schoolid
   AND  teacher_schools.tuserid = teachers.tuserid";

$result = /* perform query */;

while($row = mysql_fetch_object($result)){

$data[$row->schooltypes][$row->schoolname][] = "$row->tuserid
$row->lastname";

}

/* organize */

for(reset($data); $school_type = key($data); next($data)){
echo "$school_type";
$schools = $data[$school_type];
for(reset($schools); $school_name = key($schools); next($schools)){
echo "$school_name";
$teachers = $data[$school_type][$school_name];
$count = count($teachers);
for($i = 0; $i < $count; $i++){
echo "$teachers[$i]";
}
}
}

--
Justin Garrett


"Kath" <[EMAIL PROTECTED]> wrote in message
002601c149f3$7dec4000$[EMAIL PROTECTED]">news:002601c149f3$7dec4000$[EMAIL PROTECTED]...
> Quite an interesting quandry I have.
>
> What I have is this:
>
> Table schooltypes:
> (typeid is a unique# iding the type, schooltypes is the type of school,
say
> "Elementary School" or "High School")
>
> | typeid | schooltypes |
>
> Table schools:
> (typeid is the type the school falls under, schoolid is the unique# iding
> the school, schoolname is the general name like "Park Shore High School")
>
> | typeid | schoolid | schoolname |
>
> Table teachers:
> (tuserid is their unique id, salutation is the Mr/Mrs/Miss/Ms/Dr, last
name
> is well, duh :))
>
> | tuserid | salutation | last name |
>
> Table teachers_schools:
> (tuserid is the teacher's id, next to the school they are assigned to.
Note
> the possiblity for a teacher assigned to more than one school (hello,
> cutbacks and skeleton budgets)).
>
> | tuserid | schoolid |
>
> What I need to be able to do is list all this information as such:
>
> School type:
>
> + School 1
> - Teacher and their Teacher ID
> - Teacher and their Teacher ID
>
> + School 2
> - Teacher and their Teacher ID
> - Teacher and their Teacher ID
> - Teacher and their Teacher ID
>
> + School 3
> - Teacher and their Teacher ID
> - Teacher and their Teacher ID
>
> Another School Type:
>
> + School 5
> - Teacher and their Teacher ID
> - Teacher and their Teacher ID
>
> + School 7
> - Teacher and their Teacher ID
> - Teacher and their Teacher ID
>
> Currently, I AM able to list the school type and the school correctly.
> However, when I come to listing the teachers in the school, every teacher
is
> listed under every school, some more than one time.
>
> Any ideas/code snips on how to do this?
>
> In what direction should be I solving this?
>
> Going from type->school->teachers assigned->teacher info?
>
> Or teachers assigned->teacher info->schools->type?
>
> Right now I am doing the first, sorta.
>
> - k
>



-- 
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: fopen

2001-09-30 Thread Kmarada

I read the manual but i still don't know how to use flock do you have an
exemple?
flock works on windows2000 ?

Martin <[EMAIL PROTECTED]> escreveu nas notícias de
mensagem:[EMAIL PROTECTED]
> Kmarada schrieb:
>
> > is it possible to use fopen to open 5000 files differents simultaneous
and
> > edit it simultaneous ?
>
> I think, this depends how many files your operating-system can handle.
>
> > i have one file. if four user edit it simultaneous what happen? there is
> > something to lock the file until one finish to edit?
>
> see "flock".
>
>



-- 
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] displaying certain columns

2001-09-30 Thread Melih Onvural

i have a database and it randomly selects one piece of data from a table of
quotes, but it will only print the quote when I include the row that it's
picked with. I have my SELECT statement at

$sql = "SELECT $dbrow FROM $dbtable ORDER BY RAND() LIMIT 1";

and then to display the result

$result = mysql_db_query($dbname, $sql)


then in the code,

print " $result ";

what do i need to add? (the result is Resource id #3)

thank you,
Melih



-- 
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: displaying certain columns

2001-09-30 Thread Justin Garrett

$result = mysql_db_query($dname, $sql);
$row = mysql_fetch_object($result);

echo "$row->field_name";

--
Justin Garrett

"Melih Onvural" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> i have a database and it randomly selects one piece of data from a table
of
> quotes, but it will only print the quote when I include the row that it's
> picked with. I have my SELECT statement at
>
> $sql = "SELECT $dbrow FROM $dbtable ORDER BY RAND() LIMIT 1";
>
> and then to display the result
>
> $result = mysql_db_query($dbname, $sql)
>
>
> then in the code,
>
> print " $result ";
>
> what do i need to add? (the result is Resource id #3)
>
> thank you,
> Melih
>
>



-- 
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: Making variable global / accessing variable

2001-09-30 Thread Justin Garrett

Maybe something similar to this?

function test($td){

$global = "global \$$td"."_error, \$$td"."_ok;";
eval($global);

$set = "\$$td"."_error = \"ERROR\"; \$$td"."_ok = \"OK\";";
eval($set);
}

test("foo");
echo "$foo_error $foo_ok";

--
Justin Garrett

"Martin" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello!
>
> How can I make a variable, which name I give to a function, global in
> this function?
>
> I want to make something like:
>
> function MyFunc($sVarName)
> {GLOBAL [$sVarName]_error, $sVarName_ok;
> 
> }
>
> So if $sVarName = "sHello", I want to access $sHello_error and
> $sHello_ok in this function.
>
> Any idea how I can make this variable gloabl and whats the easyst way to
> access this var then?
>
> Martin
>
>



-- 
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] displaying certain columns

2001-09-30 Thread Christian Dechery

You have to fetch the row data with some function...

try mysql_fetch_row() or mysql_fetch array(), examples:

$arr=mysql_fetch_row($result);
echo $arr[0];

or

$arr=mysql_fetch_array($result);
echo $arr[$dbrow];

that should do...


At 21:19 30/9/2001 -0400, you wrote:
>i have a database and it randomly selects one piece of data from a table of
>quotes, but it will only print the quote when I include the row that it's
>picked with. I have my SELECT statement at
>
>$sql = "SELECT $dbrow FROM $dbtable ORDER BY RAND() LIMIT 1";
>
>and then to display the result
>
>$result = mysql_db_query($dbname, $sql)
>
>
>then in the code,
>
>print " $result ";
>
>what do i need to add? (the result is Resource id #3)
>
>thank you,
>Melih
>
>
>
>--
>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]


_
. Christian Dechery
. . Gaita-L Owner / Web Developer
. . http://www.webstyle.com.br
. . http://www.tanamesa.com.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]




Re: [PHP] Re: Making variable global / accessing variable

2001-09-30 Thread Jason G.


I have used:

global $$td;

in the past with success...

-Jason Garber
IonZoft.com


At 07:38 PM 9/30/2001 -0700, Justin Garrett wrote:
>Maybe something similar to this?
>
>function test($td){
>
> $global = "global \$$td"."_error, \$$td"."_ok;";
> eval($global);
>
> $set = "\$$td"."_error = \"ERROR\"; \$$td"."_ok = \"OK\";";
> eval($set);
>}
>
>test("foo");
>echo "$foo_error $foo_ok";
>
>--
>Justin Garrett
>
>"Martin" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hello!
> >
> > How can I make a variable, which name I give to a function, global in
> > this function?
> >
> > I want to make something like:
> >
> > function MyFunc($sVarName)
> > {GLOBAL [$sVarName]_error, $sVarName_ok;
> > 
> > }
> >
> > So if $sVarName = "sHello", I want to access $sHello_error and
> > $sHello_ok in this function.
> >
> > Any idea how I can make this variable gloabl and whats the easyst way to
> > access this var then?
> >
> > Martin
> >
> >
>
>
>
>--
>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: Making variable global / accessing variable

2001-09-30 Thread Jason G.


function MyFunction($td)
{
 global $$td;
 echo $$td; // echos 3
 $$td = 5;
}

$billybob = 3;
MyFunction("billybob");
//Now $billybob = 5

-Jason Garber
IonZoft.com

At 10:25 PM 9/30/2001 -0400, you wrote:

>I have used:
>
>global $$td;
>
>in the past with success...
>
>-Jason Garber
>IonZoft.com
>
>
>At 07:38 PM 9/30/2001 -0700, Justin Garrett wrote:
>>Maybe something similar to this?
>>
>>function test($td){
>>
>> $global = "global \$$td"."_error, \$$td"."_ok;";
>> eval($global);
>>
>> $set = "\$$td"."_error = \"ERROR\"; \$$td"."_ok = \"OK\";";
>> eval($set);
>>}
>>
>>test("foo");
>>echo "$foo_error $foo_ok";
>>
>>--
>>Justin Garrett
>>
>>"Martin" <[EMAIL PROTECTED]> wrote in message
>>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> > Hello!
>> >
>> > How can I make a variable, which name I give to a function, global in
>> > this function?
>> >
>> > I want to make something like:
>> >
>> > function MyFunc($sVarName)
>> > {GLOBAL [$sVarName]_error, $sVarName_ok;
>> > 
>> > }
>> >
>> > So if $sVarName = "sHello", I want to access $sHello_error and
>> > $sHello_ok in this function.
>> >
>> > Any idea how I can make this variable gloabl and whats the easyst way to
>> > access this var then?
>> >
>> > Martin
>> >
>> >
>>
>>
>>
>>--
>>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]
>

At 10:25 PM 9/30/2001 -0400, Jason G. wrote:

>I have used:
>
>global $$td;
>
>in the past with success...
>
>-Jason Garber
>IonZoft.com
>
>
>At 07:38 PM 9/30/2001 -0700, Justin Garrett wrote:
>>Maybe something similar to this?
>>
>>function test($td){
>>
>> $global = "global \$$td"."_error, \$$td"."_ok;";
>> eval($global);
>>
>> $set = "\$$td"."_error = \"ERROR\"; \$$td"."_ok = \"OK\";";
>> eval($set);
>>}
>>
>>test("foo");
>>echo "$foo_error $foo_ok";
>>
>>--
>>Justin Garrett
>>
>>"Martin" <[EMAIL PROTECTED]> wrote in message
>>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> > Hello!
>> >
>> > How can I make a variable, which name I give to a function, global in
>> > this function?
>> >
>> > I want to make something like:
>> >
>> > function MyFunc($sVarName)
>> > {GLOBAL [$sVarName]_error, $sVarName_ok;
>> > 
>> > }
>> >
>> > So if $sVarName = "sHello", I want to access $sHello_error and
>> > $sHello_ok in this function.
>> >
>> > Any idea how I can make this variable gloabl and whats the easyst way to
>> > access this var then?
>> >
>> > Martin
>> >
>> >
>>
>>
>>
>>--
>>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] ***INTRODUCTORY FREE TRIAL OFFER***

2001-09-30 Thread XSINV Sales


***INTRODUCTORY FREE TRIAL OFFER***

XSINV  LLC is proud to announce the release of our unique inventory-trading platform.  
http://www.xsinv.com Available now to all businesses.

Do you have:
Too much inventory?
Too many shortages?

Do you:
Need to buy?
Need to sell?

Do you:
Need components, equipment etc?
Need to sell components, equipment etc?

If you answered yes to any or all of these questions click
http://www.xsinv.com to see how we can help.
Learn about our easy to use, hassle free tool to help you efficiently manage your 
excess and shortages.

Special introductory offer:  Join now and receive 4 free months on annual subscription.

If you wish to not receive emails from us in the future, please reply with " REMOVE " 
in the SUBJECT LINE of email & send to: [EMAIL PROTECTED]  Please make very clear 
the EXACT email address(es) to be removed.


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

2001-09-30 Thread Matthew Delmarter

How do I use ereg to check for MSIE 5.5 and above.

eg: eregi("(MSIE.[56])",$HTTP_USER_AGENT)

This only gets version 5 and 6 ... but I want 5.5 and above. Any
ideas?

Regards,

Matthew Delmarter


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

2001-09-30 Thread ReDucTor

use MSIE:[56|5\..|6\..] something like that, i suck at regular expression :D
- Original Message - 
From: "Matthew Delmarter" <[EMAIL PROTECTED]>
To: "PHP Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, October 01, 2001 1:32 PM
Subject: [PHP] ereg


> How do I use ereg to check for MSIE 5.5 and above.
> 
> eg: eregi("(MSIE.[56])",$HTTP_USER_AGENT)
> 
> This only gets version 5 and 6 ... but I want 5.5 and above. Any
> ideas?
> 
> Regards,
> 
> Matthew Delmarter
> 
> 
> -- 
> 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] php_admin_flag safe_mode off

2001-09-30 Thread Richard Kurth

Way will this Command not work in the httpd.conf file
I have safe mode turned on in the php.ini file but I what it off in
one of my sites so I added  php_admin_flag safe_mode off to the virtualhost
that I want it off in like below

other stuff
 php_admin_flag safe_mode off


According to the manual you can turn any variable that is in the php.ini
file on or off in the https.conf file by adding
















Best regards,
 Richard  
mailto:[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: Making variable global / accessing variable

2001-09-30 Thread Justin Garrett

But how would you use this to create new global variables with $td as the
prefix?

$td = "foo";

then we want new global variables

$foo_error and $foo_ok created.

--
Justin Garrett

"Jason G." <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> function MyFunction($td)
> {
>  global $$td;
>  echo $$td; // echos 3
>  $$td = 5;
> }
>
> $billybob = 3;
> MyFunction("billybob");
> file://Now $billybob = 5
>
> -Jason Garber
> IonZoft.com
>
> At 10:25 PM 9/30/2001 -0400, you wrote:
>
> >I have used:
> >
> >global $$td;
> >
> >in the past with success...
> >
> >-Jason Garber
> >IonZoft.com
> >
> >
> >At 07:38 PM 9/30/2001 -0700, Justin Garrett wrote:
> >>Maybe something similar to this?
> >>
> >>function test($td){
> >>
> >> $global = "global \$$td"."_error, \$$td"."_ok;";
> >> eval($global);
> >>
> >> $set = "\$$td"."_error = \"ERROR\"; \$$td"."_ok = \"OK\";";
> >> eval($set);
> >>}
> >>
> >>test("foo");
> >>echo "$foo_error $foo_ok";
> >>
> >>--
> >>Justin Garrett
> >>
> >>"Martin" <[EMAIL PROTECTED]> wrote in message
> >>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >> > Hello!
> >> >
> >> > How can I make a variable, which name I give to a function, global in
> >> > this function?
> >> >
> >> > I want to make something like:
> >> >
> >> > function MyFunc($sVarName)
> >> > {GLOBAL [$sVarName]_error, $sVarName_ok;
> >> > 
> >> > }
> >> >
> >> > So if $sVarName = "sHello", I want to access $sHello_error and
> >> > $sHello_ok in this function.
> >> >
> >> > Any idea how I can make this variable gloabl and whats the easyst way
to
> >> > access this var then?
> >> >
> >> > Martin
> >> >
> >> >
> >>
> >>
> >>
> >>--
> >>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]
> >
>
> At 10:25 PM 9/30/2001 -0400, Jason G. wrote:
>
> >I have used:
> >
> >global $$td;
> >
> >in the past with success...
> >
> >-Jason Garber
> >IonZoft.com
> >
> >
> >At 07:38 PM 9/30/2001 -0700, Justin Garrett wrote:
> >>Maybe something similar to this?
> >>
> >>function test($td){
> >>
> >> $global = "global \$$td"."_error, \$$td"."_ok;";
> >> eval($global);
> >>
> >> $set = "\$$td"."_error = \"ERROR\"; \$$td"."_ok = \"OK\";";
> >> eval($set);
> >>}
> >>
> >>test("foo");
> >>echo "$foo_error $foo_ok";
> >>
> >>--
> >>Justin Garrett
> >>
> >>"Martin" <[EMAIL PROTECTED]> wrote in message
> >>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >> > Hello!
> >> >
> >> > How can I make a variable, which name I give to a function, global in
> >> > this function?
> >> >
> >> > I want to make something like:
> >> >
> >> > function MyFunc($sVarName)
> >> > {GLOBAL [$sVarName]_error, $sVarName_ok;
> >> > 
> >> > }
> >> >
> >> > So if $sVarName = "sHello", I want to access $sHello_error and
> >> > $sHello_ok in this function.
> >> >
> >> > Any idea how I can make this variable gloabl and whats the easyst way
to
> >> > access this var then?
> >> >
> >> > Martin
> >> >
> >> >
> >>
> >>
> >>
> >>--
> >>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] php graphics generation

2001-09-30 Thread Chip

I have been using php for simple things so far, and am just starting to look 
into the image generation functions of php. I am wondering just what people 
use these for in real-life applications, some real references. I know what 
the books say can be done, I am interested in what is being done with it.
Just out of curiosity,

--
Chip W.

-- 
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] php graphics generation

2001-09-30 Thread Maxim Maletsky \(PHPBeginner.com\)


Check out netcratf.com
Their graphs are auto generated by (I think) PHP.

Also you can use them a lot for many other kind of charts and stats
graphs.


Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: Chip [mailto:[EMAIL PROTECTED]] 
Sent: lunedì 1 ottobre 2001 6.43
To: [EMAIL PROTECTED]
Subject: [PHP] php graphics generation


I have been using php for simple things so far, and am just starting to
look 
into the image generation functions of php. I am wondering just what
people 
use these for in real-life applications, some real references. I know
what 
the books say can be done, I am interested in what is being done with
it. Just out of curiosity,

--
Chip W.

-- 
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] php graphics generation

2001-09-30 Thread Maxim Maletsky \(PHPBeginner.com\)


netcraFT.com, sorry

Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Maxim Maletsky (PHPBeginner.com)
[mailto:[EMAIL PROTECTED]] 
Sent: lunedì 1 ottobre 2001 8.54
To: 'Chip'; [EMAIL PROTECTED]
Subject: RE: [PHP] php graphics generation



Check out netcratf.com
Their graphs are auto generated by (I think) PHP.

Also you can use them a lot for many other kind of charts and stats
graphs.


Maxim Maletsky
www.PHPBeginner.com




-Original Message-
From: Chip [mailto:[EMAIL PROTECTED]] 
Sent: lunedì 1 ottobre 2001 6.43
To: [EMAIL PROTECTED]
Subject: [PHP] php graphics generation


I have been using php for simple things so far, and am just starting to
look 
into the image generation functions of php. I am wondering just what
people 
use these for in real-life applications, some real references. I know
what 
the books say can be done, I am interested in what is being done with
it. Just out of curiosity,

--
Chip W.

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