php-general Digest 29 Mar 2001 19:28:22 -0000 Issue 596

Topics (messages 46030 through 46140):

Re: Problem to run java command line with passthru()
        46030 by: Brian Clark

Re: Which way to make the thumbnail on the fly
        46031 by: Brian Clark

Re: This PHP list
        46032 by: Kyutums
        46040 by: Boaz Yahav
        46041 by: Chris Fry
        46086 by: Joe Sheble (Wizaerd)
        46100 by: John Almberg
        46102 by: Joe Sheble (Wizaerd)
        46105 by: Philip Olson
        46107 by: Rick St Jean

Re: Easy HTML PHP question
        46033 by: Tim Ward
        46098 by: Paulson, Joseph V. \"Jay\"
        46099 by: Tim Ward
        46103 by: Paulson, Joseph V. \"Jay\"

Re: GZip + NS + Print = Trouble
        46034 by: Renze Munnik
        46036 by: Renze Munnik

Re: Protect images in directory
        46035 by: Tim Ward

How to create user account?
        46037 by: Zenith

Displaying query results
        46038 by: M. A. Ould-Beddi
        46042 by: elias
        46046 by: Matt Stone

Re: Php extension for Ultradev available now !
        46039 by: elias
        46043 by: Yasuo Ohgaki

split string value
        46044 by: Jacky
        46055 by: Yasuo Ohgaki

Line breaks in PHP
        46045 by: Matt Davis
        46049 by: Renze Munnik
        46050 by: Boaz Yahav
        46052 by: Martin Cabrera Diaubalick
        46109 by: Jason Lotito
        46113 by: Martin E. Koss

Re: What is the difference between session_unset() and session_destroy()?
        46047 by: Yasuo Ohgaki

Announcement - New Web Graphic Design forum
        46048 by: Boaz Yahav

saving uploaded image as file Vs. directly to database
        46051 by: toto
        46060 by: Yasuo Ohgaki

split string value again
        46053 by: Jacky
        46057 by: Martin Cabrera Diaubalick
        46058 by: dempsejn.georgetown.edu
        46061 by: Stewart Taylor
        46063 by: elias
        46064 by: Jacky

Re: sort multidimensional array?
        46054 by: Stewart Taylor

For ... in ...
        46056 by: André Nćss
        46066 by: Yasuo Ohgaki
        46067 by: Yasuo Ohgaki

Re: Curious
        46059 by: Christian Reiniger

Re: Passing Special Characters in Query String
        46062 by: Christian Reiniger

Re: remote acces
        46065 by: Christian Reiniger

Session Varables with PHP3
        46068 by: Sean Weissensee
        46069 by: Renze Munnik
        46072 by: Matt Williams

Delete LDAP attribute value
        46070 by: Anders Östling

pdflib
        46071 by: Ali

Best way to check if a query succeeded
        46073 by: Jordan Elver
        46078 by: Jon Haworth
        46104 by: Christian Reiniger

Re: CodeCharge? is it any good?
        46074 by: Donald Goodwill

How may :)
        46075 by: Nilesh Parmar
        46079 by: Pavel Jartsev

Setcookie not working
        46076 by: Sean Weissensee

[PHP-DB] ALTER TABLE - code not working.
        46077 by: Martin E. Koss

sessions and REMOTE_USER
        46080 by: Rahul Bhide
        46083 by: Renze Munnik

fatal error
        46081 by: Theo Richel
        46082 by: Jon Rosenberg
        46084 by: Renze Munnik

rewrite one line in file
        46085 by: Peter Van Dijck
        46094 by: Jason Stechschulte

Tough One
        46087 by: KPortsmout.aol.com
        46088 by: Krznaric Michael
        46090 by: Chris Moewes-Bystrom
        46091 by: KPortsmout.aol.com
        46101 by: Pierre-Yves Lemaire

Re: [PHP-DB] Best way to check if a query succeeded
        46089 by: Boget, Chris
        46092 by: Nick Davies
        46093 by: Boget, Chris

Re: Complex mysql query
        46095 by: Robert Vetter

Finding linefeeds in Strings
        46096 by: Jens Kisters

environment variable, why does it not work?
        46097 by: Scott Fletcher

Need urgent help... Send HTML with jpg/gif page with php
        46106 by: Paul Godard
        46121 by: Renze Munnik

Re: comparing dates works sometimes and fails another time!
        46108 by: trogers

Retrieving environment variables
        46110 by: Jon

Compiling GD with freetype2
        46111 by: Ashley T. Howes Ph.D.
        46114 by: Grimes, Dean

Weirdness With Header Function
        46112 by: Grimes, Dean

Giving my script the power!
        46115 by: Brandon Orther

Re: [PHP-DB] Re: [PHP] RE: [PHP-DB] Best way to check if a query succeeded
        46116 by: Terry Romine

PHP Wordfile for UltraEdit
        46117 by: Sebastian Bergmann
        46118 by: Sebastian Bergmann
        46138 by: Geoff Caplan

urgent,configure-problems
        46119 by: MMATTES.de.ibm.com

Re: Help w/ exec() on Win2k, IIS5.
        46120 by: Tobias Talltorp

Case?
        46122 by: acleave
        46123 by: Boget, Chris
        46125 by: Grimes, Dean
        46126 by: Egon Schmid (.work)
        46127 by: Andrew Rush

Match em up
        46124 by: KPortsmout.aol.com
        46130 by: Johannes Janson
        46134 by: Mark Maggelet

Sessions Q.
        46128 by: KPortsmout.aol.com
        46129 by: Johnson, Kirk

arrays in sessions, please!
        46131 by: Christian Dechery

shipping module
        46132 by: Craig Cameron
        46136 by: Rick St Jean

Super User Script?
        46133 by: Brandon Orther

(another) cms, but internationalized
        46135 by: Peter Van Dijck

Compairing Times
        46137 by: Brian C. Doyle

Error during session_start - is this a bug?
        46139 by: Michael Champagne

Editors Inquiry.
        46140 by: Rick St Jean

Administrivia:

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

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

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


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



Hi -Tuna-,

@ 1:42:21 AM on 3/29/2001, nicuc.ac.jp wrote:

...
> $java HelloWorld

...
> <?
> passthru("java HelloWorld") ;
> ?>

> But call through browser its return nothing. no out put , no error
> display. I test my script by log-in Telnet to call the PHP script
> directly.

Try backticks, but be sure to check user-supplied data. If you don't,
you could be putting your webserver into a "world of hurt" as the
country folks like to say in my part of the world.

<?php
$stdout = `/usr/bin/man -k make`;
$lines = explode("\n",$stdout);
while(list(,$line) = each($lines))
{
    print "<tt>$line</tt><br />";
}
?>

Other than that, try popen()

http://www.php.net/manual/en/function.popen.php

-Brian
--
 PGP is spoken here: 0xE4D0C7C8
 Please do not carbon copy me on list replies.







Hi -Tuna-,

@ 2:14:57 AM on 3/29/2001, nicuc.ac.jp wrote:

> I can use just following commands no other commands allow.
> Is this enough to install ImageMagick ?
...

If you want to do what I think you want to do, then see my answer to
your question about passthru() a minute ago.

-Brian
--
 PGP is spoken here: 0xE4D0C7C8
 Please do not carbon copy me on list replies.






Same here. This list has helped me many times before. And as soon as I enough 
knowledge to help someone else, I will.

- Kyutums

Peter Houchin wrote:

> Being a newbie, and as i'm sure is the case with alot of other newbies, one that 
>doesn't have a lot of programming back ground, ask stupid questions to this list 
>because for some things that you find easy others, like my self, don't know what to 
>look for in the manual ... so we ask it here...  now if it wasn't for the more 
>knowledgeable people on this list, I like many others, would be stuck with out any 
>where to go ..
>
> So thanks to those of you that don't complain and crack the s#$@s when newbie become 
>repetitive.
>
> Peter





And don't forget that there are several very good PHP related
sites out there that have been out there for many years now.

Many people find it more convenient to simply post the problems
and solutions on that kind of a platform rather than send it to 
tens of thousands of people on the list that may or may not
be interested in such things.

We were all newbies sometime :)

Sincerely

      berber

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

-----Original Message-----
From: Peter Houchin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 9:03 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] This PHP list


Being a newbie, and as i'm sure is the case with alot of other newbies, one
that doesn't have a lot of programming back ground, ask stupid questions to
this list because for some things that you find easy others, like my self,
don't know what to look for in the manual ... so we ask it here...  now if
it wasn't for the more knowledgeable people on this list, I like many
others, would be stuck with out any where to go .. 

So thanks to those of you that don't complain and crack the s#$@s when
newbie become repetitive.

Peter

-----Original Message-----
From: Ian Harris [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 4:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] This PHP list



I was hoping that this PHP list would be of people developing with PHP, who
have reached some level of familiarity with the product and when they have
had a fair go at solving a problem, they then posted it to the list.  For
example, we have a problem in our code where the last object in an array of
objects sometimes vanishes into thin air depending on whether you
comment-out a block of unrelated code further up the script.

Unfortunately, this list is full of people with questions like "I want to
access a database with PHP. Can someone please send me the source code".

Does anyone know of any other PHP lists that are more suited to non-trivial,
expert-related discussions?

If there aren't any around, I'll start one on Yahoogroups or some other
similar service.

regards
Ian.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





There was a mailing list

[EMAIL PROTECTED]

I subscribed and received a confirmation but nothing more - is the list still
alive?

Chris

Jason Lotito wrote:

> > -----Original Message-----
> > From: Ian Harris [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 28, 2001 10:36 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] This PHP list
> >
> >
> >
> > I was hoping that this PHP list would be of people developing
> > with PHP, who
> > have reached some level of familiarity with the product and when they have
> > had a fair go at solving a problem, they then posted it to the list.  For
> > example, we have a problem in our code where the last object in
> > an array of
> > objects sometimes vanishes into thin air depending on whether you
> > comment-out a block of unrelated code further up the script.
> >
> > Unfortunately, this list is full of people with questions like "I want to
> > access a database with PHP. Can someone please send me the source code".
> >
> > Does anyone know of any other PHP lists that are more suited to
> > non-trivial,
> > expert-related discussions?
> >
> > If there aren't any around, I'll start one on Yahoogroups or some other
> > similar service.
> >
> > regards
> > Ian.
>
> Sounds like a conversation that already happend on this mailing list a few
> days ago, and then was dropped.  Maybe you should read some of the previous
> postings before continuing this line of thought (for reference) and to
> prevent the exact type of postings you are trying to avoid, i.e., Posting
> from People who do NOT read the FAQ, older posting, etc.
>
> Also, remember this, most of the time, 'experts' who have problems either
> (a) can solve the problem themselves, because that is what a programmer
> does, or (b) don't have problems.  Sure, a syntax error here or there, but
> most 'experts' I know usually fall into the 'A' category.
>
> Now, don't get me wrong, I would love to see a more professional, higher end
> mailing list, but at the same time, having expected the php-general mailing
> list to cater to 'Experts' only is a bit egotistical (not the right word,
> sounds to harsh that way, but I can think of a better one, so just us the
> cant_think_of_word("egotistical") function and it will be all right).
>
> So, before posting next time, please try and read older posts concerning the
> same or similar subject, and also try and understand, that while it may seem
> non-trivial to you how to connect to PostgreSQL from XXX Server passing
> through YYY Software, to many it may not, and that is why this is the
> PHP-General Mailing List, not the PHP-Master Mailing List.
>
> This was NOT a flame, and no flame retardent clothing was needed.  =)
>
> Merely trying to quell a possible brush fire.
>
> Jason Lotito
> www.NewbieNetwork.net
> Where those who can, teach;
> and those who can, learn.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Chris Fry
Quillsoft Pty Ltd
Specialists in Secure Internet Services and E-Commerce Solutions
10 Gray Street
Kogarah
NSW  2217
Australia

Phone: +61 2 9553 1691
Fax: +61 2 9553 1692
Mobile: 0419 414 323
eMail: [EMAIL PROTECTED]
http://www.quillsoft.com.au

You can download our Public CA Certificate from:-
https://ca.secureanywhere.com/htdocs/cacert.crt

**********************************************************************

This information contains confidential information intended only for
the use of the authorised recipient.  If you are not an authorised
recipient of this e-mail, please contact Quillsoft Pty Ltd by return
e-mail.
In this case, you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy all
copies of them.
This e-mail and any attachments may also contain copyright material
belonging to Quillsoft Pty Ltd.
The views expressed in this e-mail or attachments are the views of
the author and not the views of Quillsoft Pty Ltd.
You should only deal with the material contained in this e-mail if
you are authorised to do so.

This notice should not be removed.






Typically I would never respond to this type of thread discussion, but it's 
one that gives me a great amount of frustration from time to time.  I think 
this level of frustration stems from the fact that a lot of these 'newbie' 
questions are even more basic than a PHP newbie should be asking.  Things 
that should be fairly evident to anyone who's done any level of 
development.  The problem is we get people who don't know a lick about 
programming methodologies, logicical contructs, variables,  or any general 
programming knowledge.

I would never dream of asking "How do I edit data in a database?"  Or "How 
do I display records from a database?"  These are the types of things you 
should be familiar with beforehand.  It's almost as if someone woke up one 
morning and decided Geee, I think I'll write a web application.  It 
shouldn't matter that I've never programmed anything ever before, it's the 
web, anybody could do it...'  Databases?  nah, I don't need to know 
anything about databases, I'll just write the code...'

And it's not as if this is the only available resource.  I downloaded and 
studied bits of code from everywhere when I decided to learn PHP.  I read 
every article on Zend.com and phpBuilder.com... I bought a PHP book and a 
mySQL book...  I actually took time out to 'learn' the language...  and now 
I write PHP fairly fluently... I rarely ask questions here, but keep the 
emails to pick up a tip or two.  Overall I love this list, but as I've said 
before, it is a bit frustrating as well....


At 05:02 PM 3/29/01 +1000, Peter Houchin wrote:
>Being a newbie, and as i'm sure is the case with alot of other newbies, 
>one that doesn't have a lot of programming back ground, ask stupid 
>questions to this list because for some things that you find easy others, 
>like my self, don't know what to look for in the manual ... so we ask it 
>here...  now if it wasn't for the more knowledgeable people on this list, 
>I like many others, would be stuck with out any where to go ..
>
>So thanks to those of you that don't complain and crack the s#$@s when 
>newbie become repetitive.
>
>Peter
>
>-----Original Message-----
>From: Ian Harris [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, March 29, 2001 4:36 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP] This PHP list
>
>
>
>I was hoping that this PHP list would be of people developing with PHP, who
>have reached some level of familiarity with the product and when they have
>had a fair go at solving a problem, they then posted it to the list.  For
>example, we have a problem in our code where the last object in an array of
>objects sometimes vanishes into thin air depending on whether you
>comment-out a block of unrelated code further up the script.
>
>Unfortunately, this list is full of people with questions like "I want to
>access a database with PHP. Can someone please send me the source code".
>
>Does anyone know of any other PHP lists that are more suited to non-trivial,
>expert-related discussions?
>
>If there aren't any around, I'll start one on Yahoogroups or some other
>similar service.
>
>regards
>Ian.
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]





True, but you have to remember that a lot of 'newbies' are actually superb
graphic designers with a lot of experience developing static websites. They
are grappling with new demands from their customers for more dynamic
features. If they don't quite grasp the difficulty of what they are trying
to do, you can't blame them for trying to meet their customer's needs.

I know this, because I am working with a number of web designers who have a
hell of a lot more experience than I do with web sites, but they don't have
the programming background. Putting the shoe on the other foot, I could mess
with Photoshop for a hundred years and never get good at designing graphics.
So I have a lot of respect for what these guys do. Personally, I think it's
a great symbiotic relationship: programmers and graphics designers. Both
creative, but in entirely different ways.

I do agree that designers with paying gigs would do better to farm out the
programming stuff to a real programmer, but that's something that they need
to learn on their own, perhaps. Meanwhile, it doesn't hurt to answer a dumb
question or two, even if the answer has to be a respectful "you don't know
how big a question that is!"

Just my opinion.

John





I wouldn't expect a programmer to walk in off the street and try to do 
graphic design without having any concept of graphic design.  I wouldn't 
expect a mechanic to walk into the kitchen and expect to build a 
souffle.  I wouldn't expect a gardner to walk in and perform brain 
surgery.  And I wouldn't expect an artist to walk in and start writing code.

If somebody wants to learn how to code, then 'learn' how to do code.  Read 
tutorials, read manuals, etc...

At 10:38 AM 3/29/01 -0500, John Almberg wrote:
>True, but you have to remember that a lot of 'newbies' are actually superb
>graphic designers with a lot of experience developing static websites. They
>are grappling with new demands from their customers for more dynamic
>features. If they don't quite grasp the difficulty of what they are trying
>to do, you can't blame them for trying to meet their customer's needs.
>
>I know this, because I am working with a number of web designers who have a
>hell of a lot more experience than I do with web sites, but they don't have
>the programming background. Putting the shoe on the other foot, I could mess
>with Photoshop for a hundred years and never get good at designing graphics.
>So I have a lot of respect for what these guys do. Personally, I think it's
>a great symbiotic relationship: programmers and graphics designers. Both
>creative, but in entirely different ways.
>
>I do agree that designers with paying gigs would do better to farm out the
>programming stuff to a real programmer, but that's something that they need
>to learn on their own, perhaps. Meanwhile, it doesn't hurt to answer a dumb
>question or two, even if the answer has to be a respectful "you don't know
>how big a question that is!"
>
>Just my opinion.
>
>John
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]






> I wouldn't expect a programmer to walk in off the street and try to do 
> graphic design without having any concept of graphic design.  

ack!  i do this very thing!  one reason i rely on css and tables rather
then graphics, that and it means less hits on my server :-)

regarding this thread, the list is full of all kinds.  from the "how i
make php databasss" to core php developers, php-general is the great
melting pot of php goodness!  let's cherish this fact.  

regards,
philip





that is not true... I for one would hang out on more than one list.  And IF no
one did answer the question, what do newbies do.... they get the answer 
themselves.
they spend energy on solving the problem and they learn how to learn.

We can exhaust this topic to death.

I just created   [EMAIL PROTECTED]
if you want to join use [EMAIL PROTECTED]

newbies are encouraged to observe and learn but please aim entry level 
questions here.

Rick






At 04:45 PM 3/29/01 +1000, Gfunk wrote:
>Just my .02c... I really hate these sorts of questions... As the previous
>poster said, if there was a newbie only list, it'd be full of newbies, and
>you'd
>never get anything answered cause there'd be only newbies, and newbies
>would all come to the advance list to ask their questions.
>
>I'd bet my arm that all the best php programmers of the world, hang out on
>this list. I've read heaps of replies by people who _write_ php (shout out
>rasmus), and I myself read posts when I can, and without sounding like a
>tool, I'm a very experienced PHP developer... But sometimes I have
>questions that could be construed as "newbie" because they relate to
>something I've never used before, or any reason...
>
>Plus, I like helping the newbies.. I remember the first time I used php, and
>I had some learnin' to do back then :-)
>
>----------------------------------------------------------------------------
>Gfunk - [EMAIL PROTECTED] - http://www.gfunk007.com/
>
>
>----- Original Message -----
>From: "Jason Murray" <[EMAIL PROTECTED]>
>To: "'Ian Harris'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>Sent: Thursday, March 29, 2001 4:42 PM
>Subject: RE: [PHP] This PHP list
>
>
> > > I was hoping that this PHP list would be of people developing
> > > with PHP, who have reached some level of familiarity with the product
> > > and when they have had a fair go at solving a problem, they then posted
> > > it to the list.  For example, we have a problem in our code where the
> > > last object in an array of objects sometimes vanishes into thin air
> > > depending on whether you comment-out a block of unrelated code further
> > > up the script.
> >
> > Sounds like an interesting problem, but related specifically to your code.
> > Post it and see..?
> >
> > > Unfortunately, this list is full of people with questions like "I want
>to
> > > access a database with PHP. Can someone please send me the source code".
> > >
> > > Does anyone know of any other PHP lists that are more suited
> > > to non-trivial, expert-related discussions?
> >
> > Well, remember it's called PHP General not PHP Advanced Techy Wizardry. :)
> >
> > The reason it's general and not advanced is that if they made an advanced
> > list as you suggest, the newbies would all go there and ask their
>questions.
> >
> > There are quite a few experienced, knowledgeable and advanced users around
> > here. It also helps if you actually ask your questions sometimes too you
> > know 8)
> >
> > > If there aren't any around, I'll start one on Yahoogroups or
> > > some other similar service.
> >
> > Feel free to do it, and best of luck. :)
> >
> > Jason
> >
> > --
> > Jason Murray
> > [EMAIL PROTECTED]
> > Web Design Team, Melbourne IT
> > Fetch the comfy chair!
> >
> > --
> > PHP General Mailing List (http://www.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]

##########################################################
#  Rick St Jean,
#  [EMAIL PROTECTED]
#  President of Design Shark,
#  http://www.designshark.com/
#  Quick Contact:  http://www.designshark.com/messaging.ihtml
#  Tel: 905-684-2952
##########################################################





he's right, but what about using the onclick event of the image to store a
value in a hidden field (I haven't tried this but there's no reason to think
it won't work)

        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: Fabian Raygosa [mailto:[EMAIL PROTECTED]]
> Sent: 29 March 2001 01:11
> To: Paulson, Joseph V. "Jay"; [EMAIL PROTECTED]
> Subject: Re: [PHP] Easy HTML PHP question
> 
> 
> For images i think its different, i don't think you can force 
> the image name
> that value
> instead the value gets turned into "button_x" and "button_y" 
> with relation
> to where the mouse clicked on the image. In any event try 
> using GET method
> instead of POST method to see whats displayed on the  url 
> string then you
> will have your answer
> 
> ----- Original Message -----
> From: "Paulson, Joseph V. "Jay"" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 28, 2001 3:51 PM
> Subject: [PHP] Easy HTML PHP question
> 
> 
> > Hello everyone-
> > I have a pretty easy question that I can't seem to answer 
> myself so I'm
> > coming to you all.  Below you'll see some html code for a 
> form.  Now what
> > happens is that when I click on one of the images to submit the form
> (either
> > on the update_event.gif image or the delete_event.gif 
> image) the form goes
> > to redirect.php.  The problem I am having is that I have a switch
> statement
> > which runs off the variable "button" on the redirect.php 
> page (hence the
> > name="button" in the form).  However, you would think if 
> you clicked on
> the
> > update_event.gif that "button" would be set to "updateEvent" on the
> > redirect.php page.  Well it isn't set to anything at all!  
> Here's the
> other
> > problem, since I have two different acctions I can do on 
> the same page I
> > can't do Hidden variables on this page because I can't have 
> button being
> two
> > different values.
> >
> > Anyway, what I need is when a user clicks on the image to 
> submit the form
> I
> > need the button to be set to the correct value.  Any 
> suggestions on how to
> > do this??
> >
> > <form action="redirect.php" method="post">
> >
> > <input type="image" border="0" name="button" 
> src="images/update_event.gif"
> > value="updateEvent">
> >
> > <input type="image" border="0" name="button" 
> src="images/delete_event.gif"
> > value="deleteEvent">
> >
> > </form>
> >
> > Thanks!
> > Jay Paulson
> > Developer, Web Technologies
> > Viatel, Inc.
> > http://www.viatel.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]
> 
> 




Yeah that would work if I knew how to do that?  Any suggestions on how to go
about doing that?

Thanks,
Jay

-----Original Message-----
From: Tim Ward [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 1:59 AM
To: 'Fabian Raygosa'; Paulson, Joseph V. "Jay";
[EMAIL PROTECTED]
Subject: RE: [PHP] Easy HTML PHP question


he's right, but what about using the onclick event of the image to store a
value in a hidden field (I haven't tried this but there's no reason to think
it won't work)

        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: Fabian Raygosa [mailto:[EMAIL PROTECTED]]
> Sent: 29 March 2001 01:11
> To: Paulson, Joseph V. "Jay"; [EMAIL PROTECTED]
> Subject: Re: [PHP] Easy HTML PHP question
> 
> 
> For images i think its different, i don't think you can force 
> the image name
> that value
> instead the value gets turned into "button_x" and "button_y" 
> with relation
> to where the mouse clicked on the image. In any event try 
> using GET method
> instead of POST method to see whats displayed on the  url 
> string then you
> will have your answer
> 
> ----- Original Message -----
> From: "Paulson, Joseph V. "Jay"" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 28, 2001 3:51 PM
> Subject: [PHP] Easy HTML PHP question
> 
> 
> > Hello everyone-
> > I have a pretty easy question that I can't seem to answer 
> myself so I'm
> > coming to you all.  Below you'll see some html code for a 
> form.  Now what
> > happens is that when I click on one of the images to submit the form
> (either
> > on the update_event.gif image or the delete_event.gif 
> image) the form goes
> > to redirect.php.  The problem I am having is that I have a switch
> statement
> > which runs off the variable "button" on the redirect.php 
> page (hence the
> > name="button" in the form).  However, you would think if 
> you clicked on
> the
> > update_event.gif that "button" would be set to "updateEvent" on the
> > redirect.php page.  Well it isn't set to anything at all!  
> Here's the
> other
> > problem, since I have two different acctions I can do on 
> the same page I
> > can't do Hidden variables on this page because I can't have 
> button being
> two
> > different values.
> >
> > Anyway, what I need is when a user clicks on the image to 
> submit the form
> I
> > need the button to be set to the correct value.  Any 
> suggestions on how to
> > do this??
> >
> > <form action="redirect.php" method="post">
> >
> > <input type="image" border="0" name="button" 
> src="images/update_event.gif"
> > value="updateEvent">
> >
> > <input type="image" border="0" name="button" 
> src="images/delete_event.gif"
> > value="deleteEvent">
> >
> > </form>
> >
> > Thanks!
> > Jay Paulson
> > Developer, Web Technologies
> > Viatel, Inc.
> > http://www.viatel.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]
> 
> 




<script language="javascript">
        function ImgClick(imgName)
        {       ThisImage = document.all[imgName];
                document.form1.fred.value = ThisImage.value;
        }
</script>
<form name="form1">
<input type=hidden value="" name="fred">
<input type="image" src="image.bmp" onlcick="ImgClick('image1')" name=image1
value="i1">
<input type="image" src="image2.bmp" onlcick="ImgClick('image2')"
name=image2 value="i2">
</form>

I'm pretty sure the event will fire before the submission but you'll need to
experiment a bit (and treat this as pseudo code)

        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: Paulson, Joseph V. "Jay" [mailto:[EMAIL PROTECTED]]
> Sent: 29 March 2001 16:17
> To: 'Tim Ward'; 'Fabian Raygosa'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Easy HTML PHP question
> 
> 
> Yeah that would work if I knew how to do that?  Any 
> suggestions on how to go
> about doing that?
> 
> Thanks,
> Jay
> 
> -----Original Message-----
> From: Tim Ward [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 1:59 AM
> To: 'Fabian Raygosa'; Paulson, Joseph V. "Jay";
> [EMAIL PROTECTED]
> Subject: RE: [PHP] Easy HTML PHP question
> 
> 
> he's right, but what about using the onclick event of the 
> image to store a
> value in a hidden field (I haven't tried this but there's no 
> reason to think
> it won't work)
> 
>       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: Fabian Raygosa [mailto:[EMAIL PROTECTED]]
> > Sent: 29 March 2001 01:11
> > To: Paulson, Joseph V. "Jay"; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Easy HTML PHP question
> > 
> > 
> > For images i think its different, i don't think you can force 
> > the image name
> > that value
> > instead the value gets turned into "button_x" and "button_y" 
> > with relation
> > to where the mouse clicked on the image. In any event try 
> > using GET method
> > instead of POST method to see whats displayed on the  url 
> > string then you
> > will have your answer
> > 
> > ----- Original Message -----
> > From: "Paulson, Joseph V. "Jay"" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 28, 2001 3:51 PM
> > Subject: [PHP] Easy HTML PHP question
> > 
> > 
> > > Hello everyone-
> > > I have a pretty easy question that I can't seem to answer 
> > myself so I'm
> > > coming to you all.  Below you'll see some html code for a 
> > form.  Now what
> > > happens is that when I click on one of the images to 
> submit the form
> > (either
> > > on the update_event.gif image or the delete_event.gif 
> > image) the form goes
> > > to redirect.php.  The problem I am having is that I have a switch
> > statement
> > > which runs off the variable "button" on the redirect.php 
> > page (hence the
> > > name="button" in the form).  However, you would think if 
> > you clicked on
> > the
> > > update_event.gif that "button" would be set to 
> "updateEvent" on the
> > > redirect.php page.  Well it isn't set to anything at all!  
> > Here's the
> > other
> > > problem, since I have two different acctions I can do on 
> > the same page I
> > > can't do Hidden variables on this page because I can't have 
> > button being
> > two
> > > different values.
> > >
> > > Anyway, what I need is when a user clicks on the image to 
> > submit the form
> > I
> > > need the button to be set to the correct value.  Any 
> > suggestions on how to
> > > do this??
> > >
> > > <form action="redirect.php" method="post">
> > >
> > > <input type="image" border="0" name="button" 
> > src="images/update_event.gif"
> > > value="updateEvent">
> > >
> > > <input type="image" border="0" name="button" 
> > src="images/delete_event.gif"
> > > value="deleteEvent">
> > >
> > > </form>
> > >
> > > Thanks!
> > > Jay Paulson
> > > Developer, Web Technologies
> > > Viatel, Inc.
> > > http://www.viatel.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]
> > 
> > 
> 




You are a God! :) It works great!  Is there any chance I could get you to
make some suggestions on some good javascript books or web sites?

Jay

-----Original Message-----
From: Tim Ward [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 9:28 AM
To: Paulson, Joseph V. "Jay"; Tim Ward; 'Fabian Raygosa';
[EMAIL PROTECTED]
Subject: RE: [PHP] Easy HTML PHP question


<script language="javascript">
        function ImgClick(imgName)
        {       ThisImage = document.all[imgName];
                document.form1.fred.value = ThisImage.value;
        }
</script>
<form name="form1">
<input type=hidden value="" name="fred">
<input type="image" src="image.bmp" onlcick="ImgClick('image1')" name=image1
value="i1">
<input type="image" src="image2.bmp" onlcick="ImgClick('image2')"
name=image2 value="i2">
</form>

I'm pretty sure the event will fire before the submission but you'll need to
experiment a bit (and treat this as pseudo code)

        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: Paulson, Joseph V. "Jay" [mailto:[EMAIL PROTECTED]]
> Sent: 29 March 2001 16:17
> To: 'Tim Ward'; 'Fabian Raygosa'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Easy HTML PHP question
> 
> 
> Yeah that would work if I knew how to do that?  Any 
> suggestions on how to go
> about doing that?
> 
> Thanks,
> Jay
> 
> -----Original Message-----
> From: Tim Ward [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 1:59 AM
> To: 'Fabian Raygosa'; Paulson, Joseph V. "Jay";
> [EMAIL PROTECTED]
> Subject: RE: [PHP] Easy HTML PHP question
> 
> 
> he's right, but what about using the onclick event of the 
> image to store a
> value in a hidden field (I haven't tried this but there's no 
> reason to think
> it won't work)
> 
>       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: Fabian Raygosa [mailto:[EMAIL PROTECTED]]
> > Sent: 29 March 2001 01:11
> > To: Paulson, Joseph V. "Jay"; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Easy HTML PHP question
> > 
> > 
> > For images i think its different, i don't think you can force 
> > the image name
> > that value
> > instead the value gets turned into "button_x" and "button_y" 
> > with relation
> > to where the mouse clicked on the image. In any event try 
> > using GET method
> > instead of POST method to see whats displayed on the  url 
> > string then you
> > will have your answer
> > 
> > ----- Original Message -----
> > From: "Paulson, Joseph V. "Jay"" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 28, 2001 3:51 PM
> > Subject: [PHP] Easy HTML PHP question
> > 
> > 
> > > Hello everyone-
> > > I have a pretty easy question that I can't seem to answer 
> > myself so I'm
> > > coming to you all.  Below you'll see some html code for a 
> > form.  Now what
> > > happens is that when I click on one of the images to 
> submit the form
> > (either
> > > on the update_event.gif image or the delete_event.gif 
> > image) the form goes
> > > to redirect.php.  The problem I am having is that I have a switch
> > statement
> > > which runs off the variable "button" on the redirect.php 
> > page (hence the
> > > name="button" in the form).  However, you would think if 
> > you clicked on
> > the
> > > update_event.gif that "button" would be set to 
> "updateEvent" on the
> > > redirect.php page.  Well it isn't set to anything at all!  
> > Here's the
> > other
> > > problem, since I have two different acctions I can do on 
> > the same page I
> > > can't do Hidden variables on this page because I can't have 
> > button being
> > two
> > > different values.
> > >
> > > Anyway, what I need is when a user clicks on the image to 
> > submit the form
> > I
> > > need the button to be set to the correct value.  Any 
> > suggestions on how to
> > > do this??
> > >
> > > <form action="redirect.php" method="post">
> > >
> > > <input type="image" border="0" name="button" 
> > src="images/update_event.gif"
> > > value="updateEvent">
> > >
> > > <input type="image" border="0" name="button" 
> > src="images/delete_event.gif"
> > > value="deleteEvent">
> > >
> > > </form>
> > >
> > > Thanks!
> > > Jay Paulson
> > > Developer, Web Technologies
> > > Viatel, Inc.
> > > http://www.viatel.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]
> > 
> > 
> 




Yep... You're right (again...). Though I must say that the transfer
_is_ a 'problem'. Not only for NS users, but for most people,
because let's face it; most people still use a modem (39K, 56K...)
for Internet and not the 2Gb line that I have. I've got not problems
with transfer-speed at all, but those people at home will. Ofcourse
I know that making my pages less big would be a good solutions, may
hey... it makes 'm look and works so very nice. What I mean is; I
didn't say that NS transfers slower, but the people who use my sites
have to download a lot of sh%t that I wrote (well, not exactly sh%t,
'cause I do get paid for it) and to speed that up (most
Internet-connections at home s~ck) I wanted to compress the data
being transferred. And the gzhandler was a good sollution. I mean...
HTML still _IS_ plain text and that compresses like reeeeeeaaaaaly
good. And the unzipping on the clientside hardly takes any effort,
so...

But now I'm writing to much.

You're right. That's what this was about. The solution like I have
it now doesn't work for NS; that's for sure. So for the time being
I'll just adjust my 'headers' (cry, cry, cry) so that the gzhandler
isn't used for NS. God I hate this!!!

When ever anyone has _some_ (sort of a) solution for this
afterall... Please, please, please let me know.......

For now: Thanks for the effort(s)!!

RenzE


Michael Kimsal wrote:
> 
> No problem.  Understood about the table issue, but it's normally not
> the downloading of the HTML that's as much a problem as the rendering,
> in my experience, with netscape.
> 
> I'm the last person who would adopt this attitude, but...
> 
> Check your stats?  How many IE users?  How many NS users?
> The 'solution' is one which by definition CAN'T work with NS.
> It may not be an IE only thing - not sure about opera or lynx or
> konqueror with gzip stuff.  But don't look at it like an IE only thing.
> Just a non-NS thing.  It's their own damn fault.
> 
> If you've got a lot of traffic, the gzip can save a lot of bandwidth.
> Especially if 80% of your traffic is IE anyway.
> 
> Good luck.
>




To get back to your remark about those stats; I just did.....

Less than 1% uses NS!

But still... I'd like to have a site that just works!!!


RenzE




how about keeping the images off of the root and getting php to create
copies just for the request. I haven't really thought this through, but it
sounds plausible.

        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: Kyutums [mailto:[EMAIL PROTECTED]]
> Sent: 29 March 2001 02:23
> To: Php-General
> Subject: Protect images in directory
> 
> 
> I think this question has been asked before, even in PHP 
> Builder, but I
> still haven't seen a  plausible answer. :)
> 
> Basically, I want to protect images in a folder (it's for a 
> family album
> thing). It's going to be on a Linux server and I plan to use .htaccess
> to protect the folder. Is there a way to use custom forms (the usual
> ones with the Submit button) to allow people to enter the said folder,
> and not use the usual pop-ups that IE or Netscape or any browser
> presents the user with?
> 
> I don't want want people to be able to leech the images 
> without entering
> a password.
> 
> Thanks in advance for all your help.
> 
> - Kyutums
> 
> 




How can I use exec() to create user account?
I try to use exec("useradd testusr");
but nothing happens,
I have set the permission of useradd to 7777 (chmod 7777 useradd) but still 
can't do the desired operation!!

Zenith





I wrote a PHP script which perfrom
a query on a MysQl databasis. i want
the result to be displayed by 10 records
in each page with hyperlinks to move to the
next or previous page and to each page. 

Something like this:

 XX records were found
Display 1-10 results

1- ....
2 ....
.....

Next    Previous.

How can I do this


--------------------------------------       
|                                     |
|Dr. Mohamed Abderrahmane Ould Beddi  |
|Faculty of Sciences and Technology   |
|University of Nouakchott             |
| B.P. 5026, Nouakchott - MAURITANIA  | 
|Email: [EMAIL PROTECTED]           |
|_____________________________________|





Dear Sir,
Consider the following attached example.
Hope it helps.

Best regards,
-Elias bachaalany.

""M. A. Ould-Beddi"" <[EMAIL PROTECTED]> wrote in message
Pine.LNX.3.96.1010329091827.2931A-100000@localhost">news:Pine.LNX.3.96.1010329091827.2931A-100000@localhost...
>
> I wrote a PHP script which perfrom
> a query on a MysQl databasis. i want
> the result to be displayed by 10 records
> in each page with hyperlinks to move to the
> next or previous page and to each page.
>
> Something like this:
>
>  XX records were found
> Display 1-10 results
>
> 1- ....
> 2 ....
> .....
>
> Next Previous.
>
> How can I do this
>
>
> --------------------------------------
> |                                     |
> |Dr. Mohamed Abderrahmane Ould Beddi  |
> |Faculty of Sciences and Technology   |
> |University of Nouakchott             |
> | B.P. 5026, Nouakchott - MAURITANIA  |
> |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]
>


begin 666 browse_users.php
M/#\@#0H-"B @+R\@;W!E;B!A(&-O;FYE8W1I;VX-"B @:6YC;'5D92 H(BXN
M+VEN8VQU9&4O9&(N:6YC(BD[#0H-"B @+R\@875T:&]R:7IE(&%D;6EN#0H@
M(&EN8VQU9&4@*")A=71H7V%D;6EN+G!H<"(I.PT*#0H@(&EN8VQU9&4@*"(N
M+B]F=6YC=&EO;G,O9&5B=6<N<&AP(BD[#0H@("1D96)U9U]S=&%T92 ](# [
M#0H-"B @9G5N8W1I;VX@=&5X=%]C;VQO<B@D;7-G+" D8V]L;W(@/2 B1D8P
M,# P(BD-"B @>PT*(" @(')E='5R;B B/&9O;G0@8V]L;W(])R,D8V]L;W(^
M)&US9SPO9F]N=#XB.PT*("!]#0H-"C\^#0H\:'1M;#X-"CQH96%D/@T*/'1I
M=&QE/D)R;W=S92!%=F5N=',\+W1I=&QE/@T*/&UE=&$@:'1T<"UE<75I=CTB
M0V]N=&5N="U4>7!E(B!C;VYT96YT/2)T97AT+VAT;6P[(&-H87)S970]:7-O
M+3@X-3DM,2(^#0H\+VAE860^#0H-"CQB;V1Y(&)G8V]L;W(](B-&1D9&1D8B
M('1E>'0](B,P,# P,# B/@T*/#\-"B @9&5F:6YE*")-05A)5$5-4U!%4E!!
M1T4B+" R,"D[#0H@(&EF("@A:7-S970H)&9T;W1A;&-O=6YT*2D-"B @>PT*
M(" @("1T96UP(" @(" @(" ]('-H;W=?;7ES<6Q?<75E<GDH(E-%3$5#5"!C
M;W5N="@J*2!&4D]-(%5S97)S(BD[#0H@(" @)'1E;7 Q(" @(" @(#T@;7ES
M<6Q?9F5T8VA?87)R87DH)'1E;7 I.PT*(" @("1F=&]T86QC;W5N=" ]("1T
M96UP,5LP73L-"B @("!M>7-Q;%]F<F5E7W)E<W5L="@D=&5M<"D[#0H-"B @
M(" D9F-U<G)E;G1P86=E(#T@,3L-"B @(" D9G1O=&%L<&%G97,@/2 H:6YT
M*2 H)&9T;W1A;&-O=6YT("\@34%8251%35-015)004=%*2 K("@@*"1F=&]T
M86QC;W5N=" E($U!6$E414U34$524$%'12D@/R Q(#H@," I.PT*("!]#0H@
M("1P86=E<75E<GD@/2!S<')I;G1F*"),24U)5" E9"P@)60B+" H)&9C=7)R
M96YT<&%G92TQ*2 J($U!6$E414U34$524$%'12P@34%8251%35-015)004=%
M*3L-"C\^#0H-"CQT86)L92!W:61T:#TB-C4V(B!B;W)D97(](C$B/@T*(" \
M='(@8F=C;VQO<CTB(T-#.3DS,R(^( T*(" @(#QT9"!W:61T:#TB,3DB/CQA
M(&AR968](CP_/2102%!?4T5,1C\^/W-O<G1B>3UI9"(^240\+V$^/"]T9#X-
M"B @(" \=&0@=VED=&@](C$T.2(^/&$@:')E9CTB/#\])%!(4%]314Q&/SX_
M<V]R=&)Y/6QO9VEN(CY,;V=I;CPO83X\+W1D/@T*(" @(#QT9"!W:61T:#TB
M,3<T(CX\82!H<F5F/2(\/STD4$A07U-%3$8_/C]S;W)T8GD]9FER<W1N86UE
M(CY&=6QL(&YA;64\+V$^/"]T9#X-"B @(" \=&0@=VED=&@](C0R(CX\82!H
M<F5F/2(\/STD4$A07U-%3$8_/C]S;W)T8GD]96UA:6PB/D5M86EL/"]A/CPO
M=&0^#0H@(" @/'1D('=I9'1H/2(X,"(^/&$@:')E9CTB/#\])%!(4%]314Q&
M/SX_<V]R=&)Y/6-O=6YT<GDB/D-O=6YT<GD\+V$^/"]T9#X-"B @(" \=&0@
M=VED=&@](C8X(CX\82!H<F5F/2(\/STD4$A07U-%3$8_/C]S;W)T8GD]8VET
M>2(^0VET>3PO83X\+W1D/@T*(" @(#QT9"!W:61T:#TB-S@B/CQA(&AR968]
M(CP_/2102%!?4T5,1C\^/W-O<G1B>3UP:&]N92(^4&AO;F4\+V$^/"]T9#X-
M"B @/"]T<CX-"B @/#\-"B @:68@*&ES<V5T*"1S;W)T8GDI*0T*("![#0H@
M(" @<W=I=&-H("@D<V]R=&)Y*0T*(" @('L-"B @(" @(&-A<V4@(FED(CH@
M(" @(" @(" @)&]R9&5R8GD@/2 B57-E<DE$(CL@(" @("!B<F5A:SL-"B @
M(" @(&-A<V4@(FQO9VEN(CH@(" @(" @)&]R9&5R8GD@/2 B3&]G:6XB.R @
M(" @("!B<F5A:SL-"B @(" @(&-A<V4@(F9I<G-T;F%M92(Z(" @)&]R9&5R
M8GD@/2 B1FER<W1.86UE(CL@("!B<F5A:SL-"B @(" @(&-A<V4@(F5M86EL
M(CH@(" @(" @)&]R9&5R8GD@/2 B16UA:6PB.R @(" @("!B<F5A:SL-"B @
M(" @(&-A<V4@(F-O=6YT<GDB.B @(" @)&]R9&5R8GD@/2 B0V]U;G1R>2([
M(" @("!B<F5A:SL-"B @(" @(&-A<V4@(F-I='DB.B @(" @(" @)&]R9&5R
M8GD@/2 B0VET>2([(" @(" @("!B<F5A:SL-"B @(" @(&-A<V4@(G!H;VYE
M(CH@(" @(" @)&]R9&5R8GD@/2 B4&AO;F4B.R @(" @("!B<F5A:SL-"B @
M("!]#0H@(" @)&]R9&5R8GD@/2 B($]21$52($)9("(@+B D;W)D97)B>3L-
M"B @?0T*("!E;'-E#0H@('L-"B @(" D;W)D97)B>2 ]("(B.PT*("!]#0H-
M"B @)')E<W5L=" ]('-H;W=?;7ES<6Q?<75E<GDH(E-%3$5#5" J($923TT@
M57-E<G,@)&]R9&5R8GD@)'!A9V5Q=65R>2(I.PT*(" D<V5L87)R(#T@07)R
M87DH,#T^(E-%3$5#5$5$(BP@,3T^(B(I.PT*(" D8V]L;W)S(#T@07)R87DH
M,#T^(B-$0T1#1$,B+" Q/3XB(T%#04-!0R(I.PT*(" D;V1D(" @(#T@,#L-
M"B @=VAI;&4@*"1R(#T@;7ES<6Q?9F5T8VA?87)R87DH)')E<W5L="DI#0H@
M('L-"B @(" O+R!A;'1E<FYA=&4@8V]L;W(@;&EN97,-"B @(" D;V1D(%X]
M(#$[( T*#0H_/@T*(" \='(@8F=C;VQO<CTB/#\])&-O;&]R<ULD;V1D73\^
M(CX@#0H@(" @/'1D('=I9'1H/2(Q.2(^( T*(" @(" @/#\])');(E5S97))
M1")=/SX-"B @(" \+W1D/@T*(" @(#QT9"!W:61T:#TB,30Y(CX@/&$@:')E
M9CTB961I=%]U<V5R+G!H<#]U:60]/#\])');(E5S97))1")=/SXB/B -"B @
M(" @(#P_/21R6R),;V=I;B)=/SX-"B @(" @(#PO83X@/"]T9#X-"B @(" \
M=&0@=VED=&@](C$W-"(^( T*(" @(" @/#\]*"1T96UP(#T@)');(E1I=&QE
M(ET@+B B("(@+B D<ELB1FER<W1.86UE(ET@+B B("(@+B D<ELB3&%S=$YA
M;64B72D_/@T*(" @(#PO=&0^#0H@(" @/'1D('=I9'1H/2(T,B(^( T*(" @
M(" @/&$@:')E9CTB;6%I;'1O.CP_/21T96UP/SX@/#P_/21R6R)%;6%I;")=
M/SX^(CX@#0H@(" @(" \/STD<ELB16UA:6PB73\^#0H@(" @(" \+V$^#0H@
M(" @/"]T9#X-"B @(" \=&0@=VED=&@](C@P(CX-"B @(" @(#P_/21R6R)#
M;W5N=')Y(ET_/@T*(" @(" @/"]T9#X-"B @(" \=&0@=VED=&@](C8X(CX@
M#0H@(" @(" \/STD<ELB0VET>2)=/SX-"B @(" \+W1D/@T*(" @(#QT9"!W
M:61T:#TB-S@B/B -"B @(" @(#P_/21R6R)#:71Y(ET_/@T*(" @(#PO=&0^
M#0H@(#PO='(^#0H@(#P_#0H@('T-"C\^#0H\+W1A8FQE/@T*(" \8G(^#0H@
M( T*/'1A8FQE('=I9'1H/2(V.# B(&)O<F1E<CTB,2(@8V5L;'-P86-I;F<]
M(C B(&-E;&QP861D:6YG/2(P(B!B9V-O;&]R/2(C1D9&1D9&(B!B;W)D97)C
M;VQO<CTB(T9&,# P,"(^#0H@(#QT<CX-"B @(" \=&0@=VED=&@](C$W,"(@
M86QI9VX](F-E;G1E<B(^( T*(" @(" @/#\@:68@*"1T96UP(#T@*"1F8W5R
M<F5N='!A9V4@/B Q*2D@>R _/@T*(" @(" @/&$@:')E9CTB(R(@;VYC;&EC
M:STB2F%V85-C<FEP=#H@;7EF;W)M+F9C=7)R96YT<&%G92YV86QU92TM.R!M
M>69O<FTN<W5B;6ET*"D[(CX@#0H@(" @(" \/R!](#\^#0H@(" @("!0<F5V
M:6]U<R!P86=E( T*(" @(" @/#\@:68@*"1T96UP*2![(#\^#0H@(" @(" \
M+V$^( T*(" @(" @/#\@?2 _/@T*(" @(#PO=&0^#0H@(" @/'1D('=I9'1H
M/2(Q-S B(&%L:6=N/2)C96YT97(B/B -"B @(" @(#P_(&EF("@D=&5M<" ]
M("@D9F-U<G)E;G1P86=E(#P@)&9T;W1A;'!A9V5S*2D@>R _/@T*(" @(" @
M/&$@:')E9CTB(R(@;VYC;&EC:STB2F%V85-C<FEP=#H@;7EF;W)M+F9C=7)R
M96YT<&%G92YV86QU92LK.R!M>69O<FTN<W5B;6ET*"D[(CX@#0H@(" @(" \
M/R!](#\^#0H@(" @("!.97AT('!A9V4@#0H@(" @(" \/R!I9B H)'1E;7 I
M('L@/SX-"B @(" @(#PO83X@#0H@(" @(" \/R!](#\^#0H@(" @/"]T9#X-
M"B @(" \=&0@=VED=&@](C$W,"(@86QI9VX](F-E;G1E<B(^#0H@(" @(" \
M/R!I9B H)'1E;7 @/2 H)&9T;W1A;'!A9V5S(#X@,2DI('L@/SX)( T*"2 @
M/&$@:')E9CTB(R(@;VYC;&EC:STB2F%V85-C<FEP=#H@;7EF;W)M+F9C=7)R
M96YT<&%G92YV86QU92 ](#$[(&UY9F]R;2YS=6)M:70H*3LB/B -"B @(" @
M(#P_('T@/SX)(" -"B @(" @($9I<G-T('!A9V4-"B @(" @(#P_(&EF("@D
M=&5M<"D@>R _/@T*(" @(" @/"]A/B -"B @(" @(#P_('T@/SX-"B @(" \
M+W1D/@T*(" @(#QT9"!W:61T:#TB,3<P(B!A;&EG;CTB8V5N=&5R(CX@/&$@
M:')E9CTB(R(@;VYC;&EC:STB2F%V85-C<FEP=#H@;7EF;W)M+F9C=7)R96YT
M<&%G92YV86QU92 ](#P_/21F=&]T86QP86=E<S\^.R!M>69O<FTN<W5B;6ET
M*"D[(CX@#0H@(" @("!,87-T('!A9V4@/"]A/B \+W1D/@T*(" \+W1R/@T*
M/"]T86)L93X-"CQB<CX-"B @/#\];7ES<6Q?;G5M7W)O=W,H)')E<W5L="D_
M/B!R;W<H<RD@9&ES<&QA>65D(&]U="!O9B @/#\])&9T;W1A;&-O=6YT/SX@
M=&]T86PN#0H\/PT*(" O+R!F<F5E(&QA<W0@<F5S=6QT#0H@(&UY<W%L7V9R
M965?<F5S=6QT*"1R97-U;'0I.PT*/SX-"CQF;W)M(&YA;64](FUY9F]R;2(@
M;65T:&]D/2)P;W-T(B!A8W1I;VX](CP_/2102%!?4T5,1C\^(CX-"B @/&EN
M<'5T('1Y<&4](FAI9&1E;B(@;F%M93TB9G1O=&%L8V]U;G0B('9A;'5E/2(\
M/STD9G1O=&%L8V]U;G0_/B(^#0H@(#QI;G!U="!T>7!E/2)H:61D96XB(&YA
M;64](F9C=7)R96YT<&%G92(@=F%L=64](CP_/21F8W5R<F5N='!A9V4_/B(^
M#0H@(#QI;G!U="!T>7!E/2)H:61D96XB(&YA;64](F9T;W1A;'!A9V5S(B!V
M86QU93TB/#\])&9T;W1A;'!A9V5S/SXB/@T*(" \:6YP=70@='EP93TB:&ED
M9&5N(B!N86UE/2)F86-T:6]N(B!V86QU93TB(CX-"CP_("!I9B H:7-S970H
M)'-O<G1B>2DI('L_/@T*(" \:6YP=70@='EP93TG:&ED9&5N)R!N86UE/2=S
M;W)T8GDG('9A;'5E/2<\)3TD<V]R=&)Y)3XG/@T*/#\@('T@/SX-"@T*/"]F
M;W)M/@T*/"]B;V1Y/@T*/"]H=&UL/@T*/#\-"B @;7ES<6Q?8VQO<V4H)&-O
(;FXI.PT*/SX`
`
end





Hi,
I have a excellent library for doing just that but it is very complicated
and integrated into the other libraries.
Perhaps check out http://www.phpbuilder.com/columns/rod20000221.php3 which
is an article on what you are trying to do.
Good luck,

Matt Stone

-----Original Message-----
From: elias [mailto:[EMAIL PROTECTED]]
Sent: Friday, 30 March 2001 6:24 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Displaying query results


Dear Sir,
Consider the following attached example.
Hope it helps.

Best regards,
-Elias bachaalany.

""M. A. Ould-Beddi"" <[EMAIL PROTECTED]> wrote in message
Pine.LNX.3.96.1010329091827.2931A-100000@localhost">news:Pine.LNX.3.96.1010329091827.2931A-100000@localhost...
>
> I wrote a PHP script which perfrom
> a query on a MysQl databasis. i want
> the result to be displayed by 10 records
> in each page with hyperlinks to move to the
> next or previous page and to each page.
>
> Something like this:
>
>  XX records were found
> Display 1-10 results
>
> 1- ....
> 2 ....
> .....
>
> Next Previous.
>
> How can I do this
>
>
> --------------------------------------
> |                                     |
> |Dr. Mohamed Abderrahmane Ould Beddi  |
> |Faculty of Sciences and Technology   |
> |University of Nouakchott             |
> | B.P. 5026, Nouakchott - MAURITANIA  |
> |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]
>







Nice post!

""Ovidiu EFTIMIE"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> For those working with ultradev  :
> http://www.udzone.com/showDetail.asp?TypeId=4&NewsId=488
>
>
> Ovidiu
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Timely post for me. I am considering upgrading Dreamweaver and Fireworks.

How and why do you like Ultradev?
Why PHP user should use it?

--
Yasuo Ohgaki


""Ovidiu EFTIMIE"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> For those working with ultradev  :
> http://www.udzone.com/showDetail.asp?TypeId=4&NewsId=488
>
>
> Ovidiu
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Hi people
If I have value like [EMAIL PROTECTED] stored in a variable. How do I break it up to be 
take only the foo.com bit to use that to redirect user back to that URL?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"




Use split('@',$email_address)
http://www.php.net/manual/en/function.split.php

--
Yasuo Ohgaki


""Jacky"" <[EMAIL PROTECTED]> wrote in message
005a01c0b8a0$453ede00$[EMAIL PROTECTED]">news:005a01c0b8a0$453ede00$[EMAIL PROTECTED]...
Hi people
If I have value like [EMAIL PROTECTED] stored in a variable. How do I break it up to
be take only the foo.com bit to use that to redirect user back to that URL?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"






I have a  form  that edits the text on a web page by putting the data into a
db and then outputting to the webpage when it is called. When I enter my
text into my form I use the return key to start new lines, but when the text
appears on my webpage it  has no line breaks so the text just wraps to the
width of the page.

Is there any way of PHP picking up these line breaks so that the text will
be formatted on my web page as it was on my form.

Thanks

Matt.





I think nl2br() is what you're looking for.

RenzE


Matt Davis wrote:
> 
> I have a  form  that edits the text on a web page by putting the data into a
> db and then outputting to the webpage when it is called. When I enter my
> text into my form I use the return key to start new lines, but when the text
> appears on my webpage it  has no line breaks so the text just wraps to the
> width of the page.
> 
> Is there any way of PHP picking up these line breaks so that the text will
> be formatted on my web page as it was on my form.
> 
> Thanks
> 
> Matt.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




check out the nl2br() function.

HTML does not recognize the line breaks, it needs <BR> for that.

Sincerely

      berber

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

-----Original Message-----
From: Matt Davis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 11:29 AM
To: Php Mailing List
Subject: [PHP] Line breaks in PHP


I have a  form  that edits the text on a web page by putting the data into a
db and then outputting to the webpage when it is called. When I enter my
text into my form I use the return key to start new lines, but when the text
appears on my webpage it  has no line breaks so the text just wraps to the
width of the page.

Is there any way of PHP picking up these line breaks so that the text will
be formatted on my web page as it was on my form.

Thanks

Matt.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







****************************************************
nl2br
(PHP 3, PHP 4 )
nl2br -- Inserts HTML line breaks before all newlines in a string
Description
string nl2br (string string)
Returns string with '<br />' inserted before all newlines
***************************************************

RTM. Sometimes it helps! :-)

> ----- Original Message -----
> From: Matt Davis <[EMAIL PROTECTED]>
> To: Php Mailing List <[EMAIL PROTECTED]>
> Sent: Thursday, March 29, 2001 11:29 AM
> Subject: [PHP] Line breaks in PHP
>
>
> > I have a  form  that edits the text on a web page by putting the data
into
> a
> > db and then outputting to the webpage when it is called. When I enter my
> > text into my form I use the return key to start new lines, but when the
> text
> > appears on my webpage it  has no line breaks so the text just wraps to
the
> > width of the page.
> >
> > Is there any way of PHP picking up these line breaks so that the text
will
> > be formatted on my web page as it was on my form.
> >
> > Thanks
> >
> > Matt.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>







> -----Original Message-----
> From: Matt Davis [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 1:29 AM
> To: Php Mailing List
> Subject: [PHP] Line breaks in PHP
>
>
> I have a  form  that edits the text on a web page by putting the
> data into a
> db and then outputting to the webpage when it is called. When I enter my
> text into my form I use the return key to start new lines, but
> when the text
> appears on my webpage it  has no line breaks so the text just wraps to the
> width of the page.
>
> Is there any way of PHP picking up these line breaks so that the text will
> be formatted on my web page as it was on my form.
>
> Thanks
>
> Matt.


http://www.php.net/nl2br <<---- Check out that function.  that is what you
need.

Jason Lotito
www.NewbieNetwork.net
Where those who can, teach;
and those who can, learn.





When getting the data out of a mySQL table with PHP, use:

$TextArea = nl2br($TextField);

If you are opening it into a form you shouldn't need any formatting as it
will detect the new lines and if using a TEXTAREA the lines will be as you
typed them initially.

If you want to save <BR>s when saving the data into the table, use the above
but then you won't need it when you pull the data back out.

Martin.

-----Original Message-----
From: Jason Lotito [mailto:[EMAIL PROTECTED]]
Sent: 29 March 2001 20:30
To: [EMAIL PROTECTED]; Php Mailing List
Subject: RE: [PHP] Line breaks in PHP




> -----Original Message-----
> From: Matt Davis [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 1:29 AM
> To: Php Mailing List
> Subject: [PHP] Line breaks in PHP
>
>
> I have a  form  that edits the text on a web page by putting the
> data into a
> db and then outputting to the webpage when it is called. When I enter my
> text into my form I use the return key to start new lines, but
> when the text
> appears on my webpage it  has no line breaks so the text just wraps to the
> width of the page.
>
> Is there any way of PHP picking up these line breaks so that the text will
> be formatted on my web page as it was on my form.
>
> Thanks
>
> Matt.


http://www.php.net/nl2br <<---- Check out that function.  that is what you
need.

Jason Lotito
www.NewbieNetwork.net
Where those who can, teach;
and those who can, learn.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





Anyway, session_unset() only unset session vars in memory, but session_destroy()
deletes session vars from storage.
i.e. You can free storage with session_destroy() without waiting garbage
collection.
Unless programmer discards session id, session data will be created with the
same session id, though.

--
Yasuo Ohgaki


"Carfield Yim" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> From the manual,
> session_unset ¡X Free all session variables
> session_destroy ¡X Destroys all data registered to a session
>
> What do this document exactly mean?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





For those of you interested,

We have a new phorum called Web Graphic Design. The phorum manager is
a graphic designer named Nina ([EMAIL PROTECTED]). She  is an artist and 
sculptress. Nina currently works in "Nina Web Development" , a small 
design company she started a few years back. Nina creates digital art 
mainly using Photoshop, Paintshop pro and Painter. 

You can ask her about any Web Graphic Design related issues.

Check the forum at : 
http://www.weberdev.com/index.php3?GoTo=phorum/list.php?f=13


Sincerely

      berber

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





what's the difference between them, i mean for effectiveness and performance
?


-toto-
Imagination is more important than knowledge.






I would use filesystem if I need performance and if I don't worry about
management.
I would use database if I need to manage lots of them and if images have
attributes.

Some older databases have really poor performance when LOB is used. If it is the
case, you might want to use combination of these. (i.e. Use database for
management and use filesystem to store files)

--
Yasuo Ohgaki


""toto"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> what's the difference between them, i mean for effectiveness and performance
> ?
>
>
> -toto-
> Imagination is more important than knowledge.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Hi again
have to try again after I have not recieved any advice, I have a vairable that stores 
email address value. I need to break it so that I will only get the dmain name bit to 
store in another variable so that I can redirect user to that domain, like if user 
email is [EMAIL PROTECTED] then I would like to break that and take only foo.com bit to 
use for navigation.
How can I do that?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"




Try to use explode and keep the second element of the array

Just a quick thought ......

----- Original Message -----
From: Jacky <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 30, 2001 12:52 AM
Subject: [PHP] split string value again


Hi again
have to try again after I have not recieved any advice, I have a vairable
that stores email address value. I need to break it so that I will only get
the dmain name bit to store in another variable so that I can redirect user
to that domain, like if user email is [EMAIL PROTECTED] then I would like to
break that and take only foo.com bit to use for navigation.
How can I do that?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"






"try again" after 20 minutes...give people some time to 
respond!...anyways, you can explode the variable...

list($junk,$domain) = explode("@",$email);

checkout http://www.php.net/explode 
you'll use it a lot....

-jack

----- Original Message -----
From: "Jacky" <[EMAIL PROTECTED]>
Date: Thursday, March 29, 2001 5:52 pm
Subject: [PHP] split string value again

> Hi again
> have to try again after I have not recieved any advice, I have a 
> vairable that stores email address value. I need to break it so 
> that I will only get the dmain name bit to store in another 
> variable so that I can redirect user to that domain, like if user 
> email is [EMAIL PROTECTED] then I would like to break that and take 
> only foo.com bit to use for navigation.
> How can I do that?
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set 
> for yourself"
> 





$addr = "[EMAIL PROTECTED]";

$splitaddr = explode("@",$addr);

resulting in  $splitaddr[0] = "test";
              $splitaddr[1] = "foo.com";


-Stewart

-----Original Message-----
From: Jacky [mailto:[EMAIL PROTECTED]]
Sent: 29 March 2001 23:52
To: [EMAIL PROTECTED]
Subject: [PHP] split string value again


Hi again
have to try again after I have not recieved any advice, I have a vairable
that stores email address value. I need to break it so that I will only get
the dmain name bit to store in another variable so that I can redirect user
to that domain, like if user email is [EMAIL PROTECTED] then I would like to
break that and take only foo.com bit to use for navigation.
How can I do that?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"




try this snippet:

<?
  if (ereg("[^@]+\$", "[EMAIL PROTECTED]", $result))
  {
    $domain = $result[0];
    echo $domain;
  }
?>

""Jacky"" <[EMAIL PROTECTED]> wrote in message
009301c0b8a2$e856f6c0$[EMAIL PROTECTED]">news:009301c0b8a2$e856f6c0$[EMAIL PROTECTED]...
Hi again
have to try again after I have not recieved any advice, I have a vairable
that stores email address value. I need to break it so that I will only get
the dmain name bit to store in another variable so that I can redirect user
to that domain, like if user email is [EMAIL PROTECTED] then I would like to
break that and take only foo.com bit to use for navigation.
How can I do that?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"







thank you everone, sorry about the rush though. I was kind of in urgent
need. Anyway, thanks again.:-)
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
----- Original Message -----
From: Stewart Taylor <[EMAIL PROTECTED]>
To: 'Jacky' <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 3:51 AM
Subject: RE: [PHP] split string value again


> $addr = "mailto:[EMAIL PROTECTED];
>
> $splitaddr = explode("@",$addr);
>
> resulting in  $splitaddr[0] = "test";
>               $splitaddr[1] = "foo.com";
>
>
> -Stewart
>
> -----Original Message-----
> From: Jacky [mailto:[EMAIL PROTECTED]]
> Sent: 29 March 2001 23:52
> To: [EMAIL PROTECTED]
> Subject: [PHP] split string value again
>
>
> Hi again
> have to try again after I have not recieved any advice, I have a vairable
> that stores email address value. I need to break it so that I will only
get
> the dmain name bit to store in another variable so that I can redirect
user
> to that domain, like if user email is [EMAIL PROTECTED] then I would like to
> break that and take only foo.com bit to use for navigation.
> How can I do that?
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for
> yourself"
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





Swap your indexes round
i.e.  $list[$r]["priority"] changes to $list["priority"][$r];

This,
$list = array_multisort($list["priority"], SORT_NUMERIC, SORT_DESC);
should work ok now.


-Stewart.

-----Original Message-----
From: phpman [mailto:[EMAIL PROTECTED]]
Sent: 28 March 2001 03:33
To: [EMAIL PROTECTED]
Subject: Re: [PHP] sort multidimensional array?


I'm still confused. I'm looking to sort the list[$r] part of the array based
on what value $list[$r]["priority"] is. What would the function's arguments
be?

""Stuart J. Browne"" <[EMAIL PROTECTED]> wrote in message
99rajk$i0v$[EMAIL PROTECTED]">news:99rajk$i0v$[EMAIL PROTECTED]...
> > while ($row = mysql_fetch_array($results)) {
> >     $tmp = get_item_reorder_priority($row["item_sku"]);
> >     $list[$r]["priority"] = $tmp[0];
> >     $list[$r]["sku"] = $row["item_sku"];
> >     $r++;
> >    }
> >
> >    $list = array_multisort($list["priority"], SORT_NUMERIC, SORT_DESC);
> >
> > and it returns this error:
> >   Warning: Argument 1 to array_multisort() is expected to be an array or
a
> > sort flag in d://www/inventory_specific.phtml on line 109
> >
> >   function get_item_reorder_priority() returns an array - with $tmp[0]
> being
> > an integer 1-5
> >   $row["item_sku"] is simply a string.
>
>
> Umm, dunno about anybody else but it appears as if you are missing a
> dimension..
>
> In the array creation:
>
>         $list[$r]["priority"]
>
> is used.. emphasis on the [$r] part.
>
> When trying to re-order, you are using just $list["priority"].  missing
the
> [$r] dimension..
>
> bkx
>
>
>
> --
> PHP General Mailing List (http://www.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]




Javascript has this very neat control structure that makes it easy to
iterate over the properties of an object. It would be nice to see something
similiar in PHP. I often use Objects as a way of "packing" data in a more
orderly fashion, and sometimes I need to do stuff to all the properties of
an object. A good example is when I have an object whose properties are
coming from a form, and going back to the very same form if there were
errors in the form. I will have to perform addslashes() and stripslashes()
on all the properties in the object, and writing this without a loop can be
very tedious.

André Næss




You can use get_class_vars() or get_object_vars()
http://www.php.net/manual/en/function.get-object-vars.php
http://www.php.net/manual/en/function.get-class-vars.php

You also need to use Variable variables (i.e. $$var) to iterate object
properties.

<?php

class foo {
 var $v1 = 1;
 var $v2 = 2;
 var $v3 = 3;
}

$bar = new foo;

$property_names = array_keys(get_object_vars($bar));

foreach ($property_names as $name) {
 print("foo->v1 = ".$bar->$name."<br>\n");
}

?>

Regards,

--
Yasuo Ohgaki


"André Næss" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Javascript has this very neat control structure that makes it easy to
iterate over the properties of an object. It would be nice to see something
similiar in PHP. I often use Objects as a way of "packing" data in a more
orderly fashion, and sometimes I need to do stuff to all the properties of
an object. A good example is when I have an object whose properties are
coming from a form, and going back to the very same form if there were
errors in the form. I will have to perform addslashes() and stripslashes()
on all the properties in the object, and writing this without a loop can be
very tedious.

André Næss

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






I thought more examples might be useful someone.

<?php

class foo {
 var $v1 = 1;
 var $v2 = 2;
 var $v3 = 3;
}

$obj = new foo;

$property_names = array_keys(get_object_vars($obj));

foreach ($property_names as $name) {
 print("foo->$name = ".$obj->$name."<br>\n");
}

while (list($k,$v) = each($obj)) {
 print("foo->$k = ".$v."<br>\n");
}

foreach ($obj as $k => $v) {
 print("foo->$k = ".$v."<br>\n");
}

foreach ($obj as $k => $v) {
 print("foo->$k = ".$obj->$k."<br>\n");
}

?>

Regards,

--
Yasuo Ohgaki


"André Næss" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Javascript has this very neat control structure that makes it easy to
iterate over the properties of an object. It would be nice to see something
similiar in PHP. I often use Objects as a way of "packing" data in a more
orderly fashion, and sometimes I need to do stuff to all the properties of
an object. A good example is when I have an object whose properties are
coming from a form, and going back to the very same form if there were
errors in the form. I will have to perform addslashes() and stripslashes()
on all the properties in the object, and writing this without a loop can be
very tedious.

André Næss

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






On Wednesday 28 March 2001 23:59, you wrote:
> This is where I implement a reversal of quotes depending on what kind
> of quotes I'll be using in it - the draw back is hitting the . key a
> lot to concat with variables, but it makes the my code more readable
> (IMO - no \'s all over the place.
>
> So like this :
>
> echo '<a href="http://'.$url.'">'.$title.'</a>'."\n";

Why don't you simply use
echo "<a href='http://$url'>$title</a>\n";
?

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Pretty cool, the kind of power information technology puts in our hands
these days.

- Securityfocus on probing 36000000 hosts for known problems in 3 weeks




On Wednesday 28 March 2001 18:34, you wrote:
> I've tried everything :
> rawurlencode, urldecode, htmlentities,
> htmlspecialchars - nothing is working. and come 2
> think of it - it seems like such a basic problem...

well, then I'd say you do something else wrong. Difficult to say without 
seeing the code.

> > On Wednesday 28 March 2001 08:36, you wrote:
> > > I'm facing a problem with Special Characters ($,
> >
> > %, &,
> >
> > > \, /, ;, :, ", ') etc......
> > > We are sending a varibale in a query string like
> > this
> > > <a href="add_pro_team.php3?title=<? echo
> > > urlencode($title) ?>">

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Pretty cool, the kind of power information technology puts in our hands
these days.

- Securityfocus on probing 36000000 hosts for known problems in 3 weeks




On Wednesday 28 March 2001 20:01, you wrote:
> Hi
>
> I'm triying to connect from windows to linux...
> do i have to manipulate grant tables on mysql...
> what should I do??

read the mysql documentation.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Pretty cool, the kind of power information technology puts in our hands
these days.

- Securityfocus on probing 36000000 hosts for known problems in 3 weeks




How can I create Session Varables, the docs I have read only provide funtions
for PHP4.


Sean Weissensee

Ion Solutions.




PHP Documentation:

"Note: Session handling was added in PHP 4.0."

RenzE


Sean Weissensee wrote:
> 
> How can I create Session Varables, the docs I have read only provide funtions
> for PHP4.
> 
> Sean Weissensee
> 
> Ion Solutions.




See http://phplib.netuse.de

regarding sessions in php3

HTH 

M@

> -----Original Message-----
> From: Sean Weissensee [mailto:[EMAIL PROTECTED]]
> Sent: 29 March 2001 11:38
> To: [EMAIL PROTECTED]
> Subject: [PHP] Session Varables with PHP3
> 
> 
> How can I create Session Varables, the docs I have read only 
> provide funtions
> for PHP4.
> 
> 
> Sean Weissensee
> 
> Ion Solutions.
> 




Hi people

I have written a website to manage our LDAP directory, but there is one
outstanding
problem that I can find any solution to. What I need to do is to delete a
single value
from a multivalued attribute. I can't figure out the correct arguments to do
this

Attribute X
   Values Y
              Z

I want to delete the Y value only, not the complete attribute. What is the
correct syntax ?.
My value of the is stored in OLDVALUE (i.e Y).

    $dn  = "cn=$KEY,ou=FOO,o=bar";
    $rs = ldap_get_entries ($ld,$root,$filter);
    $index=0;
    while ($rs[0]["FOO"][$index] != $OLDVALUE)
         ++$index;
    echo "Removing value $index from ebaddresslist in $dn<br>";

    $foo["FOO"][$index] = "";  ???
    $result = ldap_mod_del ($ld,$dn,$foo);

This does not work. Any clues are most welcome

/Anders

--
      +------------------------------------------------------------+
      | Anders Östling, IKEA Corporate Technology Group            |
      | E-mail:         [EMAIL PROTECTED]            |
      | Voice:                          +46-42-26 43 45            |
      +--"Freedom is just another word for nothing left to loose"--+







Hello,

how do I get a whole paragraph written in pdf using pdflib function
PDF-show-xy? Or is there another function or method to manage this? I
appreciate any hint. Thank you.

Ali







Hi,
i was just wondering what you guys do to check if a wquery suceeded or not?
I know about mysql_num_rows() and mysql_affected_rows(), just wondered what 
you guys do?

I normally do something like:

$sql = "SELECT something FROM table";
$result = mysql_query($sql);
if(@mysql_num_rows($result) > 0) {
        echo'Query Suceeded';
} else {
        echo'Query failed';
}

Cheers,

Jord




What about:

$sql = "SELECT something FROM table";
$result = mysql_query($sql) or die ("Query failed!");
do_something(); //the query has succeeded if we get to this line


HTH
Jon


-----Original Message-----
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
Sent: 29 March 2001 12:00
To: PHP Database Mailing List; PHP General Mailing List
Subject: [PHP] Best way to check if a query succeeded


Hi,
i was just wondering what you guys do to check if a wquery suceeded or not?
I know about mysql_num_rows() and mysql_affected_rows(), just wondered what 
you guys do?

I normally do something like:

$sql = "SELECT something FROM table";
$result = mysql_query($sql);
if(@mysql_num_rows($result) > 0) {
        echo'Query Suceeded';
} else {
        echo'Query failed';
}

Cheers,

Jord

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



**********************************************************************
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or
confidentiality'

**********************************************************************




On Thursday 29 March 2001 13:00, you wrote:
> Hi,
> i was just wondering what you guys do to check if a wquery suceeded or
> not? I know about mysql_num_rows() and mysql_affected_rows(), just
> wondered what you guys do?

Check the return code of mysql_query(). The only safe method.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Pretty cool, the kind of power information technology puts in our hands
these days.

- Securityfocus on probing 36000000 hosts for known problems in 3 weeks




Re:1 Yes, PHP should be the right tool to use to build
your system. It is likely much more powerful (has more
functions) than any other web related language you can
find.
Re:2 CodeCharge is the best PHP generator (or code
generator in general) I seen, except for its own UI,
which can be confusing. You may want to browse through
their newsgroup or actually ask questions there. The
code is fairly clean and looks standard, if that's
what you're asking about.


--- "DRN" <[EMAIL PROTECTED]> wrote:
> Hi, I am a newbie in the field oh php and
databasing, but I would like
> to learn a bit to create a database driven site. I
want to have a
> database with products, and the html pages for the
products and
> categories are 'built' automatically from templates.
> 
> First of all, am I right in thinking that PHP (and a
database) is the
> way to do this?
> 
> Secondly is CodeCharge [ http://www.codecharge.com ]
any good? I was
> thinking of trying it, but I want to make sure that
it is not a
> "FrontPage" type program (generating bad code). I
don't want to try to
> understand code that is wrong.
> 
> Are there any other programs that will create the
php code for me?
> 
> Any help / pointers / suggestions much appreciated,
> 
> Cheers, Donald
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text




Hi
   Does anyone know how many keywords does PHP have.And  where can I find
them ?
   I would appretiate if anyone can send a list of them if possible
 bye and thanx in advance
Nilesh







Nilesh Parmar wrote:
> 
> Hi
>    Does anyone know how many keywords does PHP have.And  where can I find
> them ?
> 

You can find them here:
http://www.php.net/manual/en/reserved.php

-- 
Pavel a.k.a. Papi




When I use set cookie with an expire value it does not retain the value ?

setcookie ("TestCookie2", "test", $value,time()+3600);  

I am using echo $TestCookie2; or
echo $HTTP_COOKIE_VARS["TestCookie2"];

in another page to view the value

Sean Weissensee

Ion Solutions

      






I have been trying to get a new column added to a table (vips) via a PHP
script, but having exhausted all the things I can find, I'm still
struggling. I've referred to TFM for all those who just can't wait to tell
me
to do so, and I believe my SQL statement is correct:

$NewCol = $Prod_Code;
$defaultvalue = "0.00";
// make usual connection
$conID = mysql_pconnect ("localhost","admin","mek1233");
mysql_select_db("FocusDynamics", $conID);
// set the query
// According to the mySQL manual:
// ALTER TABLE vips ADD column_name FLOAT (11,2) DEFAULT '0.00'
// So I used:
$AddColQuery = "ALTER TABLE vips ADD $NewCol FLOAT (11,2) DEFAULT '0.00'";
$result = mysql_query ($AddColQuery,$conID);
// now set the default value for all rows in vips table
$SetDefault = "UPDATE TABLE vips SET $NewCol=$defaultvalue";
$result = mysql_query ($SetDefault,$conID);

It is NOT adding the column, and obviously not setting the default.

Any help would be great, thanks.

Martin.


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





Gurus,
    I am a relative newbie to sessions in php.

Question: How can I get the loginname of the user . Can session and
session variables get this??. Another way I have tried(but
unsuccessfully !!) is to have a .htaccess file in the directory . Once
the user logs in I use the following code to get his login name in a
variable.

<?php
$f=getenv("REMOTE_USER");
print "$f";
?>

but on execution nothing gets printed.

Any solutions ??

thanks in advance,
~Rahul





Well, try this:

        $REMOTE_USER
or
        $PHP_AUTH_USER
or
        $HTTP_SERVER_VARS["REMOTE_USER"]
or
        $HTTP_SERVER_VARS["PHP_AUTH_USER"]
or
        $HTTP_SERVER_VARS{"PHP_AUTH_USER"}
or
        $HTTP_SERVER_VARS{"REMOTE_USER"}

...make your choice...

RenzE


Rahul Bhide wrote:
> 
> Gurus,
>     I am a relative newbie to sessions in php.
> 
> Question: How can I get the loginname of the user . Can session and
> session variables get this??. Another way I have tried(but
> unsuccessfully !!) is to have a .htaccess file in the directory . Once
> the user logs in I use the following code to get his login name in a
> variable.
> 
> <?php
> $f=getenv("REMOTE_USER");
> print "$f";
> ?>
> 
> but on execution nothing gets printed.
> 
> Any solutions ??
> 
> thanks in advance,
> ~Rahul
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




Can anyone please tell me why I get the following message: Fatal error: Call
to unsupported or undefined function session_start() in
/www/richel/authent/index.php3 on line 22

Thank you,

Theo Richel




what version of PHP are you using?


----- Original Message -----
From: "Theo Richel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 8:08 AM
Subject: [PHP] fatal error


> Can anyone please tell me why I get the following message: Fatal error:
Call
> to unsupported or undefined function session_start() in
> /www/richel/authent/index.php3 on line 22
>
> Thank you,
>
> Theo Richel
>





PHP3 doesn't support sessions....

RenzE



Theo Richel wrote:
> 
> Can anyone please tell me why I get the following message: Fatal error: Call
> to unsupported or undefined function session_start() in
> /www/richel/authent/index.php3 on line 22
> 
> Thank you,
> 
> Theo Richel




How do I rewrite 1 line in a file? I got the filename and the linenumber. i 
was playing around with fwrite but to find the line I had to do all sorts 
of gymnastics, I'm sure there must be a more elegant way...
thanks for any hints!
Peter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://liga1.com: building multiple language/culture websites





On Thu, Mar 29, 2001 at 03:05:09PM +0100, Peter Van Dijck wrote:
> How do I rewrite 1 line in a file? I got the filename and the linenumber. i 
> was playing around with fwrite but to find the line I had to do all sorts 
> of gymnastics, I'm sure there must be a more elegant way...
> thanks for any hints!

You have to do gymnastics to get a PHP script to work!!  I would love to
see this.  Also, I didn't realize there was anything more elegant that
gymnastics, well perhaps ballet I guess.  

Unless you search the web for a tool that someone else has written to
make things easier, you do have to do a few things to rewrite a line in
a file.  That is one of the reasons people use databases.  You could try
looking for programs that others have written to make file manipulation
easier, or you could post the portions of your code so we can see what
you are trying to do, and how you are doing it currently.

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
It's appositival, if it's there.  And it doesn't have to be there.
And it's really obvious that it's there when it's there.
             -- Larry Wall in <[EMAIL PROTECTED]>




Hi, 

Ok I have a real tough one here (well to me it is :-) 

If I telnet into my server I can add a user by running the following 
command... 

/usr/sbin/cadduser -d www.domain.com -f users full name -u username -p 
password -w emailaddress for forwarding 

Which is great, but as I`m offering free email forwarding I could potentially 
get a lot of users, and that would be a lot of maintenance time. So I need to 
somehow incorporate the above into my signup scripts. Is this even possible?? 

TIA 
Ade




To get this done I would use an Expect script, driven through CGI.

Mike

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 9:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Tough One


Hi, 

Ok I have a real tough one here (well to me it is :-) 

If I telnet into my server I can add a user by running the following 
command... 

/usr/sbin/cadduser -d www.domain.com -f users full name -u username -p 
password -w emailaddress for forwarding 

Which is great, but as I`m offering free email forwarding I could
potentially 
get a lot of users, and that would be a lot of maintenance time. So I need
to 
somehow incorporate the above into my signup scripts. Is this even
possible?? 

TIA 
Ade

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




I good solution for this kind of stuff is to just build a queue, either file 
or database. WHen you need to do a system type function you add that command 
to the queue, then have a cron job that runs (which can more safely run as a 
provolidged user), verifies that the function is ok and processes the job. If 
you have PHP compiled in CGI mode you can write the script in PHP otherwise 
you can do it in perl or bash or whatever.



On Thursday 29 March 2001 08:22, [EMAIL PROTECTED] wrote:
> Hi,
>
> Ok I have a real tough one here (well to me it is :-)
>
> If I telnet into my server I can add a user by running the following
> command...
>
> /usr/sbin/cadduser -d www.domain.com -f users full name -u username -p
> password -w emailaddress for forwarding
>
> Which is great, but as I`m offering free email forwarding I could
> potentially get a lot of users, and that would be a lot of maintenance
> time. So I need to somehow incorporate the above into my signup scripts. Is
> this even possible??
>
> TIA
> Ade

-- 
Chris Moewes-Bystrom
[EMAIL PROTECTED]
http://moewes.com
http://linuxnovice.org




In a message dated 29/03/2001 15:27:27 GMT Daylight Time, [EMAIL PROTECTED] 
writes:

<< To get this done I would use an Expect script, driven through CGI.
 
 Mike
  >>

Problem is I don`t program in CGI so have no idea what you mean :-)

Ade




This is the only viable solutions because most
system admin will banned all system calls coming from the web.
As it should be, I think.

py

At 08:34 AM 3/29/01 -0600, you wrote:
>I good solution for this kind of stuff is to just build a queue, either file
>or database. WHen you need to do a system type function you add that command
>to the queue, then have a cron job that runs (which can more safely run as a
>provolidged user), verifies that the function is ok and processes the job. If
>you have PHP compiled in CGI mode you can write the script in PHP otherwise
>you can do it in perl or bash or whatever.
>
>
>
>On Thursday 29 March 2001 08:22, [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > Ok I have a real tough one here (well to me it is :-)
> >
> > If I telnet into my server I can add a user by running the following
> > command...
> >
> > /usr/sbin/cadduser -d www.domain.com -f users full name -u username -p
> > password -w emailaddress for forwarding
> >
> > Which is great, but as I`m offering free email forwarding I could
> > potentially get a lot of users, and that would be a lot of maintenance
> > time. So I need to somehow incorporate the above into my signup scripts. Is
> > this even possible??
> >
> > TIA
> > Ade
>
>--
>Chris Moewes-Bystrom
>[EMAIL PROTECTED]
>http://moewes.com
>http://linuxnovice.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]


+ ======================
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ======================





> i was just wondering what you guys do to check if a wquery 
> suceeded or not?
> I know about mysql_num_rows() and mysql_affected_rows(), just 
> wondered what 
> you guys do?

I do this:

$result = mysql( $dbname, $query );
if(( $result ) && ( mysql_errno() == 0 )) {
  // query was successful
  if( mysql_num_rows( $result ) > 0 ) {
    // do your stuff here...
    
  } else {
    echo "Successful query returned no rows";

  } 
} else {
  echo "Query failed: " . mysql_error() . "<br>\n";

}

There is a difference between a "successful query" and
a query that returns 0 rows and should be handled
differently, typically.  Depending on what you are doing,
you might not care -- 0 rows = unsuccessful query.
However, in my case, I want to know if a query was
malformed, contained erroneous data that's throwing
mySQL off or whatever.  These types of errors will 
return 0 rows as well.

Chris





Doesn't the command return 1 or 0 in success or failure?

You may not have a result 

Probably wrong but something like

if (mysql_query($query)) {

} else {

}

or you could die out mysql_query($query) or die ........

On Thu, 29 Mar 2001, Boget, Chris wrote:

> > i was just wondering what you guys do to check if a wquery 
> > suceeded or not?
> > I know about mysql_num_rows() and mysql_affected_rows(), just 
> > wondered what 
> > you guys do?
> 
> I do this:
> 
> $result = mysql( $dbname, $query );
> if(( $result ) && ( mysql_errno() == 0 )) {
>   // query was successful
>   if( mysql_num_rows( $result ) > 0 ) {
>     // do your stuff here...
>     
>   } else {
>     echo "Successful query returned no rows";
> 
>   } 
> } else {
>   echo "Query failed: " . mysql_error() . "<br>\n";
> 
> }
> 
> There is a difference between a "successful query" and
> a query that returns 0 rows and should be handled
> differently, typically.  Depending on what you are doing,
> you might not care -- 0 rows = unsuccessful query.
> However, in my case, I want to know if a query was
> malformed, contained erroneous data that's throwing
> mySQL off or whatever.  These types of errors will 
> return 0 rows as well.
> 
> Chris
> 





> Doesn't the command return 1 or 0 in success or failure?

Not 1 or 0.  It returns 0 or some other value.  Almost the same,
but not quite.
 
> You may not have a result 
> Probably wrong but something like
> if (mysql_query($query)) {
> } else {
> }
> or you could die out mysql_query($query) or die ........

You could do that.  But once you run the query, that's it.  You'll
have nothing to use with any of the other mysql functions because
you need to pass to them the value that mysql() returns.  So while
the above might tell you whether or not the query succeeded, that's
all you would get out of it.

Chris






> Yann Larrivée wrote:
> 
> Thanks for the answer but it is a bit more complexe, i actually
> creates these sample table for the example. Here is an attachement of
> the structure dump.
> 
> Hummm you got me to think more about my database structure withc is
> really good. The idea you bourght up seems really good.
> I am a junior developper, actually only been 2 month i really program
> soi now have more experience then  i used to have spacially when
> people like yuo give me tricks , this really helps me out :-)
> 
> CREATE TABLE produits (                   
>    PID varchar(5) NOT NULL,              

Why a VARCHAR? Numeric values (INT) are better.

>    titre tinytext NOT NULL,                 
>    description text,                                   
>    artiste tinyint(3) NOT NULL,     Artiste reference number see the artiste table

TINYINT has value range from -128 to 127. It's too small for an ID. How
man artists will your database have?

>    image varchar(5) NOT NULL,              Image name
>    num_page smallint(5),                            Number of page if a book
>    duree smallint(4),                                    Length if  video or cd, 
>tape ...
>    format tinyint(3) NOT NULL,                Format of the product hardcover 
>softcover, tape , cd, dvd

You better use ENUM instead: format ENUM('softcover','hardcover',...)

>    ISBN smallint(10),                                ISBN number or serial number

A SMALLINT is not enought for an ISBN number. I must be an INT at least,
or even an BIGINT. Check it out in the manual.

>    quantite tinyint(3) NOT NULL,            Stock quantity

What if you have more then 127 on the stock? see artiste...

>    fournisseur tinyint(4) NOT NULL,        Provider ID number
>    prix float NOT NULL,                        Our sales prices
>    retail float NOT NULL,                        Retail Price
>    UNIQUE PID (PID)
>    UNIQUE PID (PID)
> );
> CREATE TABLE artiste (
>    ID smallint(5) unsigned NOT NULL auto_increment,   artiste ID number
>    nom varchar(15) NOT NULL,   artiste name
>    UNIQUE ID (ID)
> );
> 
> 
> CREATE TABLE fournisseurs (
>         My provider table
>    ID tinyint(5) unsigned NOT NULL auto_increment,        Provider ID
>    Nom varchar(20) NOT NULL,
>             Provider Name
>    adresse1 varchar(50) NOT NULL,
>         addresse1
>    adresse2 varchar(50),
>                         address2
>    ville varchar(20) NOT NULL,
>             city
>    province varchar(20) NOT NULL,
>         state/province
>    pays varchar(30) NOT NULL,
>             country
>    telephone varchar(20) NOT
> NULL,                                           phone number
>    fax varchar(20),
>                             fax
>    email varchar(25),
>    site_web varchar(30),
>                         website
>    pers_ressources varchar(40),
>             person to contact
>    num_compte varchar(20) NOT
> NULL,                                   account number
>    code_postal varchar(7) NOT NULL,
>     Postal code
>    UNIQUE ID (ID)
> );
> 
> 
> I got more tables but the others are not interesting in the specific
> query i want to make.
> 
SELECT artist.name,produits.name,provider.name FROM artist LEFT JOIN
produits ON artist.ID=produits.artist_ID LEFT JOIN provider ON
produits.provider_ID=provider.ID WHERE provider.name LIKE 'some_name';



Robert




String functions like explode, strpos or str_replace seem to fail when
asked to work with "\n".
What can i do to tokenize or explode a string by linefeeds?

i replaced "\n" by another expression and it seems to work, but i'm
curious if there's a mor elegant solution...


cu
Jens

--
Grüße aus dem schönen Kleve
Jens Kisters

rosomm et partner
Agentur für neue Medien GmbH
Dienstleistungszentrum am
Weißen Tor - Eingang B
Gocher Landstrasse 2
47551 Kleve / Bedburg-Hau

Telefon: 02821 - 97856-20
Telefax: 02821 - 97856-77
[EMAIL PROTECTED]
http://www.rosomm-partner.de






Hi!

   I'm using PHP4, iODBC & OpenLink for the database connection and
communication.  After installing the iODBC (driver manager) & OpenLink
(driver), fix up the odbc.ini (part of iODBC or OpenLink) and did the
odbctest.  The test passed and it connect the linux to the MS-SQL Server and
I was able to execute the SQL command without a problem.

  Now come the next part, website database connection.  I wrote the script
for the odbc connection, it doesn't work.  I got the error message.

================================================================
   "Warning: SQL error: [OpenLink][ODBC]RPC: Unknown host, SQL state 08004
in SQLConnect in /home/website/test.php on line 15
Can not connect to DSN: Server --> Test_CMS"
================================================================

  It look like that PHP can't set the environment variable or put in the
environment variable.  The script I wrote down is ....

putenv("LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH");
putenv("ODBCINSTINI=/usr/local/bin/odbcinst.ini");
putenv("ODBCINI=/usr/local/bin/odbc.ini");

  Why does the PHP environment varible doesn't work?  What can I do about
it?  Does caldera have problem with that?

Thanks,
 Scott






Hi,

I am finalizing a new web site that needs to be live this week-end 
and I still have a problem to receive HTML email send from a web page 
using implode in php.  Help to fix the problem will be VERY much 
appreciated...

Please reply directly to [EMAIL PROTECTED] ... thanks

Here is the php script I use ... very simple

$mailbody = implode("",file("$Page"));
$mailheaders = "From: ".$FullName." <".$from.">\nMime-Version: 
1.0\nContent-type: text/html\nContent-Transfer-Encoding: 7bit\n";
mail($to, $subject1, $mailbody, $mailheaders);

At the bottom of the page 
http://www.gondwanastudio.com/Expedition/AvantPremiere.html, there is 
a small form to send a resume of the page to an email address.

The http://www.gondwanastudio.com/Expedition/Episodes/Page_001.html 
which is imploded and sent is received ok but the link to the 
pictures are dead...

Why and how to fix it?

My optimal wish is to receive the email with embeded pictures, not 
lived links to the website pictures.  How can I modify the code of 
the page to work?

If this is too difficult, is it possible to have AT LEAST the live links?

Thanks in advance...
-- 

Kind regards, Paul.

Gondwana
[EMAIL PROTECTED]
http://www.gondwanastudio.com




Paul Godard wrote:
> 
> Hi,
> 
> I am finalizing a new web site that needs to be live this week-end
> and I still have a problem to receive HTML email send from a web page
> using implode in php.  Help to fix the problem will be VERY much
> appreciated...
> 
> Please reply directly to [EMAIL PROTECTED] ... thanks
> 
> Here is the php script I use ... very simple
> 
> $mailbody = implode("",file("$Page"));
> $mailheaders = "From: ".$FullName." <".$from.">\nMime-Version:
> 1.0\nContent-type: text/html\nContent-Transfer-Encoding: 7bit\n";
> mail($to, $subject1, $mailbody, $mailheaders);
> 
> At the bottom of the page
> http://www.gondwanastudio.com/Expedition/AvantPremiere.html, there is
> a small form to send a resume of the page to an email address.
> 
> The http://www.gondwanastudio.com/Expedition/Episodes/Page_001.html
> which is imploded and sent is received ok but the link to the
> pictures are dead...
> 
> Why and how to fix it?
> 
> My optimal wish is to receive the email with embeded pictures, not
> lived links to the website pictures.  How can I modify the code of
> the page to work?
> 
> If this is too difficult, is it possible to have AT LEAST the live links?
> 
> Thanks in advance...
> --
> 
> Kind regards, Paul.
> 
> Gondwana
> [EMAIL PROTECTED]
> http://www.gondwanastudio.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]


You use relative links to your images. It's not so weird that
someone who receives the page will not get the images with it. If
you want the images to be seen by the rcpt, you should use absolute
links to them. Usualy you wouldn't want to do that, I agree, but
when sending pages all over the world, there's pretty much no other
way. So e.g. the first image will be:

<IMG
src="http://www.gondwanastudio.com/Expedition/Episodes/xMedia/Logo/MiniLogo_BushWeb.gif"
width=" ... etc.

That way, the rcpts will be able to see the images.
-- 

* R&zE:




You are doing a string compare not date, convert them to a unix time stamp 
and then compare

$d1 = explode("-",$date1);
$d2 = explode("-",$date2);
$ts1 = mktime(0,0,0,$d1[1],$d1[2],$d1[0]);
$ts2 = mktime(0,0,0,$d2[1],$d2[2],$d2[0]);
if( $ts1 > $ts2 ):
         echo "Date 1 is greater than date2";
elseif($ts1 == $ts2):
         echo "date 1 is equal to date 2" ;
else:
         echo " date 2 is greater than date 1";
endif;

should work :)
Tom
At 09:50 AM 28/03/01 +0000, kaab kaoutar wrote:
>Hi!
>
>$date1="2001-1-7";$date2="2001-1-14";
>if ($date1>=$date2) echo "date1 is greater then date2";
>else echo "date2 is greater then date1";
>the result is the first :(
>but it works for other dates!
>
>Thanks
>
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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]





Hi,

I am using Apache 1.3.19 for Win32 and PHP 4.04 as a module. I would like to
retrieve, as a variable, the user name loged in the W2000 domain. Running
PHPINFO() function e it does not display USERNAME variable so I do not know
how to accomplish this task

Thanks






Hi,
I've installed freetype2 from source into the default locations, and 
modified the Makefile for GD to include TTF support. Added 
/usr/local/include/freetype2/ to the INCLUDE var.
When I try to make, lots of files compile fine but gdttf.c complains 
it can't find freetype.h.
If I add /usr/local/include/freetype2/freetype/ to the INCLUDE var (so it can
find freetype.h), it produces lots of compile errors. The first of 
these complains of a missing semicolon on a line which declares a 
TT_ENGINE struct in font_t.
If I do `grep -r TT_ENGINE /usr/local/include/freetype2/`, it doesn't 
find a thing.

Help!


Alexis Lee
-- 



Dr Ashley T. Howes Ph.D.                 [EMAIL PROTECTED]
Internet Developer                   http://www.turton.com
Turton Creative Marketing Solutions
23-27 St. Andrews Street, Norwich, Norfolk, NR2 4TP, UK
Tel:+44 (0)1603 766888              Fax:+44 (0)1603 767070 




Yup...That's what happened to me too. I got around it by installing Freetype
as a shared library and compiling GD without Freetype. Then I linked on both
Freetype and GD during PHP compile and this seems to work. I have had no
problems creating images with TTF.

Dean

-----Original Message-----
From: Ashley T. Howes Ph.D. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 10:13 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Compiling GD with freetype2


Hi,
I've installed freetype2 from source into the default locations, and 
modified the Makefile for GD to include TTF support. Added 
/usr/local/include/freetype2/ to the INCLUDE var.
When I try to make, lots of files compile fine but gdttf.c complains 
it can't find freetype.h.
If I add /usr/local/include/freetype2/freetype/ to the INCLUDE var (so it
can
find freetype.h), it produces lots of compile errors. The first of 
these complains of a missing semicolon on a line which declares a 
TT_ENGINE struct in font_t.
If I do `grep -r TT_ENGINE /usr/local/include/freetype2/`, it doesn't 
find a thing.

Help!


Alexis Lee
-- 



Dr Ashley T. Howes Ph.D.                 [EMAIL PROTECTED]
Internet Developer                   http://www.turton.com
Turton Creative Marketing Solutions
23-27 St. Andrews Street, Norwich, Norfolk, NR2 4TP, UK
Tel:+44 (0)1603 766888              Fax:+44 (0)1603 767070 

-- 
PHP General Mailing List (http://www.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 auth_user() {

exec(">xxxx");
        Header("WWW-Authenticate: Basic realm=\"My Realm\"");
        Header("HTTP/1.0 401 Unauthorized");
}

// Header("WWW-Authenticate: Basic realm=\"My Realm\"");

if (!isset($PHP_AUTH_USER)) {
//      echo "USER: $PHP_AUTH_USER";
        auth_user();
} else
        echo "else";

?>

Most likely I just don't understand how headers work. But let me explain the
problem I am having.


1. Close all instances of your browser (I am using IE-5.01 and I have not
tried any other browsers). However I don't believe it is a browser issue.

2. Run the script shown above.

3. Enter some user ID and password... Everything so far works fine.

4. Look in the directory where the script is stored. There should be a file
called xxxx. This indicates that auth_user has run.

5. Remove the file xxxx.

6. Refresh the browser. Look for the file xxxx. Notice that xxxx is present
which indicates that the  auth_user function was executed; which should only
happen if $PHP_AUTH_USER is NOT set....YET "else" was printed on screen
which indicates that $PHP_AUTH_USER IS set.

7. Uncomment the commented "header" line and notice that a user ID and
password prompt is always issued in this case.


My questions are:

1. Why are both sides of the conditional "If (!isset($PHP_AUTH_USER))" being
executed?

2. Why, when auth_user is being executed on subsequent refreshes, no prompt
for a new user ID and password is issued?

3. Why, if a authenticate header is sent before testing, a user ID and
password prompt is issued?




Hello,

I am trying to make a script that can add users and multiple things to a
linux box.  I have all teh programming issues solved except I need to make
this script root, or make it able to run anyhting it want to.  Is there a
way to make my php script liek a super user?

INFO: Redhat 7 Apache1.?

Thanks
Brandon Orther






On Thursday, March 29, 2001, at 08:32 AM, Nick Davies wrote:

> Doesn't the command return 1 or 0 in success or failure?
>
> You may not have a result
>
> Probably wrong but something like
>
> if (mysql_query($query)) {
>
> } else {
>
> }

What I understand is that the return from the query only tells you if 
the syntax is correct. NOT whether there were any records returned. That 
is what the mysql_num_rows gets you-- the number of records returned.

Terry




  Since I was not satisfied with the "official" Wordfiles provided by
UltraEdit.com I started to create my own one, which can be found in an
initial version in the "Projects" section of my homepage (URL see
below).

  My wordfile uses the funclist.txt from cvs.php.net, so it includes ALL
function names in order to syntax-highlight them.

  Have fun,
Sebastian

  PS: Feedback is welcome!

-- 
 sebastian bergmann                            [EMAIL PROTECTED]
                                       http://www.sebastian-bergmann.de

 bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de




  I just noticed that my domain provider has some problems, so
www.sebastian-bergmann.de is currently unreachable.

  Please use http://sb.rc5.de/ for the time beeing.

  Thanks for your patience,
Sebastian :-(

-- 
 sebastian bergmann                            [EMAIL PROTECTED]
                                       http://www.sebastian-bergmann.de

 bonn.phpug.de | www.php.net | www.phpOpenTracker.de | www.titanchat.de




Sebastian,

Thanks for the wordfile - a definite improvement. Good idea to have
regular and curly brackets a different colour! One of those things
that you wonder why you never thought of yourself...

Why don't you post the list on the UltraEdit site? As far as I know,
there is no "official" version - just what people submit.

Best of all, you have included a correct Regex for parsing out the
functions for the function list - it is broken in the version I have,
and I never got around to fixing it.

So thanks again - and anyone else using UltraEdit - it's well worth
making the change...

Geoff Caplan








Hello People,

I want to configure the version php-4.0.4pl1 on to a RS/6000 with AIX4.3.3.
IBM HTTP Server 1.3.12.0, IBM JDK 1.2.2, IBM DB2 UDB 6.1, IBM C-Compiler
3.6.4, LDAP-Server 3.2.0.
After unpacking the php-4.0.4pl1.tar-file under /usr/, parallel to the
HTTPServer, I used the configure-script as follws:

./configure --with-apache=/usr/HTTPServer/conf/httpd
--with-java=/usr/java_dev2 --with-ldap=/usr/ldap
--with-ibm-db2=/usr/lpp/db2_06_01

I got the same failure results using only the Apache-parameter:

./configure --with-apache=/usr/HTTPServer/conf/httpd

Output:

loading cache ./config.cache
checking for a BSD compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking whether to enable maintainer-specific portions of Makefiles... no
checking host system type... powerpc-ibm-aix4.3.3.0
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking for bison... no
checking for byacc... no
configure: warning: You will need bison if you want to regenerate the PHP
parsers.
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH

I can't imagine what that means!
Please help me,

Markus Mattes

e-mail: [EMAIL PROTECTED]






I have had this problem with exec, passthru with that configuration
aswell...

To read the files into an array, do this:
(http://www.php.net/manual/en/function.opendir.php)

<?php

if ($dir = @opendir("e:\\dir")) { // Notice the double "\\"
  while($file = readdir($dir)) {
    if ($file !="." && $file !="..") // If you don´t want the . and ..
       $files[] = $file;
    }
  }
  closedir($dir);
}

// Print the array
for ($i=0; $i<sizeof($files); $i++)

 echo $files[$i]."<br>";
}
?>

// Tobias

"SHAWN" <[EMAIL PROTECTED]> wrote in message
D1FF6C0809A9D411815D0050DA841BCC3EE5@ONSITESERVER">news:D1FF6C0809A9D411815D0050DA841BCC3EE5@ONSITESERVER...
> Using IIS5 on W2K Server, I can't get get the exec() or other similar
> commands to work.
>
> This is what I'm doing -
>
> exec( "dir/a-d/b $dir_name", $arFiles )
>
> The array doesn't contain anything! I've tried it with cmd.exe before the
> command, but it just seems to get stuck in a loop! Can anyone tell me how
to
> successfully use this command? Or if not, any other ideas on how to get
the
> file names inside a directory into an array?
>
> Thanks in Advance,
>
> Shawn Sellars
>
>






I have tried the online documentation and it either errors out on me or cannot 
find anything when I search on case.  Can someone tell me if PHP supports case 
statements (or do I just need to do a series of ifs?) and if so where I can 
find them detailed in the online docs?

Thnaks,
Allan





> I have tried the online documentation and it either errors 
> out on me or cannot find anything when I search on case.  
> Can someone tell me if PHP supports case statements (or 
> do I just need to do a series of ifs?) and if so where I can 
> find them detailed in the online docs?

You want:

switch();

Chris




Yes...

switch ($my_variable_to_case) {

        case "value_1":
                php-code-here;
        break;

        case "value_2":
                php-code-here;
        break;

        default:
                php-code-here;
}


It works exactly like c.

-----Original Message-----
From: acleave [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 11:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Case?


I have tried the online documentation and it either errors out on me or
cannot 
find anything when I search on case.  Can someone tell me if PHP supports
case 
statements (or do I just need to do a series of ifs?) and if so where I can 
find them detailed in the online docs?

Thnaks,
Allan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




acleave wrote:
> 
> I have tried the online documentation and it either errors out on me or cannot
> find anything when I search on case.  Can someone tell me if PHP supports case
> statements (or do I just need to do a series of ifs?) and if so where I can
> find them detailed in the online docs?

http://www.php.net/manual/en/control-structures.switch.php ?

-Egon

-- 
SIX Offene Systeme GmbH       ·        Stuttgart  -  Berlin 
Sielminger Straße 63   ·    D-70771 Leinfelden-Echterdingen
Fon +49 711 9909164 · Fax +49 711 9909199 http://www.six.de




on 3/29/01 12:14 PM, [EMAIL PROTECTED] splat open and thusly melted:

> if so where I can
> find them detailed in the online docs?

look under switch, in control structures.

-- 
:: Andrew Rush :: Lead Systems Developer :: MaineToday.com ::
**************************************************************************
"Crippled but free, blind all the time, i was learning to see"
 
- J. Garcia / R. Hunter
**************************************************************************
 
The  views expressed herein are not necessarily those of my employer, but
they let me have them anyway.





Hi, 

I have two database`s with one table in each. (MySQL) 

Is there a way that I can select data from one table and then match it with 
the data in another and discard the results so all I am left with is the 
original data from the first table which never matched up. 

Database1 

EmailAddress 
RecID - Email 

Database2 

Members 
lots of stuff blah blah 
Email 

So I would match the Email from Database1 Table EmailAddress to those in 
Database2 Members. Take out the matches and be left with a list of people who 
started signing up but never completed it. Any thoughts? 

Ade




Hi,

SELECT a.list FROM db1 a, db2 b WHERE a.email!=b.email;

this shoulds work

Johannes

<[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I have two database`s with one table in each. (MySQL)
>
> Is there a way that I can select data from one table and then match it
with
> the data in another and discard the results so all I am left with is the
> original data from the first table which never matched up.
>
> Database1
>
> EmailAddress
> RecID - Email
>
> Database2
>
> Members
> lots of stuff blah blah
> Email
>
> So I would match the Email from Database1 Table EmailAddress to those in
> Database2 Members. Take out the matches and be left with a list of people
who
> started signing up but never completed it. Any thoughts?
>
> Ade
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






On Thu, 29 Mar 2001 19:58:51 +0200, Johannes Janson
([EMAIL PROTECTED]) wrote:
>Hi,
>
>SELECT a.list FROM db1 a, db2 b WHERE a.email!=b.email;
>
>this shoulds work

no, this isn't even close. you need a left join, there's an example
in the mysql docs under left join that shows you how to do what you
want.

- Mark

>Johannes
>
><[EMAIL PROTECTED]> schrieb im Newsbeitrag
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> Hi,
>>
>> I have two database`s with one table in each. (MySQL)
>>
>> Is there a way that I can select data from one table and then
>>match it
>with
>> the data in another and discard the results so all I am left with
>>is the
>> original data from the first table which never matched up.
>>
>> Database1
>>
>> EmailAddress
>> RecID - Email
>>
>> Database2
>>
>> Members
>> lots of stuff blah blah
>> Email
>>
>> So I would match the Email from Database1 Table EmailAddress to
>>those in
>> Database2 Members. Take out the matches and be left with a list of
>>people
>who
>> started signing up but never completed it. Any thoughts?
>>
>> Ade
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: php-list-
>>[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: php-list-
>[EMAIL PROTECTED]






Hi,

I currently have sessions working nicely on my site, but I want to add a 
timeout feature. What would be the best method, grabbing the server time and 
setting it using the session_register, and then running a time check so if 
the session time is more than one hour old destroy it??

Ade




PHP will do this for you. See the setting "session.gc_maxlifetime" in the
php.ini file. This sets the session lifetime.

Kirk

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 10:37 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Sessions Q.
> 
> 
> Hi,
> 
> I currently have sessions working nicely on my site, but I 
> want to add a 
> timeout feature. What would be the best method, grabbing the 
> server time and 
> setting it using the session_register, and then running a 
> time check so if 
> the session time is more than one hour old destroy it??
> 
> Ade
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




Why I can get this to work?
I don't understand... I made another simple script that the only thing it 
did was the "build array/serialize it/register the session var/ => next 
page load unserialize it into array/update array/serialize it again".. and 
it worked like a charm...
I'm doing the exact same thing here but step_times gets registered empty... 
and script_total_time is OK...
and the weirdest part is that, when I uncomment the "echo ...", it displays 
perfectly the contents of $step_times as a string...

PLEASE?!?!?!

<pre>
                if(!isset($script_total_time))
                {
                        $script_total_time=(float)$total_time;
                        session_register("script_total_time");
                        $step_times_array[$step]=(float)$total_time;
                        $step_times=serialize($step_times_array);
                        //echo "step_times=\"$step_times\"";
                        session_register("step_times");
                }
                else
                {
                        $script_total_time+=(float)$total_time;
                        $step_times_array=unserialize($step_times);
                        $step_times_array[$step]=(float)$total_time;
                        $step_times=serialize($step_times_array);
                }
</pre>





Hi,
 
We are developing a shopping cart application are wondering if there are
any modules available to integrate with the different shipping
companies. An help would be greatly appreciated. 
 
Thanks,

Craig




Inline has a module called oshipc which integrates different shipping methods
from the same code.  It uses a database connection to connect to a driver which
does all the middle work.  If you need a new shipping method then you get 
another
driver.

Rick

At 11:19 AM 3/29/01 -0800, Craig Cameron wrote:
>Hi,
>
>We are developing a shopping cart application are wondering if there are
>any modules available to integrate with the different shipping
>companies. An help would be greatly appreciated.
>
>Thanks,
>
>Craig

##########################################################
#  Rick St Jean,
#  [EMAIL PROTECTED]
#  President of Design Shark,
#  http://www.designshark.com/
#  Quick Contact:  http://www.designshark.com/messaging.ihtml
#  Tel: 905-684-2952
##########################################################





Hello,

        Is there anyway I can have my script turn super user at the beginning when
it runs?

Brandon





Hi,
I'm working on another content management system, coz I can't find what I 
need out there.
Some features:
- multiple languages for everything
- multiple templates (so you can have a english-simple template version or 
a french-old style template version of the same page, all cached)
- easy to deploy sites with
- easy to hack
- focussed on content sites
- (simple so far) workflows
- multiple content types
- articles are versioned and can have multiple languages
- completely templated and sub-page level caching
- other content types: weblog, discussion
- RSS feeds
- mailing list manager (using ezmlm now)
- user login and stuff
- "edit this page" style ease of updating
- group based security
- directory manager, for metadata and directories
- ...

It is in the early stages, I've written quite a bit of code but it needs a 
few more weeks of hard work to get usable, and then months of more 
development probably to get all the cool goodies going :)

So: is there anyone interested in working on this. I'm not sure if I can 
get it to a 1.0 release on my own (even not incorporating all the above 
functionality), but with some help we could make it! And it would be rather 
unique, not another slashdot copy, or extremely advanced cms that you have 
to reconfigure your server for, and not a half baked guest book either (it 
seems most fall in one of these categories)

Please get in touch with me if you're interested.
The main important feature of it all is the international capability and 
the templating and caching and lots of content types and user management.

Peter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://liga1.com: building multiple language/culture websites





Hello All,

how do I compare 2 times.
What i want to do is
$time=date("H:i:s",mktime(0,1,03,0,0,0));
IF ($time > 00:00:35) { echo "Too High"};

when I do this all i ever get is
Too High no matter what the value of time is





Ok, in testing our site that heavily uses sessions I came across this error:

Warning: open(/tmp/sess_f3051699b0f1ae4a89570e66dab05de9, O_RDWR) failed: m (0) in 
/ora9ias/Apache/Apache/php/cisweb_global.inc on line 19

I can't figure out what causes it.  It just happens occasionally when I'm
calling a session_start() - does anyone know what this could be?

Mike



******************************************************************
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.
******************************************************************




Enter your vote today!  A new poll has been created for the group:

Which editor do you prefer??

   o Ultra Edit
   o Home Site
   o Edit Plus
   o Php Editor
   o Text Pad
   o Other


http://groups.yahoo.com/group/php-adv/polls

Note: Please do not reply to this message. Poll votes are
not collected via email. To vote, you must go to the web site listed above.

Thanks!
##########################################################
#  Rick St Jean,
#  [EMAIL PROTECTED]
#  President of Design Shark,
#  http://www.designshark.com/
#  Quick Contact:  http://www.designshark.com/messaging.ihtml
#  Tel: 905-684-2952
##########################################################



Reply via email to