php-general Digest 20 Apr 2002 22:29:18 -0000 Issue 1298

Topics (messages 93798 through 93845):

Simple IF question
        93798 by: Denis L. Menezes
        93799 by: Tom Rogers
        93800 by: Tom Rogers
        93805 by: Jason Wong
        93813 by: Denis L. Menezes
        93814 by: Miguel Cruz
        93815 by: Denis L. Menezes
        93822 by: Jason Wong
        93826 by: Denis L. Menezes

CMS -- central module handling
        93801 by: Lauri Vain
        93831 by: Julio Nobrega
        93836 by: michael kimsal

Re: redirect browser
        93802 by: Joe
        93803 by: Jason Wong
        93807 by: eat pasta type fasta

Re: Attachments
        93804 by: Jason Wong
        93844 by: Jason Soza

Re: [PHP-DB] Re: [PHP] Re: Cross DB application
        93806 by: Richard Ellerbrock
        93839 by: SP

Learning PHP
        93808 by: Victor Javier Martinez Lopez
        93809 by: eat pasta type fasta
        93812 by: Tyler Longren
        93817 by: Boaz Yahav

$HTTP_*_VARS ?
        93810 by: Tobias Lindqvist

Re: .phps
        93811 by: Yasuo Ohgaki
        93816 by: phplists.woodenpickle.com

Re: PHP @ 24-hour programming competition
        93818 by: Dennis Moore

Re: Variable Inside Variable
        93819 by: Jeff Oien

Checking database for a value
        93820 by: Denis L. Menezes
        93824 by: Intruder
        93825 by: Miguel Cruz
        93827 by: Jason Wong
        93828 by: Jason Wong

$PHP_SELF empty when using Xitami Web Server
        93821 by: Ben Edwards
        93823 by: Jason Wong

Strange need - "Repeater" appliation
        93829 by: Peter Janett
        93845 by: Miguel Cruz

debugger
        93830 by: Evan
        93841 by: heinisch.creaction.de

test
        93832 by: Matthew Tapia

how to avoid executing whole script
        93833 by: Pushkar Pradhan
        93840 by: heinisch.creaction.de

WAP
        93834 by: Georgie Casey

mail() + attachement
        93835 by: Wolf-Dietrich von Loeffelholz
        93842 by: heinisch.creaction.de

$PHP_AUTH_USER
        93837 by: Alec M.
        93838 by: Craig Vincent

Comments Display, with replies
        93843 by: Julio Nobrega

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]


----------------------------------------------------------------------
--- Begin Message ---
Hello friends,

I have a registration form with a salutation field in a listbox, in which I
want that the registrant must choose a value other than the default value of
"please select". So I wrote :

If ((!$salutation="Please select")....
Print ("Sorry, please select a value in the salutation box");

However, it does not work. Can someone please help?

Denis

--- End Message ---
--- Begin Message ---
Hi
You need to use the double = in the if condition like

If ((!$salutation=="Please select")....
Print ("Sorry, please select a value in the salutation box");

Tom


At 08:17 PM 20/04/2002, Denis L. Menezes wrote:
>Hello friends,
>
>I have a registration form with a salutation field in a listbox, in which I
>want that the registrant must choose a value other than the default value of
>"please select". So I wrote :
>
>If ((!$salutation="Please select")....
>Print ("Sorry, please select a value in the salutation box");
>
>However, it does not work. Can someone please help?
>
>Denis
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Hi again
You can also write it as:
If (($salutation != "Please select")....
Print ("Sorry, please select a value in the salutation box");
Tom



At 08:29 PM 20/04/2002, Tom Rogers wrote:
>Hi
>You need to use the double = in the if condition like
>
>If ((!$salutation=="Please select")....
>Print ("Sorry, please select a value in the salutation box");
>
>Tom
>
>
>At 08:17 PM 20/04/2002, Denis L. Menezes wrote:
>>Hello friends,
>>
>>I have a registration form with a salutation field in a listbox, in which I
>>want that the registrant must choose a value other than the default value of
>>"please select". So I wrote :
>>
>>If ((!$salutation="Please select")....
>>Print ("Sorry, please select a value in the salutation box");
>>
>>However, it does not work. Can someone please help?
>>
>>Denis
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
On Saturday 20 April 2002 18:35, Tom Rogers wrote:
> Hi again
> You can also write it as:
> If (($salutation != "Please select")....
> Print ("Sorry, please select a value in the salutation box");
> Tom

Also the logic seems to be wrong, shouldn't it be:

 if (($salutation == "Please select") {
   print ("Sorry, please select a value in the salutation box"); }
 else {
   ...
 }

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Men often believe -- or pretend -- that the "Law" is something sacred, or
at least a science -- an unfounded assumption very convenient to governments.
*/
--- End Message ---
--- Begin Message ---
Hello Jason.

You are right, but it still does not work.

Could it be a trim word problem?
Thanks
Denis
----- Original Message -----
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 20, 2002 7:34 PM
Subject: Re: [PHP] Simple IF question


> On Saturday 20 April 2002 18:35, Tom Rogers wrote:
> > Hi again
> > You can also write it as:
> > If (($salutation != "Please select")....
> > Print ("Sorry, please select a value in the salutation box");
> > Tom
>
> Also the logic seems to be wrong, shouldn't it be:
>
>  if (($salutation == "Please select") {
>    print ("Sorry, please select a value in the salutation box"); }
>  else {
>    ...
>  }
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Men often believe -- or pretend -- that the "Law" is something sacred, or
> at least a science -- an unfounded assumption very convenient to
governments.
> */
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Why don't you print out $salutation and see what you're getting?

miguel

On Sun, 21 Apr 2002, Denis L. Menezes wrote:

> Hello Jason.
> 
> You are right, but it still does not work.
> 
> Could it be a trim word problem?
> Thanks
> Denis
> ----- Original Message -----
> From: "Jason Wong" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, April 20, 2002 7:34 PM
> Subject: Re: [PHP] Simple IF question
> 
> 
> > On Saturday 20 April 2002 18:35, Tom Rogers wrote:
> > > Hi again
> > > You can also write it as:
> > > If (($salutation != "Please select")....
> > > Print ("Sorry, please select a value in the salutation box");
> > > Tom
> >
> > Also the logic seems to be wrong, shouldn't it be:
> >
> >  if (($salutation == "Please select") {
> >    print ("Sorry, please select a value in the salutation box"); }
> >  else {
> >    ...
> >  }
> >
> > --
> > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> > Open Source Software Systems Integrators
> > * Web Design & Hosting * Internet & Intranet Applications Development *
> >
> > /*
> > Men often believe -- or pretend -- that the "Law" is something sacred, or
> > at least a science -- an unfounded assumption very convenient to
> governments.
> > */
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

--- End Message ---
--- Begin Message ---
Thanks Gentlemen.

After many experiments, I found the answer. It should be "= =" and not "=".

thanks for all yr help.
Denis
----- Original Message -----
From: "Miguel Cruz" <[EMAIL PROTECTED]>
To: "Denis L. Menezes" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, April 21, 2002 12:10 AM
Subject: Re: [PHP] Simple IF question


> Why don't you print out $salutation and see what you're getting?
>
> miguel
>
> On Sun, 21 Apr 2002, Denis L. Menezes wrote:
>
> > Hello Jason.
> >
> > You are right, but it still does not work.
> >
> > Could it be a trim word problem?
> > Thanks
> > Denis
> > ----- Original Message -----
> > From: "Jason Wong" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, April 20, 2002 7:34 PM
> > Subject: Re: [PHP] Simple IF question
> >
> >
> > > On Saturday 20 April 2002 18:35, Tom Rogers wrote:
> > > > Hi again
> > > > You can also write it as:
> > > > If (($salutation != "Please select")....
> > > > Print ("Sorry, please select a value in the salutation box");
> > > > Tom
> > >
> > > Also the logic seems to be wrong, shouldn't it be:
> > >
> > >  if (($salutation == "Please select") {
> > >    print ("Sorry, please select a value in the salutation box"); }
> > >  else {
> > >    ...
> > >  }
> > >
> > > --
> > > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> > > Open Source Software Systems Integrators
> > > * Web Design & Hosting * Internet & Intranet Applications Development
*
> > >
> > > /*
> > > Men often believe -- or pretend -- that the "Law" is something sacred,
or
> > > at least a science -- an unfounded assumption very convenient to
> > governments.
> > > */
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
On Sunday 21 April 2002 00:27, Denis L. Menezes wrote:
> Thanks Gentlemen.
>
> After many experiments, I found the answer. It should be "= =" and not "=".

Surely you mean "==", which more than one person has already pointed out?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Some people have a great ambition: to build something
that will last, at least until they've finished building it.
*/
--- End Message ---
--- Begin Message ---
Yes Jason, You are right. However, I missed the == in my over-enthusiasm.

Thanks and sorry.
Denis
----- Original Message -----
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, April 21, 2002 1:06 AM
Subject: Re: [PHP] Simple IF question


> On Sunday 21 April 2002 00:27, Denis L. Menezes wrote:
> > Thanks Gentlemen.
> >
> > After many experiments, I found the answer. It should be "= =" and not
"=".
>
> Surely you mean "==", which more than one person has already pointed out?
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Some people have a great ambition: to build something
> that will last, at least until they've finished building it.
> */
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Hello there, 

I'm seriously researching some aspects of writing a content management
system that would be 'relatively' easy to extend. 

My biggest problem is the ground level -- how should the central system
(that registers modules) work? Ideally, it should be possible to easily
extended the system -- running the install.php file (or something
similar) will tell (insert new database rows or will add new rows to the
configuration file) the central module that a new module was just added
and also gives instructions, how to use it, with which other modules it
integrates and where the new files are. 

The basic idea is that modifications to existing files (modules)
shouldn't be made (except the central module, which handles all others).
Each module should be totally *independent*, but should still integrate
with the rest of the modules (when marked as possible in the database).
What I mean by 'integrate' is the following: there are two modules, for
example, "image gallery" and "articles". Both of them should appear in
"What's new" part (when the appropriate checkbox will be checked). Also,
it would be nice when one could choose the option "Publish to articles"
when inserting a new image gallery (a client event for example -- story
in pictures). Yes, that's a simplified example. 

So, the problem is that there might only be the "article" module at
first. Later, the "articles" and "What's new" module will be added and
all three of them should now work together. I hope you catch my drift. 

I have quite a few ideas, but I'm sure that our team is just
re-inventing the wheel. What are your experiences? Are there any good
books on the subject of creating an extendable content management system
(preferably from the coders point of view, but not language-specific). 

Thanks,
Lauri
--
Tharapita Creations
[server-client web applications]
[EMAIL PROTECTED]
Mobile: +372 53 410 610 

--- End Message ---
--- Begin Message ---
  Hi!

  I have tried to make a complete modular php cms system. The hardest part
was not selecting which modules to load, but their presentation. I don't
know if what I did was good enough, i.e: the best implementatin, but
somewhat was working.

  What I did was basically query a Mysql table, selecting rows with this
information:

area_id
area_style
area_modules

  "area" was a part of a what I called in my system "canvas". A canvas is
the page, and each "area" was the position of the module in the screen. So:

area_id = 1
area_style = '<div style="width:25%;float:left;border:1px black solid;">'
area_modules = "system/articles/[module]system/stats/[module]user/forum/"

  So I would do:

while(list($idarea,$area_style,$area_modules) = $area_sql_result()) {
    ?><div style="<?php echo $area_style; ?>">
    <?php
   $area_modules = explode('[module]',$area_modules);
   foreach($area_modules as $module_path) {
       require_once ($module_path);
   }
   ?>    </div>
<?php
}

  Indeed, you can see the performance is not very good. A require inside a
foreach, inside a while? But still, it was very easy to manage. A new module
would require you to upload the file, and modify "area_modules".

  After this stage, I was stuck at the "canvas/area" concept. I simply did
not managed to make a good way to let the module know where it should appear
on the page.

  But, I guess you are indeed trying to reinvent the wheel, like I was ;-)

  I would recommend that you look at "PostNuke", a php script that I heard
was trying to accomplish a more modular design. Maybe they have succeed, I
don't know (been a while since I have looked).

  And if you want serious a serious cms, have a look at "Zope", written in
Python. They at least have a large documentation, including for developers.
Maybe in there you can gently 'steal' good programming ideas :-D
--
Julio Nobrega.

T chegando:
http://www.inerciasensorial.com.br
"Lauri Vain" <[EMAIL PROTECTED]> wrote in message
000301c1e856$f357e5e0$1431a8c0@tharapita">news:000301c1e856$f357e5e0$1431a8c0@tharapita...
> Hello there,
>
> I'm seriously researching some aspects of writing a content management
> system that would be 'relatively' easy to extend.
>
> My biggest problem is the ground level -- how should the central system
> (that registers modules) work? Ideally, it should be possible to easily
> extended the system -- running the install.php file (or something
> similar) will tell (insert new database rows or will add new rows to the
> configuration file) the central module that a new module was just added
> and also gives instructions, how to use it, with which other modules it
> integrates and where the new files are.
>
> The basic idea is that modifications to existing files (modules)
> shouldn't be made (except the central module, which handles all others).
> Each module should be totally *independent*, but should still integrate
> with the rest of the modules (when marked as possible in the database).
> What I mean by 'integrate' is the following: there are two modules, for
> example, "image gallery" and "articles". Both of them should appear in
> "What's new" part (when the appropriate checkbox will be checked). Also,
> it would be nice when one could choose the option "Publish to articles"
> when inserting a new image gallery (a client event for example -- story
> in pictures). Yes, that's a simplified example.
>
> So, the problem is that there might only be the "article" module at
> first. Later, the "articles" and "What's new" module will be added and
> all three of them should now work together. I hope you catch my drift.
>
> I have quite a few ideas, but I'm sure that our team is just
> re-inventing the wheel. What are your experiences? Are there any good
> books on the subject of creating an extendable content management system
> (preferably from the coders point of view, but not language-specific).
>
> Thanks,
> Lauri
> --
> Tharapita Creations
> [server-client web applications]
> [EMAIL PROTECTED]
> Mobile: +372 53 410 610
>


--- End Message ---
--- Begin Message ---
Lauri Vain wrote:
> Hello there, 

Hello

> 
> I'm seriously researching some aspects of writing a content management
> system that would be 'relatively' easy to extend. 
> 
> My biggest problem is the ground level -- how should the central system
> (that registers modules) work? Ideally, it should be possible to easily
> extended the system -- running the install.php file (or something
> similar) will tell (insert new database rows or will add new rows to the
> configuration file) the central module that a new module was just added
> and also gives instructions, how to use it, with which other modules it
> integrates and where the new files are. 

I think you're attacking the wrong problem first, especially
coming up with a system which defines what modules something else can
'integrate' with.  If your modules are designed as essentially 
standalone pieces of code, any of them should be able to 'integrate' 
(or, perhaps a better term, interoperate) with each other with little 
pain, even if it's not what was originally designed for one or more of 
the pieces of code in question.

You'd do better to focus on a common i/o system which the core system 
uses to talk to each module.


> 
> The basic idea is that modifications to existing files (modules)
> shouldn't be made (except the central module, which handles all others).
> Each module should be totally *independent*, but should still integrate
> with the rest of the modules (when marked as possible in the database).
> What I mean by 'integrate' is the following: there are two modules, for
> example, "image gallery" and "articles". Both of them should appear in
> "What's new" part (when the appropriate checkbox will be checked). Also,
> it would be nice when one could choose the option "Publish to articles"
> when inserting a new image gallery (a client event for example -- story
> in pictures). Yes, that's a simplified example. 

You need to better define a module, I guess.  I our case (with 
http://www.logicreate.com) a 'module' is a separate section of code 
pieces.  Sometimes as little as two (one logic/one display) and 
sometimes many more).  Our 'forum' system, for example, has I believe 8 
files.  Your requirement about *never* changing any files is, imo, 
impossible.  *something* will always need to be changed for various 
implementations, even if it's just one visual change someone wants.


> 
> So, the problem is that there might only be the "article" module at
> first. Later, the "articles" and "What's new" module will be added and
> all three of them should now work together. I hope you catch my drift. 
> 

You could possibly look at phpgroupware.org to see how they implement 
the 'addition' of modules (different from how we handle it, but perhaps 
a bit more in line with what you're describing)


> I have quite a few ideas, but I'm sure that our team is just
> re-inventing the wheel. What are your experiences? Are there any good
> books on the subject of creating an extendable content management system
> (preferably from the coders point of view, but not language-specific). 
> 
> Thanks,
> Lauri




Michael Kimsal
http://www.phphelpdesk.com
734-480-9961

--- End Message ---
--- Begin Message ---
may be my message are hazy.
the line =================
is not include in my php code/page, i just use it in this message as to
divide
into different section.

Joe

"Jason Wong" <[EMAIL PROTECTED]>
???????:[EMAIL PROTECTED]
> On Saturday 20 April 2002 09:26, Joe wrote:
>
>
> > =====================
> >
> > <?php
>
>
>
> > ====================
> > Warning: Cannot add header information - headers already sent
> > by (output started at c:\html\html\check.php:4) in
> > c:\html\html\check.php on line 42
> > ====================
> >
> > I had no idea about this.
> > Can anyone tell me what's wrong of my code?
>
> You cannot have anything between the beginning of the file and your <?php
> tag. Not even whitespace (spaces, tabs, newlines etc).
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> A real person has two reasons for doing anything ... a good reason and
> the real reason.
> */


--- End Message ---
--- Begin Message ---
On Saturday 20 April 2002 18:49, Joe wrote:
> may be my message are hazy.
> the line =================
> is not include in my php code/page, i just use it in this message as to
> divide
> into different section.

Whatever, the answer is still the same:

> > You cannot have anything between the beginning of the file and your <?php
> > tag. Not even whitespace (spaces, tabs, newlines etc).

Check all your include() files as well for any stray space.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
"Lead us in a few words of silent prayer."
-- Bill Peterson, former Houston Oiler football coach
*/
--- End Message ---
--- Begin Message ---
make sure that this script is not insterted into an html document but 
it's a stand alone  page eg. checkstudent.php. When the student submits 
their number your form should bring them here (<form 
action="checkstudent.php" method="post">) and the page will do its job. 
Make sure however that there is no output (don't print to screen) on that 
page except error messages in your if statements or you will get errors.

R>

>I had developed the web-based survey for student.
>And I need to check that each only fill in the form once time.
>So I write following code to check if the student number
>exist in the database or not.
>if yes, don't let them to fill in again.
>if no, redirect the browser to the page for them to fill in.
>
>=====================
>
><?php
>
> @ $db = mysql_pconnect("localhost", "survey", "survey");
>
> if (!$db)
> {
>  echo "Error: Could not connect to database.";
>  exit;
> }
>
> mysql_select_db("survey");
> $query = mysql_query("select * from surveydb where studno = '$studno'");
> $result = mysql_num_rows($query);
>
> if ($result>=1)
> {
>  echo "Student Number $studno already existed in the database.<br><br>"
>  ."You don't need to input again!";
> }
> else
> {
>  header("Location: http://www.XXX.edu/index.php";);
>  exit;
> }
>?>
>
>=====================
>
>the code can check the student no. are exist in database or not
>but the browser don't redirect to the page if student not exist
>in database and display the following error code:
>
>====================
>Warning: Cannot add header information - headers already sent
>by (output started at c:\html\html\check.php:4) in
>c:\html\html\check.php on line 42
>====================
>
>I had no idea about this.
>Can anyone tell me what's wrong of my code?
>
>Thx!
>
>Joe
>
>
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>


________________________--__-______-______________
eat pasta
type fasta

--- End Message ---
--- Begin Message ---
On Saturday 20 April 2002 18:25, Jason Soza wrote:
> Sorry for the thread thing, I wasn't aware I was causing probs. I usually
> just use "Reply" to save having to enter the e-mail address, just laziness.
> I'll keep from doing in this in the future, thanks for letting me know.

Thanks, you'll annoy fewer people :)

> I'm using 'POST' in my forms - any other ideas or places I could check?
> Thanks again.

There are a couple of settings in php.ini you could look at:

post_max_size
upload_max_filesize


Have you tried varying size attachments to see at what point the attachments 
become truncated?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Refreshed by a brief blackout, I got to my feet and went next door.
-- Martin Amis, _Money_
*/
--- End Message ---
--- Begin Message ---
They actually vary as to where they become truncated - some are at 633
bytes, some are at 1kb. The odd thing is that the PHP script I'm using to
process the form actually pics up the correct filesize, it reports it to me
under a $filesize variable I've setup. It'll report, say file2_filesize...:
69147 but the actual attachment is 1kb.

Like I said, I have this same problem using both Perl scripts and PHP
scripts. In php.ini my post_max size is 8M and upload_max_filesize is 2M.
Looking through the Apache mailing list archives, it looks like others
running Apache on win32 have experienced the same problems, but there are no
answers. I'm a little stumped myself!

I've found that even PHP upload scripts I've gotten from hotscripts.com
don't execute correctly either. A bit discouraging, as this problem is
seriously affecting a website I was hoping to have completed this weekend.

Thanks for your help,
Jason

-----Original Message-----
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 20, 2002 3:32 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Attachments

> I'm using 'POST' in my forms - any other ideas or places I could check?
> Thanks again.

There are a couple of settings in php.ini you could look at:

post_max_size
upload_max_filesize


Have you tried varying size attachments to see at what point the attachments
become truncated?

--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Refreshed by a brief blackout, I got to my feet and went next door.
-- Martin Amis, _Money_
*/

--- End Message ---
--- Begin Message ---
On Thu, 18 Apr 2002 16:05:13 +0200, Manuel Lemos wrote:

> Hello,
> 
> Sp wrote:
>> 
>> Hi Manuel, I still don't see a problem in others telling their
>> experiences with certain packages.  If someone has just used metabase
>> or has just used adodb then I would like to hear how easy/hard it was
>> to port to another database.
> 
> Sure, but what I meant is that since most people only have experienced
> one or the other, you only hear from people that can't compare both.
> 
> If you want to hear experiences of people that tried Metabase, try
> asking in Metabase mailing list (
> http://groups.yahoo.com/group/metabase-dev/ ) or BinaryCloud mailing
> lists ( http://binarycloud.tigris.org/servlets/ProjectMailingListList ).
> I think Alex Black (BinaryCloud project leader) has tried both MySQL and
> Oracle with Metabase.

I have done MySQL (MyISAM, INNODB), PostgreSQL and Oracle 9i with AdoDB -
see http://iptrack.sourceforge.net. Works just fine for me. The hardest
part was to get around limitations of certain databases - like Oracle
does no support record count. This is not impossible to get around, but
when you are used to making use of these standard features of other
databases, it takes a bit of getting used to. Other issues are syntax
issues - you cannot use any funky functions which are unique to your dbf.
Also, you must write very standard SQL - no shortcuts. For example, with
Oracle you MUST specify the table name throughout your query when doing
joins, even if the column is unambiguos.
--- End Message ---
--- Begin Message ---
Thanks Richard, just starting out but keeping portability in the back of my
mind.  I've been keeping the sql statements standard and doing everything
through php so I don't get caught when moving to another database.



-----Original Message-----
From: Richard Ellerbrock [mailto:[EMAIL PROTECTED]]
Sent: April 20, 2002 8:18 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: [PHP-DB] Re: [PHP] Re: Cross DB application


On Thu, 18 Apr 2002 16:05:13 +0200, Manuel Lemos wrote:

> Hello,
>
> Sp wrote:
>>
>> Hi Manuel, I still don't see a problem in others telling their
>> experiences with certain packages.  If someone has just used metabase
>> or has just used adodb then I would like to hear how easy/hard it was
>> to port to another database.
>
> Sure, but what I meant is that since most people only have experienced
> one or the other, you only hear from people that can't compare both.
>
> If you want to hear experiences of people that tried Metabase, try
> asking in Metabase mailing list (
> http://groups.yahoo.com/group/metabase-dev/ ) or BinaryCloud mailing
> lists ( http://binarycloud.tigris.org/servlets/ProjectMailingListList ).
> I think Alex Black (BinaryCloud project leader) has tried both MySQL and
> Oracle with Metabase.

I have done MySQL (MyISAM, INNODB), PostgreSQL and Oracle 9i with AdoDB -
see http://iptrack.sourceforge.net. Works just fine for me. The hardest
part was to get around limitations of certain databases - like Oracle
does no support record count. This is not impossible to get around, but
when you are used to making use of these standard features of other
databases, it takes a bit of getting used to. Other issues are syntax
issues - you cannot use any funky functions which are unique to your dbf.
Also, you must write very standard SQL - no shortcuts. For example, with
Oracle you MUST specify the table name throughout your query when doing
joins, even if the column is unambiguos.

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


--- End Message ---
--- Begin Message ---
I'm started with PHP and I'm interested in find any place
with some docs and example code. Can anyone help me?

Thanks in advance.

--- End Message ---
--- Begin Message ---
I started here it was pretty good, then ofcourse I bought a thick ass 
book:
http://www.mysql.com/articles/ddws/index.html

R>

>I'm started with PHP and I'm interested in find any place
>with some docs and example code. Can anyone help me?
>
>Thanks in advance.
>
>


________________________--__-______-______________
eat pasta
type fasta

--- End Message ---
--- Begin Message ---
I suggest you buy a book called PHP Essentials by Julie C. Meloni. That's a
great book for php beginners.  It comes with a bunch of example code.  It's
really well written.

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

----- Original Message -----
From: "Victor Javier Martinez Lopez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 20, 2002 8:40 AM
Subject: [PHP] Learning PHP


I'm started with PHP and I'm interested in find any place
with some docs and example code. Can anyone help me?

Thanks in advance.



--- End Message ---
--- Begin Message ---
http://www.weberdev.com

Sincerely

      berber

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


-----Original Message-----
From: Victor Javier Martinez Lopez [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 20, 2002 3:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Learning PHP


I'm started with PHP and I'm interested in find any place
with some docs and example code. Can anyone help me?

Thanks in advance.

--- End Message ---
--- Begin Message ---
Hi there.
Hoe come I cant use $HTTP_*_VARS in my script ? I have register_globals
on, track vars is also on and i have made the necessary changes in my
apache config ( the ALLOWOVERRIDE ALL ). My system is Win XP, Apache (
newest ) and newest PHP release.

Thanks.

--- End Message ---
--- Begin Message ---
Mantas Kriauciunas wrote:
> Hey [EMAIL PROTECTED],
> 
>  as i understand files .phps should view code nice and in colors...
>  but when i set up everything good in http.conf and (as i think)
>  everything is perfect.... it wants me to download that .phps
>  file...what can be wrong? im using PHPTriad on win2k
> 
>  thank you

Don't even try to use it. It's a obsolete feature.
use show_source() instead. It always works.
(Read .phps does not work always, even if you
set things up right)

--
Yasuo Ohgaki

--- End Message ---
--- Begin Message ---
If your browser is trying to download the file it's because the web server
isn't configured to recognize the file type. In your httpd.conf file you
should have a line similar to the following:

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

In order to do what you are wanting, you also need a line similar to the
following:

AddType application/x-httpd-php-source .phps

That alone won't finish the job. You also have to make a copy of the .php
file with a .phps extension. Or, of you are on Linux, you can simply do an
'ln -s original.php original.phps' and use the .phps link to display the
source.

This is the way apache does it. You can also do the same thing manually in a
php script using highlight_file() or as already mentioned, the show_source()
command which is just an alias for highlight_file(). Either way will produce
the same results since Apache simply send the command through mod_php. This
is really more of an apache question involving php.

Later,

Bob Weaver

"Mantas Kriauciunas" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey [EMAIL PROTECTED],
>
>  as i understand files .phps should view code nice and in colors...
>  but when i set up everything good in http.conf and (as i think)
>  everything is perfect.... it wants me to download that .phps
>  file...what can be wrong? im using PHPTriad on win2k
>
>  thank you
>
> :------------------------------:
>         Have A Nice Day!
>  Mantas Kriauciunas A.k.A mNTKz
>
> Contacts:
> [EMAIL PROTECTED]
> Http://mntkz-hata.visiems.lt
>


--- End Message ---
--- Begin Message ---
This sounds interesting... I am not familiar enought with PHP-GTK to give an
informed opinion.  I think your decision should be based on how familiar
with the tools you take into the contest.    Since you are not face with a
lot of time, will your competition be using Visual IDEs to aid the rapid
development?

You may wnat to post to one of the php-gtk-* lists.  They may be able to
address your needs in more detail.

Good luck!!



If you choose to use PHP, please post the results of the contest to the
list.  It should be interesting.



----- Original Message -----
From: "Visontay Peter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 19, 2002 7:43 PM
Subject: [PHP] PHP @ 24-hour programming competition


> Hi!
>
> I have quite an unusual problem for you :) There will be a 24-hour
> programming competition at our university, where teams of 3 have one
> day to solve a complex problem (which will be revealed on the day
> of the competition). Teams cannot get help from "outside", so no outward
> network / phone communication is available, but you can use anything you
> take there with you (any development tools, books, pre-written software
> etc.)
>
> The language in which you write the software is up to you, the most
> popular choices being C++ and Java - but this year our team are going
> to use PHP (and PHP-GTK).
>
> The big question is: will PHP be enough for the whole project, or will
> we need something else (like external C/Java modules)?
> Last year the task was to write an artificially intelligent soccer game
> based on a client-server architecture: there was a server acting like
> some kind of game controller (referee) and 2D display screen, while
> the automated clients (players) were playing individually according
> to the game's rules and some simulated information on what they 'see'
> at the time.
>
> It's said that it will be something quite different this year -
> but required knowledge includes:
> algorithm theory, information and code theory, artificial intelligence,
> queuing, databases, client-server architectures, computer networks,
> control theory, 2D graphic programming and software ergonomy.
> All this in 24 hours - nice, eh? :)
>
> So the question again - are there any parts of all this where you think
> PHP will not be enough? (Apart from the graphics, for which we'll use
> PHP-GTK). If so, what kind of outside module integration do you
> recommend for us?
> Also, which PHP sites / resources / code libraries do you think we should
> (recursively) download which might help us a lot? (Apart from php.net,
> of course.)
>
> We're really interested in your opinions - is this feasible or
> are we just plain mad? :)
>
> Thanks,
> Peter Visontay
> http://prodigycenter.com/cv/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
> On Fri, 19 Apr 2002, Jeff Oien wrote:
> >> Far better would be to put a placeholder in $body like @@@ and then just 
> >> do $body = ereg_replace('@@@', $url, $body);
> > 
> > That's giving me a blank also. The form for changing the email is in a 
> > password protected area where only two people are allowed. But I'll
> > implement the more secure version when I can get it to work. Thanks
> > for the help.
> 
> If that's giving you a blank then something else is wrong in your code.  
> This definitely does work:
>  
>    $body = "Hello, and thank you. Please visit the site @@@.";
>    $url = "http://boogers.on.toast/";;
>    $body = ereg_replace('@@@', $url, $body);
> 
> Start from the simplest case, verify that it works, and then work out to
> include all the other funky stuff you've got going on.
> 
> miguel

What I meant was this is giving me a blank still:
$body = eval("return \"{$body}\";");
Just to clarify. I will be trying to narrow down the problem later today.
Jeff Oien 
--- End Message ---
--- Begin Message ---
hello friends,

I am looking into 4 books in front of me but somehow cannot find the
following :

I have a field userid which the user fills in at registration. Before
entering the data into the database, I want to check if the userid exists in
the database.

Can someone tell me the name of the function I must use, I will look for the
rest in the php dictionary.

Thanks
Denis

--- End Message ---
--- Begin Message ---
DLM> I have a field userid which the user fills in at registration. Before
DLM> entering the data into the database, I want to check if the userid exists in
DLM> the database.


You have to SELECT that user from the table you store your users:
SELECT userid, name , etc FROM table WHERE userid='$your_id'
if *_num_rows() > 0 then he is already in, otherwise you can add him:
INSERT ..... INTO table ....

Enjoy!

--- End Message ---
--- Begin Message ---
On Sun, 21 Apr 2002, Denis L. Menezes wrote:
> I am looking into 4 books in front of me but somehow cannot find the
> following :
> 
> I have a field userid which the user fills in at registration. Before
> entering the data into the database, I want to check if the userid exists in
> the database.
> 
> Can someone tell me the name of the function I must use, I will look for the
> rest in the php dictionary.

Say you're using MySQL...

  $userid = 'bob';

  $sql = "select userid from user where userid='$userid'";
  $st = mysql_query($sql);
  if (mysql_num_rows($st))
  {
    print "<p>UserID <b>$userid</b> already in use.</p>";
  }
  else
  {
    print '<p>Now adding you to the database...</p>';
    // ...
  }

miguel

--- End Message ---
--- Begin Message ---
On Sunday 21 April 2002 00:55, Denis L. Menezes wrote:
> hello friends,
>
> I am looking into 4 books in front of me but somehow cannot find the
> following :
>
> I have a field userid which the user fills in at registration. Before
> entering the data into the database, I want to check if the userid exists
> in the database.
>
> Can someone tell me the name of the function I must use, I will look for
> the rest in the php dictionary.

AFAIK there are no built-in functions to do that. You need to run a query 
like "SELECT userid FROM table" then see whether any rows are returned. If 
you use this often you can wrap it up in a function.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
I'm reporting for duty as a modern person.  I want to do the Latin Hustle now!
*/
--- End Message ---
--- Begin Message ---
On Sunday 21 April 2002 01:10, Jason Wong wrote:
> On Sunday 21 April 2002 00:55, Denis L. Menezes wrote:
> > hello friends,
> >
> > I am looking into 4 books in front of me but somehow cannot find the
> > following :
> >
> > I have a field userid which the user fills in at registration. Before
> > entering the data into the database, I want to check if the userid exists
> > in the database.
> >
> > Can someone tell me the name of the function I must use, I will look for
> > the rest in the php dictionary.
>
> AFAIK there are no built-in functions to do that. You need to run a query
> like "SELECT userid FROM table" then see whether any rows are returned. If
> you use this often you can wrap it up in a function.

That of course should be:

  "SELECT userid FROM table WHERE userid='user_id_to_check'"

I better get some sleep :)

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Delta: We never make the same mistake three times.   -- David Letterman
*/
--- End Message ---
--- Begin Message ---
The variable $PHP_SELF seems to be blank, I am using PHP 4.1.2 and Xitami 
2.4d9 which are both the latest version.  Has anyone else had this problem 
and do they know how to fix it?

Ben

****************************************************************
* Ben Edwards                              +44 (0)117 9400 636 *
* Critical Site Builder    http://www.criticaldistribution.com *
* online collaborative web authoring content management system *
* Get alt news/viws films online    http://www.cultureshop.org *
* i-Contact Progressive Video      http://www.videonetwork.org *
* Smashing the Corporate image       http://www.subvertise.org *
* Bristol Indymedia               http://bristol.indymedia.org *
* Bristol's radical news             http://www.bristle.org.uk *
* PGP : F0CA 42B8 D56F 28AD 169B  49F3 3056 C6DB 8538 EEF8     *
****************************************************************
--- End Message ---
--- Begin Message ---
On Sunday 21 April 2002 00:51, Ben Edwards wrote:
> The variable $PHP_SELF seems to be blank, I am using PHP 4.1.2 and Xitami
> 2.4d9 which are both the latest version.  Has anyone else had this problem
> and do they know how to fix it?

use:

 print_r($GLOBALS) 

to verify.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
"The pathology is to want control, not that you ever get it, because of
course you never do."
-- Gregory Bateson
*/
--- End Message ---
--- Begin Message ---
I need to create a simple app that works like a radio repeater, in that is
simply passes information it receives through to another script, in both
directions.

In other words, a remote application located at www.domain.com/app.php
accepts variable1, variable2, and variable3, and returns a response based on
that information.

I want to put a "repeater app" in the middle of the browser and the url
above, so information is passed to www.mydomain.com/process.php, and is not
changed at all, but is sent to www.domain.com/app.php, and the response from
www.domain.com/app.php is sent back to www.mydomain.com/process.php, so the
results of sending the same information to either url will be exactly the
same.

I'm not trying to do packet sniffing or anything, just trying to "mask" a
url.  It would be nice if I could pass cookies through as well.

Any help, resources, ideas, etc appreciated.

Thanks,

Peter Janett

New Media One Web Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New Upgrades Are Now Live!!!
Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1
Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25,
Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PostgreSQL coming soon!

http://www.newmediaone.net
[EMAIL PROTECTED]
(303)828-9882


--- End Message ---
--- Begin Message ---
You may find it easier to use purpose-built tools such as Squid or 
Apache's mod_proxy.

http://www.squid-cache.org/
http://httpd.apache.org/docs/mod/mod_proxy.html

miguel

On Sat, 20 Apr 2002, Peter Janett wrote:
> I need to create a simple app that works like a radio repeater, in that is
> simply passes information it receives through to another script, in both
> directions.
> 
> In other words, a remote application located at www.domain.com/app.php
> accepts variable1, variable2, and variable3, and returns a response based on
> that information.
> 
> I want to put a "repeater app" in the middle of the browser and the url
> above, so information is passed to www.mydomain.com/process.php, and is not
> changed at all, but is sent to www.domain.com/app.php, and the response from
> www.domain.com/app.php is sent back to www.mydomain.com/process.php, so the
> results of sending the same information to either url will be exactly the
> same.
> 
> I'm not trying to do packet sniffing or anything, just trying to "mask" a
> url.  It would be nice if I could pass cookies through as well.
> 
> Any help, resources, ideas, etc appreciated.
> 
> Thanks,
> 
> Peter Janett
> 
> New Media One Web Services
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> New Upgrades Are Now Live!!!
> Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1
> Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25,
> Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> PostgreSQL coming soon!
> 
> http://www.newmediaone.net
> [EMAIL PROTECTED]
> (303)828-9882
> 
> 
> 
> 

--- End Message ---
--- Begin Message ---
Hi to all!!!
Can anyone tell me how to debug in PHP?
When I use ASP simply I write "stop" (VB) or "debugger" (JSCRIPT) to set a
breakpoint and open the Microsoft Script Debugger.
With PHP I can't find a way to do a similar thing.
I downloaded the DBG PHP debugger but I don't understand how to use it like
MSD.
My config is:
PHP 4.1.2 + IIS5 + WinXPpro

I'm bored to use echo "$something" for debug :-(

Thanks in advance for your help,
Evan


--- End Message ---
--- Begin Message ---
At 20.04.2002  21:15, you wrote:
>Hi to all!!!
>Can anyone tell me how to debug in PHP?
>When I use ASP simply I write "stop" (VB) or "debugger" (JSCRIPT) to set a
>breakpoint and open the Microsoft Script Debugger.
>With PHP I can't find a way to do a similar thing.
>I downloaded the DBG PHP debugger but I don't understand how to use it like
>MSD.
>My config is:
>PHP 4.1.2 + IIS5 + WinXPpro
>
>I'm bored to use echo "$something" for debug :-(
>
>Thanks in advance for your help,
>Evan
Im not shure, but ZEND offers some kind of IDE and nusphere has an IDE
which has a debugger built in , but who needs this??
Use an editor with macro functionality so u can set a macro which makes
something like if($debug){ echo something}, then you can set one var
to turn debugging on/off.
Are you shure you need PHP for your problems? Seems that youre lucky
with M$ and their ek$pen$ive environments.

Oliver

--- End Message ---
--- Begin Message ---
123456


--- End Message ---
--- Begin Message ---
Hi,
I'm new to php, I want to do the foll: in my code:
display an array of names to the user,
up, down, top and bottom buttons are provided so that the user can change
the order of the names (e.g. if original array: "a, b, c, d, e and user
selects e and presses top array should become e, a, b.....

I am able to achieve this functionality however since the whole script is
executed each time the array gets redefined after each button press thus
it remains a, b, c,d ...

Finally I've a submit button, if this is pressed user should be able to go
back and do whatever he was doing with the names.

my code looks like this:
define array
html for presentation (form which goes to function changelayerorder())
function changelayerorder (this func. detects which button and name was
selected and changes order)

I tried a while loop (while submit button not pressed) {do ...}
but it results in the page never being able to load.
CAN ANYONE ADVISE ME HOW TO AVOID REDEFINING THE ARRAY. THANKS,


-Pushkar S. Pradhan

--- End Message ---
--- Begin Message ---
At 20.04.2002  15:06, you wrote:
>
>Hi,
>I'm new to php, I want to do the foll: in my code:
>display an array of names to the user,
>up, down, top and bottom buttons are provided so that the user can change
>the order of the names (e.g. if original array: "a, b, c, d, e and user
>selects e and presses top array should become e, a, b.....
>
>I am able to achieve this functionality however since the whole script is
>executed each time the array gets redefined after each button press thus
>it remains a, b, c,d ...
>
>Finally I've a submit button, if this is pressed user should be able to go
>back and do whatever he was doing with the names.
>
>my code looks like this:
>define array
>html for presentation (form which goes to function changelayerorder())
>function changelayerorder (this func. detects which button and name was
>selected and changes order)
>
>I tried a while loop (while submit button not pressed) {do ...}
>but it results in the page never being able to load.
>CAN ANYONE ADVISE ME HOW TO AVOID REDEFINING THE ARRAY. THANKS,
>
>
>-Pushkar S. Pradhan
Just think, you send the page to the clients browser, you (PHP) dont have 
control
what happens on the clients side!
Maybe you can split the functionality in separate, so if the client sends 
some vars,
only a part depending on if, else or switch is done by php.
Or (as last option) use JavaScript, which is client  side but not always 
available.

Best is to redesign your software, pages to avoid such conflicts.
And, if you want to include all users just use html-code wich will work on 
most browsers.

HTH Oliver

--- End Message ---
--- Begin Message ---
How do I configure my Win98 Apache/MySQL/PHP test server to be able to show
me WAP pages. I followed a tutorial on PHPBuilder but when I test pages with
my WAP emulator, it returns a "empty page" error.

Does anyone know any other web links for configuring to WAP, especially for
WIN32


--- End Message ---
--- Begin Message ---
Is it possible to send with mail an attachment .. if yes, how ???

Greetings
wolf

--- End Message ---
--- Begin Message ---
At 20.04.2002  22:44, you wrote:
>
>Is it possible to send with mail an attachment .. if yes, how ???
>
>Greetings
>wolf
Hi Wolf,
just ask google, or the archives there are a few classes and functions
which will do what you want.
If you like OOP you will find certains under http://www.phpclasses.org

HTH Oliver

--- End Message ---
--- Begin Message ---
Hello,

I have trouble unseting the values of $PHP_AUTH_USER and $PHP_AUTH_PW. I use
the WWW-Authenticate via header() to authorize the user when accessing the
page. But when the user logs out, values in $PHP_AUTH_USER and PW seem to
remain and the user isn't asked again to authorize till a new browser window
is opened. I suppose that this problem should be solved by sending a proper
header() to end the session ... but which one? Of course, I could be wrong
:-) ... I would appreciate if anyone could help me to solve this.

regards,
Alec


--- End Message ---
--- Begin Message ---
> I have trouble unseting the values of $PHP_AUTH_USER and
> $PHP_AUTH_PW. I use
> the WWW-Authenticate via header() to authorize the user when accessing the
> page. But when the user logs out, values in $PHP_AUTH_USER and PW seem to
> remain and the user isn't asked again to authorize till a new
> browser window
> is opened. I suppose that this problem should be solved by
> sending a proper
> header() to end the session ... but which one? Of course, I could be wrong
> :-) ... I would appreciate if anyone could help me to solve this.

Unfortunately I can't find my notes so I can't give you an exact
answer....however if I remember correctly by sending a 401 error header to
the user when they log out it will force the browser to re-request
authentication

Sincerely,

Craig Vincent


--- End Message ---
--- Begin Message ---
  Hi list!

  I have maybe an easy to solve problem, but I haven't come with a logical
way to do it. I am builing a discussion site (a la Kuro5hin.org), and
there's a sql query to retrieve comments attached to an article. It grabs
their titles, along with some more informatio. What I want is to display the
comments and the replies below them. It's been implemented in thousands of
other scripts, but I can't figure out how to do with only one sql query
(even if it uses Joins). That's important, since I expect the site to be
very popular here in Brazil (let's hope!)

  So, any advices about how to display the comments like this:

- Comment 1
  - Comment 2
    - Comment 3

  Is greatly appreciated. I am thinking about storing all comments in an
array and construct the layout from there. But still, I don't know if it's
the best choice in performance terms.

  Thanks,

--
Julio Nobrega.

T chegando:
http://www.inerciasensorial.com.br


--- End Message ---

Reply via email to