Re: [PHP] date - day

2001-06-26 Thread Philip Olson


mktime can be pretty useful :

  $year  = 2001;
  $month = 6;
  $day   = 1;

  print date('l',mktime(0,0,0,$month,$day,$year));

as it creates a unix timestamp, and date() appreciates that.


Regards,
Philip


On Mon, 25 Jun 2001, Tyler Longren wrote:

 Hello,
 
 I have something like this:
 $Month = 6;
 $Year = 2001;
 $Date = 1;
 
 Is there any relatively simple way to get the day out of that?  For example,
 the day for 6-1-2001 would be Friday.
 
 Thanks,
 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 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] [OT-ish] Optional Extras.

2001-06-26 Thread ..s.c.o.t.t..

off the top of my head, you could try using a 
lookup table to define the extra options...

ford_spec table:
id  desc
--- ---
1   air conditioning
2   whatever

ford_cars table:
car extra1  extra2
--  --- -
'contour'   1   0
'probe' 0   1

contour would have aircond but no whatever
probe would have no aircond but would have whatever

so to add more options specific to a manufacturer, 
you could make an entry into ford_spec and then
create an extra3 field in ford_cars... this system,
at least, would enable you to have as many extras
as you wanted for each manufacturer, and have
different options available for different manufacturers.

i dont know how efficient this would be, and there are
probably a bunch of better ways to do it, but i've seen
this method used before by someone who developed
a batteries catalog and needed to store different
manufacturers with different options for their batteries.


 -Original Message-
 From: Dave Mariner [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 25, 2001 12:54
 To: [EMAIL PROTECTED]
 Subject: [PHP] [OT-ish] Optional Extras.
 
 
 Please excuse me if you consider this to be off-topic, but this is the best
 place I can think of to ask the (slightly long-winded) question.
 
 Imagine you have a car database (MySQL driven). Different models have
 different optional extras (air-con, central locking, immobiliser etc). I
 need to store the optional extras in a searchable form - i.e. the customer
 may have a wish-list of electric windows, aircon, and power steering.
 However the optional extras list is not and will not be finalised when the
 system goes live (probably will never be finalised!). Therefore I cannot do
 the quick-and-dirty hack of putting all the options as binary fields in my
 car database, so must come up with a more elegant solution. I've thought of
 storing e.g. 10 tuples car.option1-aircon code, car.option2-powersteering
 code. etc. and also going down the header-detail route.
 My current quandry is to which is going to be better for the search
 aspect, considering I'd also like to give them a best fit option. Would it
 be to create a cursor on my fixed criterion (price, age etc) and then
 iterate through each of those manually in my php script (see - it isn't
 entirely off topic ;0) ) counting the matches for that record in the
 optional-extra detail table? Or would it be to do a select where
 (optionalextra1=mychoice1 or optionalextra2 = mychoice1 ..) and
 (optionalextra2=mychoice2 or optionalextra2 = mychoice2.. ) and  etc
 etc (yeuch!).
 
  I have a sneaking suspicion that there's a more elegant way than either
 of these, but can't think of it at the moment.
 
  If you come up with the solution there's a beer in it for you the next
 time you're in Paphos, Cyprus!
 
 Thanks in advance,
 
 Dave.
 
 
 
 
 -- 
 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 newsgroups still down?

2001-06-26 Thread Michael Simcich

I hadn't checked the php news servers since the mailing list went back
online. At least to me, at this moment, the news servers seem to be
missing in action. Anyone know what the scoop is on this?

Michael Simcich
AccessTools 


-- 
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] Expand/parse variables in file

2001-06-26 Thread Jason Lustig

$a = whatever;
$b = abc $a def;
echo $b;

which results in abc whatever def ???

What am I missing?

$b = abc $a def;

That gets parsed because it's in double-quotes. Since $a is a variable, it
inputs whatever $a is, in this case Whatever. So it ends up printnig out
abc whatever def. To fix it, either escape the $a, or use single-quotes.

--Jason


-- 
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] Expand/parse variables in file

2001-06-26 Thread David Robley

On Mon, 25 Jun 2001 23:09, Gunther E. Biernat wrote:
 All,

 This ought to be simple, but I can't crack it...

 I'm trying to read a plain text file where I embedded some variables.
 E.g.

 abc $a def

 Sucking this file in a string and setting $a to whatever results in
 abc $a def rather than abc whatever def. Where's the difference to
 directly doing the following:

 $a = whatever;
 $b = abc $a def;
 echo $b;

 which results in abc whatever def ???

 What am I missing?

 Thanks in advance.



 mit freundlichen Gruessen / yours sincerely

In a word, eval() :-)

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   I won't finish in fifth place, Tom held forth.

-- 
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] Enter to BR

2001-06-26 Thread Philip Hallstrom

See the nl2br() function.

In article 9h8ct3$n0t$[EMAIL PROTECTED] you write:
How can I get an Enter typed in a HTML textfield to be inerpreted as a BR or
a P tag?
Someone sugested I use the split() function, but I wouldn't know how...

Joeri Vankelst



-- 
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] Expand/parse variables in file

2001-06-26 Thread David Robley

On Mon, 25 Jun 2001 23:09, Gunther E. Biernat wrote:
 All,

 This ought to be simple, but I can't crack it...

 I'm trying to read a plain text file where I embedded some variables.
 E.g.

 abc $a def

 Sucking this file in a string and setting $a to whatever results in
 abc $a def rather than abc whatever def. Where's the difference to
 directly doing the following:

 $a = whatever;
 $b = abc $a def;
 echo $b;

 which results in abc whatever def ???

 What am I missing?

 Thanks in advance.

[eval()]

Or you could include/require the text file making sure the stuff you want 
interpreted in the file is enclosed in php tags - depends on exactly 
how your text is structured.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   A mind is a terrible thing to ... er ... h?

-- 
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] Passing an array to a C program from a php script??

2001-06-26 Thread Jason Lustig

Why not make a separate .txt file which is read by the PHP script to make
its variable with file(), and have the C file read it with ifstream to make
up its variable?

--Jason


-- 
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] Passing an array to a C program from a php script??

2001-06-26 Thread Jason Murray

 I have a big array (nearly 1000 lines) that I would like to pass to a C
 program. I don't want to create a temporary file to pass my array (If
 possible ?!?), and I don't think the command line will fit my needs.
 
 Is there a way to execute a program with a php string as the standard
 input. Something like shell redirection 'c_program  input.file' but with
 input.file being a php variable and not a real file ?? Any other solution
 ??

If your PHP script outputs to stdout, then you could run:

  c_program  myscript.php

Your PHP script will need to output the array as if it were outputting
to the screen or web page (ie, echo/print), and your C program will need
to know what format it's coming in as.

Jason

-- 
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] Enter to BR

2001-06-26 Thread Jason Murray

 How can I get an Enter typed in a HTML textfield to be 
 inerpreted as a BR or a P tag? Someone sugested I use the 
 split() function, but I wouldn't know how...

You'll want to use nl2br(), then.

Jason

-- 
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] Enter to BR

2001-06-26 Thread Zak Greant

Use nl2br()

--zak

- Original Message -
From: Joeri Vankelst [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 25, 2001 4:16 PM
Subject: [PHP] Enter to BR


 How can I get an Enter typed in a HTML textfield to be inerpreted as a BR
or
 a P tag?
 Someone sugested I use the split() function, but I wouldn't know how...

 Joeri Vankelst



 --
 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] function to determine caller

2001-06-26 Thread Morgan Curley

Is there any statement analogous to perl's caller which will tell you what 
called the current function?

I would like to enforce the privacy of some of the class methods I am writing.

Thanks,
Morgan


-- 
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] I want to get the input of keyboard

2001-06-26 Thread little boy

hi,all
I want to  get the  input of keyboard from php files,but i can't know how to
do.

Who can tell me any advace about that?
Thx.



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

2001-06-26 Thread infoz

Use mktime() and then date().

http://www.php.net/manual/en/function.mktime.php
http://www.php.net/manual/en/function.date.php

- Tim
  http://www.phptemplates.org

- Original Message -
From: Tyler Longren [EMAIL PROTECTED]
To: php-general [EMAIL PROTECTED]
Sent: Monday, June 25, 2001 10:58 AM
Subject: [PHP] date - day


 Hello,

 I have something like this:
 $Month = 6;
 $Year = 2001;
 $Date = 1;

 Is there any relatively simple way to get the day out of that?  For
example,
 the day for 6-1-2001 would be Friday.

 Thanks,
 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 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] I want to get the input of keyboard

2001-06-26 Thread Hugh Bothwell

little boy [EMAIL PROTECTED] wrote in message
9h90pi$3ag$[EMAIL PROTECTED]">news:9h90pi$3ag$[EMAIL PROTECTED]...
 hi,all
 I want to  get the  input of keyboard from php files,but i can't know how
to
 do.

 Who can tell me any advace about that?
 Thx.

If you're running PHP as a server-side web scripting language, you can
forget it.  What you have to do is write an HTML form and process the
returned data.  If you need more interaction than that, look at JavaScript
or Flash/ActionScript.



-- 
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] Enter to BR

2001-06-26 Thread Jason Lustig

try nl2br()

--Jason

-- 
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] Installation problems with MySQL

2001-06-26 Thread Aral Balkan

Have you tried FoxServ? I think it's a godsent if you're running on
Windows -- installs Apache, PHP and MySQL without a hitch (at least it did
for me!)

-- http://sourceforge.net/projects/foxserv/

Hope this helps.

Aral :)
__
([EMAIL PROTECTED])
New Media Producer, Kismia, Inc.
([EMAIL PROTECTED])
Adj. Prof., American University
¯¯



-- 
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] Fetching binaires from an e-mail

2001-06-26 Thread Nicklas af Ekenstam

Hi

I'm currently trying to rewrite one of my old perl applications to php
and everything works great except one thing:
I can't figure out how to write a piece of code that will fetch and
unencode all binaires, if any, from an e-mail message in an imap stream
and return them so that I can save them to disk And rest assured it's
not for lack of trying ;-)

If anybody here has seen or written something like that and wouldn't
mind sharing that code with me I'd be forever grateful.

Thanks!

- Nicklas


-- 
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] Help with simple regular expression

2001-06-26 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (scott [gts]) wrote:

 preg_match('/blah(.*?)/', $text, $matches)
 
 in the case of perl regexp's, you have to specifically
 tell the regexp not to be greedy.  the ? regexp modifier
 is how you do this.  (otherwise, the regexp will try and
 match the maximum amount of text that it can, which
 usually isnt what you want, since it'll match *eveything*
 between blah and the last occurance of  in the text)

More ways to achieve the same effect, using the U modifier to invert the 
greediness of a regex expression or sub-expression:

preg_match('/blah(.*)/U', $text, $matches)
preg_match('/blah(.*?U)/', $text, $matches)

-- 
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] Enter to BR

2001-06-26 Thread Philip Olson


Three resources that should interest you greatly :

First, learn about the html wrap attribute.  Although the following url is
very long, it should be of use as it contains some examples (search google
for terms html textarea wrap for more info) :
 
  web-wise-wizard.com/html-tutorials/html-form-forms-textarea-wrap.html

Next, learn a little about linefeed / newline here :

  http://www.faqts.com/knowledge_base/view.phtml/aid/901/

And from there, getting br's from \n's is a snap, check out :

  http://www.php.net/manual/function.nl2br.php

It's up to you from there :-)


regards,
Philip Olson



On Tue, 26 Jun 2001, Joeri Vankelst wrote:

 How can I get an Enter typed in a HTML textfield to be inerpreted as a BR or
 a P tag?
 Someone sugested I use the split() function, but I wouldn't know how...
 
 Joeri Vankelst
 
 
 
 -- 
 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 Files on Browser

2001-06-26 Thread Tim McGuire

Hi Ted,
There is an installer available for free that will painlessly install apache, php, and 
mysql on your windows system.
Good tool for trying out stuff locally or hosting an intranet application on a windows 
box.
PHPTriad available from www.phpgeek.com 
Can't praise it enough.

Tim McGuire
Programmer Analyst
Minnesota Department of Natural Resources


 Ted Shaw [EMAIL PROTECTED] 06/24/01 01:21PM 
G'day -

Sorry for this stupid question but I'm a newby trying to install php on my
win98 computer and find that neither netscape nor IE 5.5 won't open php
files that are located on my c: drive but will access php files on the net.
There must be a simple explanation. 

Any help greatly appreciated...

Ted Shaw


-- 
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] Enter to BR

2001-06-26 Thread David Robley

On Tue, 26 Jun 2001 07:46, Joeri Vankelst wrote:
 How can I get an Enter typed in a HTML textfield to be inerpreted as a
 BR or a P tag?
 Someone sugested I use the split() function, but I wouldn't know how...

 Joeri Vankelst

nl2br() is just the tool for this.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   He who dies with the most toys... is *still* DEAD!

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

2001-06-26 Thread David Robley

On Tue, 26 Jun 2001 00:28, Tyler Longren wrote:
 Hello,

 I have something like this:
 $Month = 6;
 $Year = 2001;
 $Date = 1;

 Is there any relatively simple way to get the day out of that?  For
 example, the day for 6-1-2001 would be Friday.

 Thanks,
 Tyler

If that info comes from a database, the db might have date formatting 
capabilities that you could use.

Otherwise, mktime and date would do:

$dayofweek = date(l, mktime(0,0,0,$Month, $Date, $Year))

Or you could use getdate instead of date to populate an array of 
interesting values :-)

Have a look at the date functions for more exciting possibilities.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Birds are trapped by their feet, people by their tongues.

-- 
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] Enter to BR

2001-06-26 Thread Jason Lotito

nl2br()
http://www.php.net/nl2br

Jason Lotito
www.NewbieNetwork.net
PHP Newsletter: http://www.newbienetwork.net/ciao.php
PHP, MySQL, PostgreSQL Tutorials, Code Snippets, and so much more

 -Original Message-
 From: Joeri Vankelst [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, June 25, 2001 6:17 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Enter to BR
 
 
 How can I get an Enter typed in a HTML textfield to be 
 inerpreted as a BR or a P tag? Someone sugested I use the 
 split() function, but I wouldn't know how...
 
 Joeri Vankelst
 
 
 
 -- 
 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] Enter to BR

2001-06-26 Thread Peter Houchin - SunRentals Australia

I've never needed to assign Enter to = p or br just make sure your using 
textarea name=foo cols=20/textarea

and you should have no problems

peter

-Original Message-
From: Joeri Vankelst [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 8:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Enter to BR


How can I get an Enter typed in a HTML textfield to be inerpreted as a BR or
a P tag?
Someone sugested I use the split() function, but I wouldn't know how...

Joeri Vankelst



-- 
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] Help with simple regular expression

2001-06-26 Thread Aral Balkan

 Yes, Perl is greedy

I was actually using ereg which I believe is POSIX, so POSIX must be greedy
too!

Aral :)
__
([EMAIL PROTECTED])
New Media Producer, Kismia, Inc.
([EMAIL PROTECTED])
Adj. Prof., American University
¯¯



-- 
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] Remove value from array

2001-06-26 Thread elias

array_splice() is the best!
thanks for the hint.

Philip Olson [EMAIL PROTECTED] wrote in message
Pine.BSF.4.10.10106252001180.61091-10@localhost">news:Pine.BSF.4.10.10106252001180.61091-10@localhost...
 Here's an example :

 ?php

 $foo = array('a','b','c');

   unset($foo[1]);

   print_r($foo);// [0] = a [2] = c

 $bar = array('a','b','c');

   $piece = array_splice ($bar, 1 ,1);

   print_r($piece);  // [0] = b

   print_r($bar);// [0] = a [1] = c

 ?

 http://www.php.net/manual/function.array-splice.php


 regards,
 philip


 On Mon, 25 Jun 2001, Bret R. Zaun wrote:

  Hello,
  how can I complete remove an item out of an array ?
  I tried unset() as well as setting the value to null.
 
  Both result in the value being null but not the item being deleted.
 
  Any help is appreciated
  Heiko
 
 
 
  --
  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] function to determine caller

2001-06-26 Thread elias

There has been a discussion similar to this. But unfortunately PHP doesn't
have such feature.

Morgan Curley [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Is there any statement analogous to perl's caller which will tell you what
 called the current function?

 I would like to enforce the privacy of some of the class methods I am
writing.

 Thanks,
 Morgan


 --
 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] I want to get the input of keyboard

2001-06-26 Thread elias

?
  $fp = fopen(con, rt);
  $buf= fread($fp, 9);
  fclose($fp);
  echo result=$buf;
?
something like that


little boy [EMAIL PROTECTED] wrote in message
9h90pi$3ag$[EMAIL PROTECTED]">news:9h90pi$3ag$[EMAIL PROTECTED]...
 hi,all
 I want to  get the  input of keyboard from php files,but i can't know how
to
 do.

 Who can tell me any advace about that?
 Thx.



 --
 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 newsgroups still down?

2001-06-26 Thread elias

Hey! I'm using the newsserver! and it's cool!

Michael Simcich [EMAIL PROTECTED] wrote in message
01c0fddd$8f329330$6401a8c0@gemini">news:01c0fddd$8f329330$6401a8c0@gemini...
 I hadn't checked the php news servers since the mailing list went back
 online. At least to me, at this moment, the news servers seem to be
 missing in action. Anyone know what the scoop is on this?

 Michael Simcich
 AccessTools


 --
 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-WIN] Problems running php from samba network shares...

2001-06-26 Thread Jason Murray

 This is all fine and dandy, I can access this directory using 
 a client based browser, surf around and check html files.
 
 But when I try to access a php file, I get the following 
 error message...

This is probably because you're accessing \\sharename\www\myscript.php, 
which tells whatever is loading the file to load it directly from the 
share instead of using HTTP. It's like loading a PHP file off your desktop
and wondering why the script doesn't run.

Jason

-- 
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] Passing an array to a C program from a php script??

2001-06-26 Thread mailing_list

 Hi all,
 
 I have a big array (nearly 1000 lines) that I would like to pass to a C
 program. I don't want to create a temporary file to pass my array (If
 possible ?!?), and I don't think the command line will fit my needs.
 
 Is there a way to execute a program with a php string as the standard
 input. Something like shell redirection 'c_program  input.file' but with
 input.file being a php variable and not a real file ?? Any other solution
 ??
 
 Hope I am clear enough !

what you can do is serialize the array and then parse it with you c-program
(it is not very difficult, to get the syntax ;-) ):
popen($fh,|my_c_program);
pwrite($fh,$serialized_array);
pclose($ph);

(hope that was what you were asking)
michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 11!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


-- 
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] Expand/parse variables in file

2001-06-26 Thread mailing_list

 $a = whatever;
 $b = abc $a def;
 echo $b;

but:
$a = 'whatever;
$b = 'abc $a def';
echo $b;
doesn't do what you like (and this is more likely your problem!)

this is the clue:
$a = 'whatever;
$b = 'abc $a def';
echo eval($b);

michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 11!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


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

2001-06-26 Thread elias

I can tell you that I also read that authentication won't work while PHP is
installed as CGI.

Brave Cobra [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 I know it doesn't have a lot to do with PHP, and then again...

 I'm trying to get PHP authentication to work on an IIS 5.0 server.
 The thing is, the server is not sending my desired headers. The script,
I'm
 using, works perfectly. I've tested that, on an Apache server online.
Works
 brilliantly. ;)
 What do I need to do to get it working, apart from adding the entry for
the
 ISAPI filters, using the php4isapi.dll?
 Do I need a registry entry somewhere? I've read about that somewhere.
 Can it work when using the php.exe(or CGI-version)?(using the ISAPI dll
 version is not working either, although I've read the install file over
and
 over again...)
 I can get PHP to work, using the cgi(or exe) version of PHP, although I
 don't think, I can get PHP authentication to work this way. Correct me if
 I'm wrong here.

 In other words, how do I configure my IIS to get PHP working with PHP
 authentication?

 tnx

 Brave Cobra



 --
 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] Oracle and PHP

2001-06-26 Thread elias

I can only say that you must have the Oracle extensions installed and
enabled in PHP.ini


Please post in text format next time!



-- 
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 Uptime error

2001-06-26 Thread Peter Phillips

Thanks for your help, this is what I get when I try a uptime while logged in
as nobody.


host:/# su nobody
host:/$ uptime
Error: /proc must be mounted
  To mount /proc at boot you need an /etc/fstab line like:
  /proc   /proc   procdefaults
  In the meantime, mount /proc /proc -t proc
Error: /proc must be mounted
  To mount /proc at boot you need an /etc/fstab line like:
  /proc   /proc   procdefaults
  In the meantime, mount /proc /proc -t proc
  2:38am  up 0 min,  1 user,  load average: 0.00, 0.00, 0.00


These are the permissions is /proc:
-r--r--r--   1 root root0 Jun 26 02:39 loadavg
-r--r--r--   1 root root0 Jun 26 02:33 uptime

What should they be to enable nobody to access uptime?

Thanks again.

--
Keyboard not detected, press F1 to continue...

Tim Zickus [EMAIL PROTECTED] wrote in message
002901c0fd67$2c251360$0401a8c0@lan">news:002901c0fd67$2c251360$0401a8c0@lan...

 Check the permissions on the files in /proc, which is where uptime gets
its
 info from, most likely.

 You could probably even read the pseudo-file '/proc/loadavg' as 'nobody'
 directly from PHP given the appropriate file permissions.

 - Tim
   http://www.phptemplates.org

  Richard Lynch's advice was correct, I cannot run uptime under nobody for
  some reason.  Does anyone know how to change this?  The permissions are
 set
  to allow everyone to execute 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 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] Authentication

2001-06-26 Thread Phil Driscoll

If you run PHP as a CGI, or as an ISAPI module *without* installing the ISAPI 
filter, then IIS will have already dealt with everything to do with headers 
before PHP gets a look in. Installing PHP in the ISAPI filters list allows it 
to get at the headers and do authentication, however you may have serious 
problems with the stability of the ISAPI module version of PHP.

Cheers
-- 
Phil Driscoll


-- 
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: Remove value from array

2001-06-26 Thread Tim Ward

are you sure it has not been deleted. If you check to see what's in it and
it doesn't exist you'll get the answer that it contains a null value (same
as any other non-exitsant variable). Did you do a foreach to check what is
actually in the array?

Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


 -Original Message-
 From: Bret R. Zaun [mailto:[EMAIL PROTECTED]]
 Sent: 25 June 2001 10:11
 To: [EMAIL PROTECTED]
 Subject: Remove value from array
 
 
 Hello,
 how can I complete remove an item out of an array ?
 I tried unset() as well as setting the value to null.
 
 Both result in the value being null but not the item being deleted.
 
 Any help is appreciated
 Heiko
 
 
 

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

2001-06-26 Thread Thomas Ferte

I

I use imap_status, but i want the information on the mail
(Subject,Size).

?php
$mbox = imap_open({localhost/pop3:110}INBOX,user_id,password);
$status = @imap_status($mbox,{localhost/pop3:110}ENVOYES,SA_ALL);
?
  
 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] run a fuction at each intervals

2001-06-26 Thread ewoong

Hi..

If I want to run a function at each intervals, what function I can use ??

for example

  I try to display   Time is Up   each five-minute.


   Time is up   

   after five-minute..

  Time is up 

after five-minute..

   Time is up 

   ...




-- 
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] Is this a joke?!

2001-06-26 Thread Ralph Guzman

I don't think this is a joke, infact it's good that a PERL site would
feature PHP in sections of their site. PHP borrows much from PERL, this is
why many PERL programmers including myself, began using PHP in the first
place. Not to say that one is better than the other, since they all have
their pro's and con's, so it's not a matter of what language is best
overall, but instead, what's best for the task.

Might want to read this article:

Why I Hate Advocacy
http://www.perl.com/pub/2000/12/advocacy.html


-Original Message-
From: Fredrik Arild Takle [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 7:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Is this a joke?!

Is this a joke?
http://www.perl.com/search/index.php

*hehe*



--
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] passing variables from - to frames

2001-06-26 Thread M

Hello, sorry this question here (it is not true PHP question), but I use
some variables into PHP scripts and need
pass these variables from one frame to another.

I want pass variable values between frames, these definded via input
hidden tags into form definition.
I have first frame name=framea containing form name=forma
then second frame name=frameb form name=formb
I have forma input type=hidden name=vara value=valuea and want to pass
this value to formb type=hidden name=varb

I wrote little javascript into framea something like
frameb.formb.varb.value = framea.forma.vara.value  but only got
'javascript error'. Java doesnt reckognizes frameb.formb.varb names at
all. I tried also by creating object id=frameb into frameb header
but this also didnt work.
Is there some other solution?

Please help to solve this one

Thanks very much

Miguel



-- 
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] search for a better php source code viewer

2001-06-26 Thread Jorg Krause

Hi,

I'think anybody knows highlight_file, highlight_string
or show_source, but these are not good enough.

For an application I need a more advanced technique,
which includes line numbers and let me control all
formatting instructions (not only font color...).

Is there any script out, written in PHP (and supports PHP
and HTML), that can be expanded by highlighting my own
functions/classes, my own XML-Tags etc.?

Thanx for any idea,

Joerg


-- 
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] run a fuction at each intervals

2001-06-26 Thread elias

You have multiple choices...
You can make your life easy with a simple javascript like:

html
head
titlefile.php/title
/head

body onload=setTimeout('location.reload();',5000)
?
  echo Time up!;
?
/body
/html

or you can use the meta tag equiv like:
meta http-equiv=Refresh content=3;url=http://server/timeup.php;

be more specific...you can do lots of stuff actually...

ewoong [EMAIL PROTECTED] wrote in message
9h9ild$jps$[EMAIL PROTECTED]">news:9h9ild$jps$[EMAIL PROTECTED]...
 Hi..

 If I want to run a function at each intervals, what function I can use ??

 for example

   I try to display   Time is Up   each five-minute.


Time is up   

after five-minute..

   Time is up 

 after five-minute..

Time is up 

...




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

2001-06-26 Thread Brave Cobra

Tnx,

I've been trying out some stuff last night and found out some interesting
facts!
the ISAPI dll is full of access violations. Being a Delphi programmer, I
know that ain't good.
Stable is indeed the word. Sometimes IIS could find a page, most of the time
not.

And I got the header to show :) However the authentication part (in my
script) was never triggered,
due to the fact that IIS couldn't find the page anymore, if the ISAPI dll
was used. Though luck!

So, people, when using PHP authentication, please use a Linux box!!! The
windows version doesn't really work (at all).

Brave Cobra

 - Original Message -
 From: Phil Driscoll [EMAIL PROTECTED]
 To: Brave Cobra [EMAIL PROTECTED]; Php-General
 [EMAIL PROTECTED]
 Sent: Tuesday, June 26, 2001 9:52 AM
 Subject: Re: [PHP] Authentication


  If you run PHP as a CGI, or as an ISAPI module *without* installing the
 ISAPI
  filter, then IIS will have already dealt with everything to do with
 headers
  before PHP gets a look in. Installing PHP in the ISAPI filters list
allows
 it
  to get at the headers and do authentication, however you may have
serious
  problems with the stability of the ISAPI module version of PHP.
 
  Cheers
  --
  Phil Driscoll
 
 



-- 
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 still not working

2001-06-26 Thread josep


If you d'ont compile as a module, you must copile and install apache again.

 
 Trying a re-post from yesterday...
 
 My setup is as follows:
 
 RH Linux 7.0
 PHP 4.0.5
 Apache 1.3.20
 
 I've either added or uncommented the following lines from httpd.conf:
 
 AddType application/x-httpd-php .php
 AddType application/x-httpd-php-source .phps
 
 and to mime.types:
 
 application/x-httpd-php  php phtml pht
 
 Adding a LoadModule won't work because I didn't compile as a module.
 
 I've seen some posts about AddHandler for PHP3, so I tried adding the
 following to the .conf file:
 
 AddHandler php-script  .php
 
 having no idea whether this syntax was correct or not since the only
 example I found
 in the archuves refered to v. 3.
 
 So I still get the html/php code showing up in my browser with no
 interpretation by PHP.
 Any suggestions (with the exception of Hey, maybe you should stick with
 Windows)
 are greatly appreciated.
 
 TIA
 
 Brent
 
 
 
 
 
 
 -- 
 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] Help with PHP/Oracle and serializing data

2001-06-26 Thread infoz


If the data will be less than ~4K, use 'varchar2', otherwise use 'long'.

- Tim
  http://www.phptemplates.org

- Original Message -
From: Michael Champagne [EMAIL PROTECTED]
To: PHP General Mailing List [EMAIL PROTECTED]
Sent: Monday, June 25, 2001 2:42 PM
Subject: [PHP] Help with PHP/Oracle and serializing data


 I'm developing a web application and would like to be able to store the
state
 of the application in an Oracle table by serializing a bunch of variables
and
 storing them in the database.  Has anyone done this?  What datatype would
be
 best to use here?  I'm not serializing too much data now, but other
 applications that we do in the future may.  Would this be a place to use a
 CLOB or should I stick with varchar2?  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]




Re: [PHP] [OT-ish] Optional Extras.

2001-06-26 Thread Dave Mariner

The problem with doing it this way is that it is not extensible.
A manufacturer cannot add, say, MP3 players to the list at a later date
without breaking the car table. Also, in time, there could be quite an
extensive list of features - which would lead to an inefficient storage
system.

Dave
- Original Message -
From: ..s.c.o.t.t.. [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Tuesday, June 26, 2001 7:35 AM
Subject: RE: [PHP] [OT-ish] Optional Extras.


 off the top of my head, you could try using a
 lookup table to define the extra options...

 ford_spec table:
 id desc
 --- ---
 1 air conditioning
 2 whatever

 ford_cars table:
 car extra1 extra2
 -- --- -
 'contour' 1 0
 'probe' 0 1

 contour would have aircond but no whatever
 probe would have no aircond but would have whatever

 so to add more options specific to a manufacturer,
 you could make an entry into ford_spec and then
 create an extra3 field in ford_cars... this system,
 at least, would enable you to have as many extras
 as you wanted for each manufacturer, and have
 different options available for different manufacturers.

 i dont know how efficient this would be, and there are
 probably a bunch of better ways to do it, but i've seen
 this method used before by someone who developed
 a batteries catalog and needed to store different
 manufacturers with different options for their batteries.


  -Original Message-
  From: Dave Mariner [mailto:[EMAIL PROTECTED]]
  Sent: Monday, June 25, 2001 12:54
  To: [EMAIL PROTECTED]
  Subject: [PHP] [OT-ish] Optional Extras.
 
 
  Please excuse me if you consider this to be off-topic, but this is the
best
  place I can think of to ask the (slightly long-winded) question.
 
  Imagine you have a car database (MySQL driven). Different models have
  different optional extras (air-con, central locking, immobiliser etc). I
  need to store the optional extras in a searchable form - i.e. the
customer
  may have a wish-list of electric windows, aircon, and power steering.
  However the optional extras list is not and will not be finalised when
the
  system goes live (probably will never be finalised!). Therefore I cannot
do
  the quick-and-dirty hack of putting all the options as binary fields in
my
  car database, so must come up with a more elegant solution. I've thought
of
  storing e.g. 10 tuples car.option1-aircon code,
car.option2-powersteering
  code. etc. and also going down the header-detail route.
  My current quandry is to which is going to be better for the search
  aspect, considering I'd also like to give them a best fit option.
Would it
  be to create a cursor on my fixed criterion (price, age etc) and then
  iterate through each of those manually in my php script (see - it isn't
  entirely off topic ;0) ) counting the matches for that record in the
  optional-extra detail table? Or would it be to do a select where
  (optionalextra1=mychoice1 or optionalextra2 = mychoice1 ..) and
  (optionalextra2=mychoice2 or optionalextra2 = mychoice2.. ) and 
etc
  etc (yeuch!).
 
   I have a sneaking suspicion that there's a more elegant way than
either
  of these, but can't think of it at the moment.
 
   If you come up with the solution there's a beer in it for you the
next
  time you're in Paphos, Cyprus!
 
  Thanks in advance,
 
  Dave.
 
 
 
 
  --
  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] sending e-mail with variables

2001-06-26 Thread Kristian Duske

 $subject =$row[msub]; //Your webhosting account at
 $hostname.$domain$tld;
 $message .= $row[mline1]; //Dear $fullname,\n;

 $message .= $row[mline2];//Your webhosting account has been
 created. Please use the\n;
 $message .= $row[mline3];//following data to log in:\n;
 Now my problem is it does not fill in the variables when it sends the
 e-mail.The reason I am doing this is the end user of this program
 what's to be able two
 change what the e-mail says. How can I do this so it fills the
 variables in. Or am I going about this totally wrong

If I understand you correctly, you have to eval the code that you get from
the database. That would be:

$subject = eval($row[msub]);

This interpretes the string that is stored in $row[msub] as php code and
assings the result of the interpretation to $subject. Make sure that you
have assigned all variables that you use in $row[msub] before you eval it.

Kristian


-- 
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] Commerical Site that is using PHP

2001-06-26 Thread Mark Lo

Hi,

 Commerical Site that has been launched and using PHP.
 
the website address is www.trade-revenues.com

Mark


-- 
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] Linux Guru's

2001-06-26 Thread ReDucTor



Hey Dudes, little off the PHP Subject, but Linux I 
have "RedHat 7.1" CD Here, and i want to dual boot it with my WinXP i don't want 
to repartition my HDD, i would prefer to have a File on my hdd that has Linux on 
it, my WinXP install is on a FAT32 Partition..
 Now how can i do this? :)
 - 
James "ReDucTor" Mitchell


Re: [PHP] Linux Guru's

2001-06-26 Thread elias

I understand you want to run linux from within an image file stored on a
FAT32 file system?! ;)

Please post in txt format next time.


ReDucTor [EMAIL PROTECTED] wrote in message
003601c0fe36$7fb4ac50$7100a8c0@reductor">news:003601c0fe36$7fb4ac50$7100a8c0@reductor...
Hey Dudes, little off the PHP Subject, but Linux I have RedHat 7.1 CD
Here, and i want to dual boot it with my WinXP i don't want to repartition
my HDD, i would prefer to have a File on my hdd that has Linux on it, my
WinXP install is on a FAT32 Partition..
   Now how can i do this? :)
 - James ReDucTor Mitchell



-- 
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] passing variables from - to frames

2001-06-26 Thread elias

I think it works just fine,

maybe you can try:

framea.document.forma.vala.value = frameb.document.formb.valb.value

if this didn't work then change to:
framea.window.document.forma.vala.value = 

It worked with me time ago...

M [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello, sorry this question here (it is not true PHP question), but I use
 some variables into PHP scripts and need
 pass these variables from one frame to another.

 I want pass variable values between frames, these definded via input
 hidden tags into form definition.
 I have first frame name=framea containing form name=forma
 then second frame name=frameb form name=formb
 I have forma input type=hidden name=vara value=valuea and want to pass
 this value to formb type=hidden name=varb

 I wrote little javascript into framea something like
 frameb.formb.varb.value = framea.forma.vara.value  but only got
 'javascript error'. Java doesnt reckognizes frameb.formb.varb names at
 all. I tried also by creating object id=frameb into frameb header
 but this also didnt work.
 Is there some other solution?

 Please help to solve this one

 Thanks very much

 Miguel



 --
 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] Help with PHP/Oracle and serializing data

2001-06-26 Thread Michael Champagne

Tim,
Thanks for the response.  I'm kind of confused though.  You can use a 'long'
type for a string of characters greater than 4k?

Thanks,
Mike

 If the data will be less than ~4K, use 'varchar2', otherwise use 'long'.

 - Tim
   http://www.phptemplates.org

 - Original Message -
 From: Michael Champagne [EMAIL PROTECTED]
 To: PHP General Mailing List [EMAIL PROTECTED]
 Sent: Monday, June 25, 2001 2:42 PM
 Subject: [PHP] Help with PHP/Oracle and serializing data


  I'm developing a web application and would like to be able to store the
 state
  of the application in an Oracle table by serializing a bunch of variables
 and
  storing them in the database.  Has anyone done this?  What datatype would
 be
  best to use here?  I'm not serializing too much data now, but other
  applications that we do in the future may.  Would this be a place to use a
  CLOB or should I stick with varchar2?  Thanks!




-- 
Michael Champagne, Software Engineer
Capital Institutional Services, Inc.
wk: [EMAIL PROTECTED]
hm: [EMAIL PROTECTED]



**
This communication is for informational purposes only.  It is not
intended as an offer or solicitation for the purchase or sale of 
any financial instrument or as an official confirmation of any 
transaction, unless specifically agreed otherwise.  All market 
prices, data and other information are not warranted as to 
completeness or accuracy and are subject to change without
notice.  Any comments or statements made herein do not 
necessarily reflect the views or opinions of Capital Institutional
Services, Inc.  Capital Institutional Services, Inc. accepts no
liability for any errors or omissions arising as a result of
transmission.  Use of this communication by other than intended
recipients is prohibited.
**

-- 
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] Help with PHP/Oracle and serializing data

2001-06-26 Thread infoz

In Oracle, 'long' is a variable-length character data column up to 2GB in
size.  Roughly equivalent to 'text' in mysql, I think.   You can also use
'blob', 'clob' and/or 'nclob' instead, but I think access to those types is
less straightforward than the 'long' type.

- Tim
  http://www.phptemplates.org

 Thanks for the response.  I'm kind of confused though.  You can use a
'long'
 type for a string of characters greater than 4k?



-- 
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] Creating a PDF document from an HTML Page

2001-06-26 Thread Boaz Yahav

Hi

I'm trying to create a receipt in a PDF format. I have the receipt as HTML.
Is there any class or module in PHP or other language that can read an
HTML file and output a PDF file?

thanks

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-- 
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] irc bot?

2001-06-26 Thread Michael Roark

Does anyone know of the existance of an irc bot written in php or
otherwise, which will talk to a mysql database?


-- 
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 Uptime error

2001-06-26 Thread infoz

It sounds like it might be the permissions on /proc itself.

What does 'ls -ld /proc' say?

- Tim
  http://www.phptemplates.org

- Original Message -
From: Peter Phillips [EMAIL PROTECTED]
Subject: Re: [PHP] PHP Uptime error


 Thanks for your help, this is what I get when I try a uptime while logged
in
 as nobody.

 These are the permissions is /proc:
 -r--r--r--   1 root root0 Jun 26 02:39 loadavg
 -r--r--r--   1 root root0 Jun 26 02:33 uptime



-- 
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] run a fuction at each intervals

2001-06-26 Thread Tom Carter

Did you want these all to appear on the same page? If so then that can't be
done.. the nature of HTTP (the method of delivering pages to the browser)
doesn't allow for this sort of thing.. theres nothing PHP can do about that.

The only alternative I can suggest is for the page to refresh/redirect every
5 minutes...

 Hi..

 If I want to run a function at each intervals, what function I can use ??

 for example

   I try to display   Time is Up   each five-minute.


Time is up   

after five-minute..

   Time is up 

 after five-minute..

Time is up 

...




 --
 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] Oracle Database keeps disconnecting - or something

2001-06-26 Thread Thies C. Arntzen

On Mon, Jun 25, 2001 at 04:17:50PM +0300, Rouvas Stathis wrote:
 Thies C. Arntzen wrote:
  
  On Sun, Jun 24, 2001 at 09:50:05PM +0300, Rouvas Stathis wrote:
   Thies C. Arntzen wrote:
   
On Fri, Jun 22, 2001 at 09:16:08PM +0300, Rouvas Stathis wrote:
 Do you experience any other sort of problems other than those warnings?
 I mean, is anything wrong with the data? Normally, nothing should be
 wrong.

 I have seen the same messages (especially the service handle not
 intitialized one) in my server too.
 I have traced it to attemtps to close an already closed connection, as
 in

 $cone = OciLogon(...);
 ...stuff...
 OciLogout($cone);
 ...stuff...
 OciLogout($cone);
   
believe me - this is not the cause of the message.
  
   any ideas?
  
  what do you mean? i simply _know_ that calling OciLogout will
  not cause the failed to roll.. message - that's all i said.
 
 Agreed. OciLogout is not the cause of the msg.
 What I meant was, what do you think is causing such messages? 

could you (or whoever sees this problem) please do the
following:

in sapi/apache/mod_php4.c comment out the call to
apache_sapi_module.shutdown(apache_sapi_module);
in the php_child_exit_handler() function - recompileinstall

and report if that changes the problem?

tc

-- 
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] Help with PHP/Oracle and serializing data

2001-06-26 Thread Thies C. Arntzen

On Mon, Jun 25, 2001 at 01:42:18PM -0500, Michael Champagne wrote:
 I'm developing a web application and would like to be able to store the state
 of the application in an Oracle table by serializing a bunch of variables and
 storing them in the database.  Has anyone done this?  What datatype would be
 best to use here?  I'm not serializing too much data now, but other
 applications that we do in the future may.  Would this be a place to use a
 CLOB or should I stick with varchar2?  Thanks!

depending on the size - i would use CLOB.

tc

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

2001-06-26 Thread TPG

Hi
Can someone help me out by explaining how I can programatically rename the
key of an associated array? EG Cat01,Cat02 in the example below.
$cats = array(
Cat01 = array(lv1 = 1, lv2 = 1, lv3 = 1, lv4 = 1, lv5 =
1 ),
Cat02 = array(lv1 = 1, lv2 = 1, lv3 = 1, lv4 = 1, lv5 =
1 ),
Cat03 = array(lv1 = 1, lv2 = 1, lv3 = 1, lv4 = 1, lv5 =
1 ),
Cat04 = array(lv1 = 1, lv2 = 1, lv3 = 1, lv4 = 1, lv5 =
1 ),
Cat05 = array(lv1 = 1, lv2 = 1, lv3 = 1, lv4 = 1, lv5 =
1 ),
Cat06 = array(lv1 = 1, lv2 = 1, lv3 = 1, lv4 = 1, lv5 =
1 ),
Cat07 = array(lv1 = 1, lv2 = 1, lv3 = 1, lv4 = 1, lv5 =
1 ),
Cat08 = array(lv1 = 1, lv2 = 1, lv3 = 1, lv4 = 1, lv5 =
1 ),
Cat09 = array(lv1 = 1, lv2 = 1, lv3 = 1, lv4 = 1, lv5 =
1 ),
Cat10 = array(lv1 = 1, lv2 = 1, lv3 = 1, lv4 = 1, lv5 =
1 ));

How do I reference the name of each category i.e Cat01, Cat02 so that I can
programatically change the name (I need them to be user defineable).  This
is part of a security level options setup screen by the way, that is the
lv1-5 are user levels - boolean so that we can allow disallow access to
approriate option/categories. I enclose the script I am trying to build if
you have time to check it out.

Thanks in advance
Regards
Tony Ayling
Harmony so



-- 
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] Oracle and PHP

2001-06-26 Thread Dunaway, Brian

I'm a newbie in PHP, what should I do to connect to Oracle Database.
Do I have to install a library to do that?
Please anyone, help.

http://www.phpbuilder.com/manual/ref.oracle.php

I usually do something similiar to this.

(psuedo code follows):

// Define Oracle_Home and Oracle_Sid
putenv(ORACLE_HOME=/opt/ORACLE/product);
putenv(ORACLE_SID=MYDATA);


// Connect To Oracle Server/Else Return Error(s) 
if($connection = ora_logon(my-login,my-pass))
{ 
// Open Cursor
$cursor = ora_open($connection);

$query  = SELECT * FROM table ;
$query .= ORDER BY date1;

// Parse Cursor
ora_parse($cursor, $query);

if ( ora_exec($cursor) )
{
$data = array();
$field = array();
while(ora_fetch_into($cursor, $field)) 
{
reset ($field);
$data[ $field[0] ]  = $field[1];
}
}
else 
{
print(** While Attempting To Open Cursor On Query
** brbr\n\n);
print(Oracle Returned The Following Error:
br\n);
print(ora_error($cursor));
print(brbr\n\n);
print(Oracle Error Code: );
print(ora_errorcode($cursor));
}

// Close Cursor
Ora_Close($cursor);

} 
else 
{
print(** While Attempting To Open Connection ** brbr\n\n);
print(Oracle Returned The Following Error: br\n);
print(ora_error($connection));
print(brbr\n\n);
print(Oracle Error Code: );
print(ora_errorcode($connection));
}

// Disconnect
Ora_Logoff($connection);

-- 
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] FW: Setup Question

2001-06-26 Thread Patrick Smith












This may have just slipped through the cracks, anyone point
me in the right direction or anything?



Im installing PHP 4.0.5, I have Apache 1.3.20
installed currently and Im also using a built in module of mod_perl
1.25. Heres my apache mod
list

[grumster]:12:38pm:/usr/local/apache/bin:(raq)-
./httpd -l

Compiled-in modules:

 http_core.c

 mod_env.c


mod_log_config.c

 mod_mime.c


mod_negotiation.c

 mod_status.c

 mod_include.c

 mod_autoindex.c

 mod_dir.c

 mod_cgi.c

 mod_asis.c

 mod_imap.c

 mod_actions.c

 mod_userdir.c

 mod_alias.c

 mod_access.c

 mod_auth.c

 mod_so.c

 mod_setenvif.c

 mod_perl.c

suexec: disabled; invalid wrapper
/usr/local/apache/bin/suexec

Ive added LoadModule php4_module
libexec/libphp4.so to my httpd.conf file after doing the DSO compile for
PHP.

Whenever I try to load a webpage with PHP, Im getting
errors like Document Contains no Data.

When I do a gdb I get the following..:



bash-2.04# gdb /usr/local/apache/bin/httpd

(gdb) run -X

Starting program: /usr/local/apache/bin/httpd -X

warning: Unable to find dynamic linker breakpoint function.

GDB will be unable to debug shared library initializers

and track explicitly loaded dynamic code.



Program received signal SIGSEGV, Segmentation fault.

0x401fa9d0 in ?? ()

(gdb) bt

#0 0x401fa9d0 in
?? ()

#1 0x401fab24 in
?? ()

#2 0x8098103 in
ap_invoke_handler ()

#3 0x80abac9 in
process_request_internal ()

#4 0x80abb28 in
ap_process_request ()

#5 0x80a31e5 in
child_main ()

#6 0x80a3378 in
make_child ()

#7 0x80a34d3 in
startup_children ()

#8 0x80a3b08 in
standalone_main ()

#9 0x80a4287 in
main ()

#10 0x400cf577 in __libc_start_main () from /lib/libc.so.6

(gdb)





ANY HELP would be appreciated, I wasnt able to find
anything in the archives.



--



Regards,



Patrick Smith








Re: [PHP] Authentication

2001-06-26 Thread Tom Carter

To be more accurate, its IIS on Windows that causes problems.. one of our
test boxes runs windows + apache and doesn't experience this problem

 Tnx,

 I've been trying out some stuff last night and found out some interesting
 facts!
 the ISAPI dll is full of access violations. Being a Delphi programmer, I
 know that ain't good.
 Stable is indeed the word. Sometimes IIS could find a page, most of the
time
 not.

 And I got the header to show :) However the authentication part (in my
 script) was never triggered,
 due to the fact that IIS couldn't find the page anymore, if the ISAPI dll
 was used. Though luck!

 So, people, when using PHP authentication, please use a Linux box!!! The
 windows version doesn't really work (at all).

 Brave Cobra

  - Original Message -
  From: Phil Driscoll [EMAIL PROTECTED]
  To: Brave Cobra [EMAIL PROTECTED]; Php-General
  [EMAIL PROTECTED]
  Sent: Tuesday, June 26, 2001 9:52 AM
  Subject: Re: [PHP] Authentication
 
 
   If you run PHP as a CGI, or as an ISAPI module *without* installing
the
  ISAPI
   filter, then IIS will have already dealt with everything to do with
  headers
   before PHP gets a look in. Installing PHP in the ISAPI filters list
 allows
  it
   to get at the headers and do authentication, however you may have
 serious
   problems with the stability of the ISAPI module version of PHP.
  
   Cheers
   --
   Phil Driscoll
  
  
 


 --
 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] About Integration PHP- VPOS

2001-06-26 Thread Ing. Marco Antonio Lopez Melendez

Hi, actually I'm developing a electronic store and I'm integrating VPos to
the store application. I'm Using CURL in order to comunicate to Vpos. Is it
the only way or there are another one?
The Vpos aplication resides on other server and I have to comunicate with it
via SSL.
Thanx.
==
Ing. Marco Antonio Lopez Melendez
Jefe del Departamento de Estructuracion de Sistemas
DCAA.DGSCA.UNAM.
Tel. 56-22-36-61
Fax. 56-22-36-78
==


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

2001-06-26 Thread Phil Driscoll

On Tuesday 26 June 2001 11:24, Brave Cobra wrote:
 So, people, when using PHP authentication, please use a Linux box!!! The
 windows version doesn't really work (at all).

...or the Apache module on NT.

Cheers
--
Phil Driscoll

-- 
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] passing variables from - to frames

2001-06-26 Thread Greg Donald

 Hello, sorry this question here (it is not true PHP question), but I use
 some variables into PHP scripts and need
 pass these variables from one frame to another.

 I want pass variable values between frames, these definded via input
 hidden tags into form definition.
 I have first frame name=framea containing form name=forma
 then second frame name=frameb form name=formb
 I have forma input type=hidden name=vara value=valuea and want to pass
 this value to formb type=hidden name=varb

 I wrote little javascript into framea something like
 frameb.formb.varb.value = framea.forma.vara.value  but only got
 'javascript error'. Java doesnt reckognizes frameb.formb.varb names at
 all. I tried also by creating object id=frameb into frameb header
 but this also didnt work.
 Is there some other solution?


If you're using Apache, you can use $QUERY_STRING



destiney - (des-ti-ny) - n. 1. deity of all things html, 2. common
internet addict, 3. lover of late 80's heavy metal music, 4. Activist
for the terminally un-elite; see also - cool guy, des, mr. php...

It's 4:00am, your web site is still up, why are you?
http://phplinks.org/ http://destiney.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]




[PHP] Operation must use an updateable query?? help.!

2001-06-26 Thread Thiva Charanasri



Dear All 
PHP Gurus.

 I have problem with UPDATE query , I am 
using PHP on win2k connect to an ODBC connection,

I got 
error like this when update the DB.



Warning: SQL error: 
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable 
query., SQL state S1000 in SQLExecDirect



My SQL 
string is as below

$tmp_sbj=odbc_result($res2,"ART_SBJ");$tmp_id=odbc_result($res2,"ART_ID1");$sqlup="update 
article set ART_SBJ='$tmp_sbj' WHERE ( 
ART_ID1='$tmp_id') ";$res3=odbc_exec($fn,$sqlup);

thanks for 
any help!... 

Sincerely,
-TC-




Re: [PHP] [OT-ish] Optional Extras.

2001-06-26 Thread Dave Mariner


- Original Message -
From: David Robley [EMAIL PROTECTED]
To: Dave Mariner [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, June 26, 2001 4:32 AM
Subject: Re: [PHP] [OT-ish] Optional Extras.


SNIP
 Why not have a table that contains carid and optionlink, where carid is
 the identifier for a unique entry of car model and optionlink is ditto
 for a particular option. So you have something like

 Table car
 carid (autoincrement unique key)
 carname
 ..

 Table options
 optid (autoincrement unique key)
 optdescription

 Table optlink
 carid
 optid

 Then you can do a select like

 select car.carid, options.description  from car, options, optlink
 where car.carid = $whatever and car.carid = optlink.carid and
 (optlink.optid = x or optlink.optid = y ...)

 where you build the latter part from the list of options selected - maybe
 from a dropdown list that you can dynamically build from table options.

Yeah, this was the header-detail route that I was considering - the problem
is that the select above will come back with any car that has any of the
options specified. So if, for example, the options are Manual,Electric
Windows, and for the sake of argument all automatic cars have e/w, the
query will return all cars. I know that's kind of artificial, but you get
what I'm driving at (if you'll excuse the pun).

=
[EMAIL PROTECTED]
www.medlab-group.com
you didn't see what it was, you saw what you wanted to see.




 --
 David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
 CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA

This is a sick bird, said Tom illegally.

 --
 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] [OT-ish] Optional Extras.

2001-06-26 Thread scott [gts]

i disagree with the first point.  adding extra options
(like an MP3 player) will not break the table if you
code the system with knowledge of how the underlying
database is set-up.  

a friend of mine setup a catalog system this way.
the catalogs would usually have ~5-10 custom options, 
so his solution was fast and simple and efficient.

i agree with the second point, that having
hundreds or thousands of options would definately
degrade performance.


 -Original Message-
 From: Dave Mariner [mailto:[EMAIL PROTECTED]]
 Subject: Re: [PHP] [OT-ish] Optional Extras.
 
 
 The problem with doing it this way is that it is not extensible.
 A manufacturer cannot add, say, MP3 players to the list at a later date
 without breaking the car table. Also, in time, there could be quite an
 extensive list of features - which would lead to an inefficient storage
 system.
 
 Dave
 - Original Message -
 From: ..s.c.o.t.t.. [EMAIL PROTECTED]
 Subject: RE: [PHP] [OT-ish] Optional Extras.
 
 
  off the top of my head, you could try using a
  lookup table to define the extra options...
 
  ford_spec table:
  id desc
  --- ---
  1 air conditioning
  2 whatever
 
  ford_cars table:
  car extra1 extra2
  -- --- -
  'contour' 1 0
  'probe' 0 1
 
  contour would have aircond but no whatever
  probe would have no aircond but would have whatever
 
  so to add more options specific to a manufacturer,
  you could make an entry into ford_spec and then
  create an extra3 field in ford_cars... this system,
  at least, would enable you to have as many extras
  as you wanted for each manufacturer, and have
  different options available for different manufacturers.
 
  i dont know how efficient this would be, and there are
  probably a bunch of better ways to do it, but i've seen
  this method used before by someone who developed
  a batteries catalog and needed to store different
  manufacturers with different options for their batteries.


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




AW: [PHP] Help with PHP/Oracle and serializing data

2001-06-26 Thread Sebastian Stadtlich

NO NO NO NO NO NO NO NO
NEVER use long

varchar2 for  4k
or clob for longer

does long still exist in oracle9 
i thought it is supposed to be left out
( as soon as possible )

to your question at first :
why don't you try to overwrite the php session handling funktions?
serialisation is done by them and you need just to save in db
look here : http://www.phpbuilder.net/columns/ying2602.php3
i always wanted to do that, but newer did...
if you make it code snipplets are welcome
:-]

sebastian


 -Ursprüngliche Nachricht-
 Von: infoz [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 26. Juni 2001 12:42
 An: Michael Champagne; PHP General Mailing List
 Betreff: Re: [PHP] Help with PHP/Oracle and serializing data
 
 
 
 If the data will be less than ~4K, use 'varchar2', otherwise 
 use 'long'.
 
 - Tim
   http://www.phptemplates.org
 
 - Original Message -
 From: Michael Champagne [EMAIL PROTECTED]
 To: PHP General Mailing List [EMAIL PROTECTED]
 Sent: Monday, June 25, 2001 2:42 PM
 Subject: [PHP] Help with PHP/Oracle and serializing data
 
 
  I'm developing a web application and would like to be able 
 to store the
 state
  of the application in an Oracle table by serializing a 
 bunch of variables
 and
  storing them in the database.  Has anyone done this?  What 
 datatype would
 be
  best to use here?  I'm not serializing too much data now, but other
  applications that we do in the future may.  Would this be a 
 place to use a
  CLOB or should I stick with varchar2?  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 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] semi-OT: windows/linux, IIS/apache

2001-06-26 Thread scott [gts]

 So, people, when using PHP authentication, please use a Linux box!!! The
 windows version doesn't really work (at all).
 
 Brave Cobra

there are lots of reasons for switching to linux, but it's
not necessary to get authentication working properly,
just use a better server.

apache is one that comes to mind as being very stable,
very easy, and very free (and they've got versions for both
win32 and linux platforms).

http://apache.org/





-- 
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] looking for a class that handles cookies and sessions

2001-06-26 Thread PeterOblivion

I need a class that can quickly help me set cookies and sessions, and check 
up against them

anyone have an idea where i can get one like this?

- Peter

-- 
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] search for a better php source code viewer

2001-06-26 Thread Miles Thompson

Windows or Linux? These are editors, not viewers, though.

If Windows - UltraEdit; there are predefined files whihc are used to 
colourize PHP  HTML markup. You can add to then and extend them. Possible 
HTMLKit as well.

If Linux - Bluefish, I guess, although you'll hear from VIM and Emacs 
people as well.

I take it that simply renaming the file with a .phps extension and viewing 
it through your browser isn't enough.

Cheers - Miles Thompson

At 11:35 AM 6/26/01 +0200, =?us-ascii?Q?Jorg_Krause?= wrote:
Hi,

I'think anybody knows highlight_file, highlight_string
or show_source, but these are not good enough.

For an application I need a more advanced technique,
which includes line numbers and let me control all
formatting instructions (not only font color...).

Is there any script out, written in PHP (and supports PHP
and HTML), that can be expanded by highlighting my own
functions/classes, my own XML-Tags etc.?

Thanx for any idea,

Joerg


--
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 newsgroups still down?

2001-06-26 Thread Michael Simcich

Odd, I still can't get to it. I'm trying to use news.php.net, is there
anything amiss with that server address? I'm using Gravity; and it
doesn't want a news:// prefix in the address.

Michael Simcich
AccessTools 

-Original Message-
From: elias [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 26, 2001 9:47 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP newsgroups still down?


Hey! I'm using the newsserver! and it's cool!

Michael Simcich [EMAIL PROTECTED] wrote in message
01c0fddd$8f329330$6401a8c0@gemini">news:01c0fddd$8f329330$6401a8c0@gemini...
 I hadn't checked the php news servers since the mailing list went back

 online. At least to me, at this moment, the news servers seem to be 
 missing in action. Anyone know what the scoop is on this?

 Michael Simcich
 AccessTools


 --
 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] Help with PHP/Oracle and serializing data

2001-06-26 Thread Thies C. Arntzen

On Tue, Jun 26, 2001 at 06:42:00AM -0400, infoz wrote:
 
 If the data will be less than ~4K, use 'varchar2', otherwise use 'long'.

do not use long as long are not fully supported in oracle
(and never were).

tc

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

2001-06-26 Thread Jon Yaggie



is there a function to get the mime of a given 
file? if so what?




Thank You,Jon Yaggiewww.design-monster.comAnd 
they were singing . . . '100 little bugs in the code100 bugs 
in the codefix one bug, compile it again101 little bugs in the 
code101 little bugs in the code . . .'And it 
continued until they reached 0




[PHP] Solid 3.51 and PHP4.0.6

2001-06-26 Thread Yannick Chapard








Hello,



Im trying to build
PHP4.0.6 with solid 3.51 under RedHat 6.0 and i get:



/bin/sh ../libtool --silent --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I../main -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2 -c zend_ini.c

/bin/sh ../libtool --silent --mode=link
gcc -g -O2 -o libZend.la -L/usr/local/solid/Linux_glibc2/lib -ll2x
-lpam -lifsql -lifasf -lifgen -lifos
-lifgls -lc -ldl -lcrypt -lphpifx -lifglx -ldl -lcrypt -lresolv -lm -ldl -lnsl -lresolv zend_language_parser.lo zend_ini_parser.lo
zend_alloc.lo zend_compile.lo zend_constants.lo zend_dynamic_array.lo
zend_execute.lo zend_execute_API.lo zend_highlight.lo zend_llist.lo zend_opcode.lo
zend_operators.lo zend_ptr_stack.lo zend_stack.lo zend_variables.lo zend.lo
zend_API.lo zend_extensions.lo zend_hash.lo zend_list.lo zend_indent.lo
zend_builtin_functions.lo zend_sprintf.lo zend_ini.lo libZend_c.la 

make[1]: Leaving directory `/opt/php-4.0.6/Zend'

Making all in main

make[1]: Entering directory `/opt/php-4.0.6/main'

make[2]: Entering directory `/opt/php-4.0.6/main'

gcc -I. -I/opt/php-4.0.6/main -I/opt/php-4.0.6/main
-I/opt/php-4.0.6 -I/opt/apache_1.3.20/src/include -I/opt/apache_1.3.20/src/os/unix
-I/opt/php-4.0.6/Zend -I/opt/informix/incl/esql -I/usr/local/solid/Linux_glibc2/include
-I/opt/php-4.0.6/ext/xml/expat/xmltok -I/opt/php-4.0.6/ext/xml/expat/xmlparse -I/opt/php-4.0.6/TSRM -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2 -c main.c  touch main.lo

gcc -I. -I/opt/php-4.0.6/main -I/opt/php-4.0.6/main
-I/opt/php-4.0.6 -I/opt/apache_1.3.20/src/include -I/opt/apache_1.3.20/src/os/unix
-I/opt/php-4.0.6/Zend -I/opt/informix/incl/esql -I/usr/local/solid/Linux_glibc2/include
-I/opt/php-4.0.6/ext/xml/expat/xmltok -I/opt/php-4.0.6/ext/xml/expat/xmlparse -I/opt/php-4.0.6/TSRM -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2 -c internal_functions.c  touch
internal_functions.lo

In file included from
internal_functions.c:33:

/opt/php-4.0.6/ext/odbc/php_odbc.h:179:
WINDOWS.H: No such file or directory

make[2]: *** [internal_functions.lo]
Error 1

make[2]: Leaving directory `/opt/php-4.0.6/main'

make[1]: *** [all-recursive] Error
1

make[1]: Leaving directory `/opt/php-4.0.6/main'

make: *** [all-recursive] Error
1



Here are my differents folder
for solid : 



[root@www3dev /tmp]# ll /usr/local/solid/Linux_glibc2/lib/

total 1404

lrwxrwxrwx 1 root root
11 Jun 26 19:49 libl2x.so - socl2x35.so

lrwxrwxrwx 1 root root
11 Jun 26 19:51 libsocl2x35.so - socl2x35.so

-rwxr--r-- 1 root root 786492 Jun
26 17:02 scwl2x35.so

-rwxr--r-- 1 root root 637257 Jun
26 17:02 socl2x35.so



[root@www3dev /tmp]# ll /usr/local/solid/Linux_glibc2/include/

total 152

-rw-r--r-- 1 root root 30332
Jun 26 19:33 sql.h

-rw-r--r-- 1 root root 80291
Jun 26 19:33 sqlext.h

-rw-r--r-- 1 root root
7754 Jun 26 19:33 sqltypes.h

-rw-r--r-- 1 root root 22851
Jun 26 19:33 sqlucode.h

-rw-r--r-- 1 root root
1383 Jun 26 19:33 sqlunix.h



Linux www3dev 2.2.17-14smp #1
SMP Mon Feb 5 18:40:03 EST 2001 i686 unknown





Can someone help me please



Thanks



Yannick








RE: [PHP] search for a better php source code viewer

2001-06-26 Thread Jorg Krause

 -Original Message-
 From: Miles Thompson [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 26, 2001 7:42 PM
 To: [EMAIL PROTECTED]; php
 Subject: Re: [PHP] search for a better php source code viewer 
 
 
 Windows or Linux? These are editors, not viewers, though.
 
 If Windows - UltraEdit; there are predefined files whihc are used to 
 colourize PHP  HTML markup. You can add to then and extend them. 
 Possible 
 HTMLKit as well.
 
Thanx for the answers...
[...]
No, I'll view source code in a PHP application, not 
edit it in an editor. So it should work like highlight_string() and
shows the source colorized, but with more features. What I
really searching for is a class which is easy expandable.
I want to show users the code of scripts I've written, but
some functions and classes should be highlighted and shown as
links, others don't. 
Sorry, if my previous post was misleading.

Joerg

-- 
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] back from a search form

2001-06-26 Thread Marcos



hi to @ll,
 after a make a search throw a form it returns me some results 
(links). if i click to a link and i try to get back to the previous results 
Internet Explorer shows me a blank page advicing that i should refresh the page 
in order to get the results. how can i prevent this blank page. 
 
 search.php --- click into --- 
news.php?id=1 and if i make javascript:window.history.back(-1) 
it shows me the blank page.

any ideas will be helpful,

thanks in advance,

marcos



[PHP] RE: Events Listings

2001-06-26 Thread Rick Proctor

Hi Everyone,

I want to thank the response I've gotten for this posts but unfortunately
non of them have helped significantly. I don't know PHP that well so ideas
you give me I can't implement.

If someone could either
A.) Do it for me :-)
B.) Show some examples that directly relate to me

It would be more than greatly appreciated.

I can usely figure things out, but I guess I'm just slow to this.

Rick

-Original Message-
From: Rick Proctor [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 23, 2001 9:15 PM
To: [EMAIL PROTECTED]
Subject: Events Listings


Hello,

I have a script that does TV/Tour listings for artist, I need it to sort the
list automatically so that it goes in date order but I have absolutely no
idea. I have put together the script with little to no PHP skills so it look
pretty horrific.

If you could help me out with figuring out how to fix it, it would be muchly
appreciated.

The code is below

Rick

?php
if ($max_days == ){
$max_days = 365;
}
$current_day = date( z);
echo table border=\0\ cellspacing=\1\ cellpadding=\1\
bgcolor=\#00\\n;
echo tr bgcolor=\#E5E5E5\td colspan=\6\ align=\right\balanis
guide/b/td/tr\n;
echo tr bgcolor=\#E5E5E5\\n;
echo td align=\center\font face=\Arial\ size=\1\
bgcolor=\#E5E5E5\date/FONT/td\n;
echo td align=\center\font face=\Arial\ size=\1\
bgcolor=\#E5E5E5\time/FONT/td\n;
echo td align=\center\font face=\Arial\ size=\1\
bgcolor=\#E5E5E5\where/FONT/td\n;
echo td align=\center\font face=\Arial\ size=\1\
bgcolor=\#E5E5E5\what/FONT/td\n;
echo td align=\center\font face=\Arial\ size=\1\
bgcolor=\#E5E5E5\days till/FONT/td\n;
echo /tr\n;

//Create Function
function create($listing, $max_days){
list ($month, $day, $year, $time,$channel,$show) = split('/', $listing);
$year = 20$year;
if ($channel == VH1){
$url = http://www.vh1.com;;
}
if ($channel == MTV){
$url = http://www.mtv.com;;
}
if ($channel == COM){
$url = http://www.comedycentral.com;;
}
if ($channel == HBO){
$url = http://www.hbo.com;;
}
if ($channel == HBOZ){
$url = http://www.hbo.com;;
}
if ($channel == HBOS){
$url = http://www.hbo.com;;
}
if ($channel == TRIO){
$url = http://www.triotv.com;;
}
$current_day = date( z);
$show_day = date( z, mktime( 0, 0, 0, $month, $day, $year ) );
$time_till_event = $show_day - $current_day;

if ($time_till_event  $max_days){

if ($time_till_event == '0'){
$time_till_event = Today;
}
if ($time_till_event == '1'){
$time_till_event = Tomorrow;
}
if ($time_till_event  0){
return;
}
if ($url != ''){
$start = a href=\$url\;
$end = /a;
}
if ($confirmed == 'yes'){
$image = images/yes.gif;
}
if ($confirmed == 'no'){
$image = images/no.gif;
}

echo tr bgcolor=\#E5E5E5\\n;
echo tdfont face=\Arial\
size=\1\$start$month.$day.$year$end/FONT/td\n;
echo tdfont face=\Arial\ size=\1\$start$time$end/FONT/td\n;
echo tdfont face=\Arial\ size=\1\$start$channel$end/FONT/td\n;
echo tdfont face=\Arial\ size=\1\$start$show$end/FONT/td\n;
echo td align=\center\font face=\Arial\
size=\1\$start$time_till_event$end/FONT/td\n;
echo /tr\n;
}
else{
return;
}
}
//Dates

$listing = 06/24/01/04:00 pm/VH1/Saturday Night Live 25: The Music;
create($listing, $max_days);
$listing = 06/24/01/05:00 pm/VH1/Before They Were Rock Stars;
create($listing, $max_days);
$listing = 06/24/01/11:00 pm/HBOZ/Reverb;
create($listing, $max_days);
$listing = 06/28/01/01:00 am/HBOZ/Reverb;
create($listing, $max_days);
$listing = 06/28/01/11:00 am/VH1/VH1: All Access;
create($listing, $max_days);
$listing = 06/28/01/10:00 pm/VH1/VH1: All Access;
create($listing, $max_days);
$listing = 06/28/01/11:30 pm/VH1/VH1: All Access;
create($listing, $max_days);
$listing = 06/29/01/09:30 pm/HBOS/Sex And The City;
create($listing, $max_days);
$listing = 06/30/01/07:00 pm/VH1/VH1: All Access;
create($listing, $max_days);
$listing = 07/01/01/01:00 am/TRIO/Paris Concert for Amnesty International;
create($listing, $max_days);
$listing = 07/09/01/09:00 am/TRIO/Alanis Morissette  Stevie Nicks;
create($listing, $max_days);
$listing = 07/09/01/03:00 pm/TRIO/Alanis Morissette  Stevie Nicks;
create($listing, $max_days);
$listing = 07/13/01/12:00 pm/MTV/MTV and Rolling Stone's 100 Greatest Pop
Songs ;
create($listing, $max_days);
$listing = 07/13/01/08:00 pm/MTV/MTV and Rolling Stone's 100 Greatest Pop
Songs ;
create($listing, $max_days);
$listing = 07/27/01/09:00 am/TRIO/Alanis Morissette  Stevie Nicks;
create($listing, $max_days);
$listing = 07/27/01/03:00 pm/TRIO/Alanis Morissette  Stevie Nicks;
create($listing, $max_days);
$listing = 07/01/01//Ottawa, ON/Canada Day;
create($listing, $max_days);
$listing = 07/03/01//Kristiansand, NOR/Quart Festival ;
create($listing, $max_days);
$listing = 07/05/01//Stockholm, SWE/Annex ;
create($listing, $max_days);
$listing = 07/06/01//Sundsvall, SWE/City Festival ;
create($listing, $max_days);
$listing = 07/07/01//Odense, DEN/Midtfyns Festival ;
create($listing, $max_days);
$listing = 07/09/01//Hamburg, GER/Stadtpark ;
create($listing, $max_days);
$listing = 07/11/01//Montreux, SWI/Montreux Jazz 

Re: [PHP] [OT-ish] Optional Extras.

2001-06-26 Thread Dave Mariner


- Original Message -
From: Rich Cavanaugh [EMAIL PROTECTED]
To: Dave Mariner [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, June 26, 2001 1:53 AM
Subject: RE: [PHP] [OT-ish] Optional Extras.


 Dave,
 I did something similar and I came up with an interesting way of
 approaching it:

 Assign IDs to each car (obviously).
 Assign an ID to each option.
 Match up your car IDs and option IDs in a seperate table.

 Here's some table defs:

 create table cars (
 carid int auto_increment,
 name varchar(255)
 );

 create table options (
 optid int auto_increment,
 name varchar(255)
 );

 create table caroptions (
 carid int,
 optid int
 );

 (if my sql is off, don't flame me, you at least get the idea)

 Here's the search:

 $words should be a comma delimited list if the options the user chose.

 select count(o.carid) as cnt, o.carid as id, c.name from caroptions as o,
 cars as c where and o.optid in ({$words}) and o.carid = c.carid group by
 o.carid, c.name order by cnt DESC

 This would give you a list of cars ordered by the best match to worst
match.

Bingo!! Looks about right. What I was missing was the IN and a cdl of the
options. If it works (as it looks like it should), pop into Paphos  I'll
buy you that pint!!


Cheers,

Dave




-- 
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] Auction PHP Solution?

2001-06-26 Thread Michael O'Neal

Hi,

Has anybody seen an ebay-like auction solution done in PHP?

Thanks,

mto


-- 

Michael O'Neal
Web Producer/ Autocrosser
ST 28 '89 Civic Si
-
 M   A   N   G   O
B  O  U  L  D  E  R
-
http://www.thinkmango.com
e- [EMAIL PROTECTED]
p- 303.442.1821
f- 303.938.8507


-- 
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 newsgroups still down?

2001-06-26 Thread CC Zona

In article 000701c0fe63$51accb30$6401a8c0@gemini,
 [EMAIL PROTECTED] (Michael Simcich) wrote:

 Odd, I still can't get to it. I'm trying to use news.php.net, is there
 anything amiss with that server address? I'm using Gravity; and it
 doesn't want a news:// prefix in the address.

I've had problems intermittent problems getting access to the news server 
yesterday and today.  Keep trying with whatever settings were working for 
you previously.

-- 
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] Enter to BR

2001-06-26 Thread scott [gts]

or you could use preg_replace

preg_replace(/\n/, BR\n, $var);


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 26, 2001 2:56 AM
 To: Joeri Vankelst
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] Enter to BR
 
 
  How can I get an Enter typed in a HTML textfield to be inerpreted as a BR
  or
  a P tag?
  Someone sugested I use the split() function, but I wouldn't know how...
 
 nl2br
 
 http://at.php.net/manual/de/function.nl2br.php
 
 michi
 
 -- 
 Sent through GMX FreeMail - http://www.gmx.net
 
 -- 
 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] Linux Guru's

2001-06-26 Thread scott [gts]



search 
for: linux4win

that's 
probably what you're looking for... 
you 
can install on an existing windows partition
and 
have it look like a giant file.


  -Original Message-From: ReDucTor 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, June 26, 2001 7:52 
  AMTo: [EMAIL PROTECTED]Subject: [PHP] Linux 
  Guru's
  Hey Dudes, little off the PHP Subject, but Linux 
  I have "RedHat 7.1" CD Here, and i want to dual boot it with my WinXP i don't 
  want to repartition my HDD, i would prefer to have a File on my hdd that has 
  Linux on it, my WinXP install is on a FAT32 Partition..
   Now how can i do this? 
  :)
   
  - James "ReDucTor" Mitchell


RE: [PHP] Oracle Database keeps disconnecting - or something

2001-06-26 Thread Taylor, Stewart

Thies,

Thanks for your reply.

So far I've been unable to further investigate my problem and send to you a
toy script to demonstrate it.  For since Monday both applications have been
working fine. Yipee!
They began working again after the server was rebooted - which the
Administrator claimed he had already done one evening, but he had actually
just restarted apache, this I had to point out to him in the log files.  

However, when the new application was rolled out, initially it worked for a
couple of days before the errors showed their ugly faces, so I my not have
seen the last of them yet.  And obviously I'd like to find out exactly what
caused the errors in the first place - it was a little embarrassing
releasing a new high profile company wide application that I had nutured
since it's birth, only for it to stab me in the back after a couple of days
in use.

However I have noticed in the test servers log the message
PHP Warning:  failed to rollback outstanding transactions!: also but without
noticeably causing any ill effects (unlike for the live apps which caused
people to loose their session information and be logged out etc). I've asked
my Administrator to apply the your suggested fix below to the test server to
see what happens and I'll let you know the results after he gets round to
doing it.


Best regards,


-Stewart

-Original Message-
From: Thies C. Arntzen [mailto:[EMAIL PROTECTED]]
Sent: 22 June 2001 19:11
To: Taylor, Stewart; Zeev Suraski
Cc: [EMAIL PROTECTED]; '[EMAIL PROTECTED]'
Subject: Re: [PHP] Oracle Database keeps disconnecting - or something


On Fri, Jun 22, 2001 at 02:23:14PM +0100, Taylor, Stewart wrote:
 Hello,
  
 Just in case anyones got any ideas.
  
 I've been testing an application for a few weeks on a test server without
 any problems.
 After releasing it onto the live server, which is - according to the
 administrator - setup exactly the same as the test server I've been
running
 into problems.
  
 Apparently the database seems to be disconnecting randomly see log file
 extract below.
  
 I already had a application on the live server which has been working
 perfectly for a year or so.  Now the new application is live it is having
 the same problem as well.
  
 The test version of the already live application is also on the same test
 server and both databases on live and test are setup exactly the same way.
  
  
 My administrator tells me that we have a license for unlimited connections
 to the database etc..
  
 My setup us
 OCI8 Revision 1.96
 Oracle Version 8.1
 Apache Apache/1.3.11
 Redhat Linux 6.2
 php 4.0.2
 I'm also using phplib 7.2c to manage authentication/sessions and database
 access.

i've found somebody in hamburg (which is where i live) who
could show me the problem. his setup is rather complex - so
if you could send me a _short_ testcase (_without_ phplib)
that reproduces you problem i would be very happy to work on
it!

are you using oracle-MTS by any chance?


BTW: could you please comment out the call to
php_config_ini_shutdown() in main/main.c and see if it makes
any difference for you?

(zeev: the call to php_config_ini_shutdown is too early, if a
module calls php_error in the MSHUTDOWN
core_globals-error_log is already freed - i think we need to
fix this!)

regards,
tc

-- 
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] problems with round ..

2001-06-26 Thread Chad Day

I'm trying a simple round in php4 and having problems .. rounding to 2
decimal places..

$BLAH = round($BLAH, 2);

Spits out a wrong parameter error.  I've tried quotes around the variable,
the parameter, and any combinations, but it still pukes on me.  Why can't I
specify a precision?

Thanks,
Chad


-- 
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] sending e-mail with variables

2001-06-26 Thread Richard Kurth

I have a function that is for sending an e-mail to the customer
the messages is stored in a mysql table. Then when the function is
called it pulls the data into the mail program. My problem is this
in the data that is stored in the table the data looks like this
Your webhosting account at $hostname.$domain$tld;
I pull the data into the function like this

$subject =$row[msub]; //Your webhosting account at $hostname.$domain$tld;
$message .= $row[mline1]; //Dear $fullname,\n;

$message .= $row[mline2];//Your webhosting account has been created.
Please use the\n;
$message .= $row[mline3];//following data to log in:\n;
Now my problem is it does not fill in the variables when it sends the
e-mail.The reason I am doing this is the end user of this program
what's to be able two
change what the e-mail says. How can I do this so it fills the
variables in. Or am I going about this totally wrong. And I what to
send it as a text based e-mail












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] Help with PHP/Oracle and serializing data

2001-06-26 Thread infoz

I used them all over on a large PHP3 (and later PHP4) site for several years
until we migrated to PostgreSQL in January, with no problems.

What's the correct alternative...CLOB's?

- Tim
  http://www.phptemplates.org

- Original Message -
From: Thies C. Arntzen [EMAIL PROTECTED]
  If the data will be less than ~4K, use 'varchar2', otherwise use 'long'.

 do not use long as long are not fully supported in oracle
 (and never were).

 tc


-- 
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] Creating a PDF document from an HTML Page

2001-06-26 Thread Robert L. Yelvington

give 'htmldoc' a try.

http://www.easysw.com/htmldoc/

~rob

on 6/26/01 7:25 AM, Boaz Yahav at [EMAIL PROTECTED] wrote:

 Hi
 
 I'm trying to create a receipt in a PDF format. I have the receipt as HTML.
 Is there any class or module in PHP or other language that can read an
 HTML file and output a PDF file?
 
 thanks
 
 Sincerely
 
 berber
 
 Visit http://www.weberdev.com/ Today!!!
 To see where PHP might take you tomorrow.
 


-- 
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] Latest documentation in PDF format?

2001-06-26 Thread Kent Sandvik

Hi, I saw  that the PHP documents in PDF format are temporary unavailable
at:
http://www.php.net/docs.php

Now, I do have a working Acrobat 4.0 version back home, any interest if I
built the HTML versions to PDF format, or is there something else I don't
know about, i.e. an automated backend for building the PDF documents from an
original source? --Kent


-- 
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 4.0.6 and APXS2

2001-06-26 Thread Gonyou, Austin

After getting apache 2 + 4.0.6 built and installed, I can finally use PHP
and all is well..except...
When accessing a script which uses an exec() statment like the following:

snip-
exec(ls -d */*.jpg,$ls);
snip-

When the LS is performed, it is not performed in the directory where the PHP
resides, but rather in /tmp. What's going on here. Also, I have the
following errors:

-snip-
Warning: Failed opening 'header.inc.php' for inclusion
(include_path='.:/usr/local/lib/php') in /tmp/really_silly on line 3
Warning: Failed opening 'footer.inc.php' for inclusion
(include_path='.:/usr/local/lib/php') in /tmp/really_silly on line 26
-snip-

The includes are relative to the path that the PHP script is in. It should
just work, but instead it does what you see above. I didn't see this
behaviour with Apache 1.3.x but it could be my Output/Input Filter
definitions too. Any feedback is appreciated.

-- 
Austin Gonyou
Systems Architect, CCNA
Coremetrics, Inc.
Phone: 512-796-9023
email: [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] images

2001-06-26 Thread Jon Yaggie



I am trying to produce buttons with 
imagecreatefromjpeg(). the problem i am having is i cant allocate a color 
for the text of the betton. it appears i have 2 choices black and 
gray. Anyone know why this could be. Code is below

?php Header("Content-Type: 
image/jpeg");

switch($buttontype){case 
1:$buttonfile = "images/button1.jpg";break;case 
2:$buttonfile = "images/button2.jpg";break;

}

$im = 
imagecreatefromjpeg($buttonfile);

switch($color){case 1:$imcolor = 
imagecolorallocate($im, 255, 0, 0);break;case 2:$imcolor 
= imagecolorallocate($im, 0, 255, 0);break;case 
3:$imcolor = imagecolorallocate($im, 0, 0, 
255);break;

}
$sizex = imagesx($im);$sizey = imagesy($im);$fontlen = 
imagefontwidth(3);$strlen = strlen($text) * $fontlen;$xvalue = 
($sizex - $strlen)/2;$yvalue = $sizey * .40;

imagestring($im, 3, $xvalue, $yvalue, $text, $o);



imagejpeg($im);

?





Thank You,Jon Yaggiewww.design-monster.comAnd 
they were singing . . . '100 little bugs in the code100 bugs 
in the codefix one bug, compile it again101 little bugs in the 
code101 little bugs in the code . . .'And it 
continued until they reached 0




Re: [PHP] Creating a PDF document from an HTML Page

2001-06-26 Thread teo

Hi Boaz!
On Tue, 26 Jun 2001, Boaz Yahav wrote:

 Hi
 
 I'm trying to create a receipt in a PDF format. I have the receipt as HTML.
 Is there any class or module in PHP or other language that can read an
 HTML file and output a PDF file?
 
if you intend to do it offline, try html2ps  ps2pdf (quick shot)
also you have htmldoc, which I dunno if it supports batch jobs.

otherwise, you'll find a lot of Java based solution, google is your friend :)

ciao

-- teodor

-- 
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] irc bot?

2001-06-26 Thread Philip Olson

Haven't tried it but here's a php bot, which uses mysql :

  http://www.sourceforge.net/projects/phpegg/

regards,
philip  


On Tue, 26 Jun 2001, Michael Roark wrote:

 Does anyone know of the existance of an irc bot written in php or
 otherwise, which will talk to a mysql database?
 
 
 -- 
 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] Creating a PDF document from an HTML Page

2001-06-26 Thread burk

On Tue, 26 Jun 2001, Boaz Yahav wrote:

 I'm trying to create a receipt in a PDF format. I have the receipt as HTML.
 Is there any class or module in PHP or other language that can read an
 HTML file and output a PDF file?

I use HTMLDOC. It works well for us here.

http://www.easysw.com/htmldoc/

Hope this helps,

-burk


-- 
[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] How to get PHP to do a POST??

2001-06-26 Thread Patrick Calkins

Hello all!
Here is an interesting problem that I can not solve, maybe one of you know??
Here is what I'm trying to do. I sell a lot of items on eBay, and lots of
people ask me for a quote on shipping. We ship via UPS and I go to their
site a lot to lookup rates. I decided to make my own web page that links
into UPS' with most of the fields already pre-set, and all I want to do is
give the user back a total for shipping. I need to manipulate what comes
back from UPS first, so I can add to the shipping price to cover materials,
etc, then give the final numbers back to the end user. This is where I have
a problem.
I was able to have my page act as a user-agent, and do the submit itself,
however on UPS's site, their submit button is not a button, but rather an
image. Since a button is easy to know what values are getting set (ie
name=Submit value=getinfo), I did not know what vars the image-submit
was setting, since there was no 'value' variable, only a 'name' variable. I
tried it on my own server and found that php assigns the values 'name_x' and
'name_y' giving us the xy values of where the user clicked, but UPS does
not use PHP, so I don't know what their software sets the submit values to
hence it does not work correctly. Their form just thinks something went
wrong and displays the beginning again. If I just include their submit
button on my form, then all works fine, except for the fact that I can't
intercept the data comming back from UPS so that I can adjust the prices.
Any idea on how to do this???

Thanks and sorry if this seems long-winded...



-- 
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] Oracle and PHP

2001-06-26 Thread James Atkinson

That code will work for the Oracle 8.0 but for Oracle 8i you'll want to use
the OCI funcitons

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

Using OCI is a little easier to understand then the ORA function (IMO).
You'll need to compile PHP with the --with-oci8 switch, and you'll need the
Oracle client libs installed.

- James


 -Original Message-
 From: Dunaway, Brian [mailto:[EMAIL PROTECTED]]
 Sent: June 26, 2001 7:25 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: [PHP] Oracle and PHP


 I'm a newbie in PHP, what should I do to connect to Oracle Database.
 Do I have to install a library to do that?
 Please anyone, help.

 http://www.phpbuilder.com/manual/ref.oracle.php

 I usually do something similiar to this.

 (psuedo code follows):

 // Define Oracle_Home and Oracle_Sid
 putenv(ORACLE_HOME=/opt/ORACLE/product);
 putenv(ORACLE_SID=MYDATA);


 // Connect To Oracle Server/Else Return Error(s)
 if($connection = ora_logon(my-login,my-pass))
   {
   // Open Cursor
   $cursor = ora_open($connection);

   $query  = SELECT * FROM table ;
   $query .= ORDER BY date1;

   // Parse Cursor
   ora_parse($cursor, $query);

   if ( ora_exec($cursor) )
   {
   $data = array();
   $field = array();
   while(ora_fetch_into($cursor, $field))
   {
   reset ($field);
   $data[ $field[0] ]  = $field[1];
   }
   }
   else
   {
   print(** While Attempting To Open Cursor On Query
 ** brbr\n\n);
   print(Oracle Returned The Following Error:
 br\n);
   print(ora_error($cursor));
   print(brbr\n\n);
   print(Oracle Error Code: );
   print(ora_errorcode($cursor));
   }

   // Close Cursor
   Ora_Close($cursor);

   }
   else
   {
   print(** While Attempting To Open Connection ** brbr\n\n);
   print(Oracle Returned The Following Error: br\n);
   print(ora_error($connection));
   print(brbr\n\n);
   print(Oracle Error Code: );
   print(ora_errorcode($connection));
   }

   // Disconnect
   Ora_Logoff($connection);

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




  1   2   >