[PHP] Changing file permissions - Help!

2002-03-03 Thread mojo jojo

Hi

First, thanks for reading my post...I tried to post this yesterday but it
disappeared - so if you've seen this before, please ignore it...

I am needing to change the permissions on a folder that is owned by 'usr'.
However, as I am trying to do this from a browser through php, I am browsing
as user 'nobody' and therefore I cannot change the directory permissions.

Some things to note. I know that you can change permissions through ftp or
telnet, however I am trying to design a system that can be installed simply
by uploading it and then working through a browser. Many of my customers who
will use the system use dreamweaver to upload and have never heard of chmod.
I do not want to have to manually set permissions on the directories for
them.

I am aware that php has some ftp functions and that these could possibly be
used to change the permissions. However, my ISP has not enabled these php
features and is unlikely to do so.

Is there another way? I know that you can use passthru() to chmod a dir (as
user 'nobody') - but that's about the extent of my knowledge.

Any help much appreciated.

Cheers

Pete








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




[PHP] Re: convert to lowercase

2002-03-04 Thread mojo jojo

$string = strtolower($string);

<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED].;
> What is the code to make a string into lower case?
>
>
> Regards,
> Joseph A. Bannon
>
>
>
>
>
>
>
>
>



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




[PHP] Re: php and form mails

2002-03-04 Thread mojo jojo

Hi

Try it like this


name="form[gender]" value="male">male

name="form[gender]" value="female">female

Cheers

Mojo

[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED].;
> I have this simple formmail written out in PHP, and it checks for required
> fields before sending out the email. If there is an empty required field,
> it shows the form again, but with the fields filled out (if any).
>
> A coding example for a filled-out input field:
>
> 
>
> or even as a pulldown menu:
>
> 
>  - Select Province/State -
>   ?>
> etc
>
> Now, I have a radio button selection, and I'm stumped at how to set it
> up so that if someone has selected a radio button, how do I show this?
>
> male
> female
>
> How would I show the selection if one of the radio buttons was selected?
>
> --
> Laurie Landry
> [EMAIL PROTECTED] - email
> (604) 693-1120 - voicemail/fax
>
>



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




[PHP] OOP .. I just don't get it.

2002-03-05 Thread mojo jojo

Hi

I've been using php for a while now but I have not got my head around OOP
(classes).

Why bother using them? I've read thru a few tutorials on using classes and
the examples given are quite simple. This is probably the problem - I just
can't see the benefit of using this style of programming.

Here is what I'm getting  at.

USING A CLASS-
class Table {

var $rows;
var $columns;

function MakeTable() {

draw a table with $this->columns as the number of columns
and $this->rows as the number of rows

}
}

$mytable = new Table;
$mytable->rows = 5;
$mytable->columns = 10;
$mytable->MakeTable();

---USING A NORMAL FUNCTION-

function MakeTable($rows,$columns) {

make a table with $rows as the number of rows
and $columns as the number of columns

}

$rows = 5;
$columns = 10;
MakeTable($rows,$columns);

---

Using a class doesn't appear to give me any benefits - in fact the code is
longer.

I know that you can spawn more instances of the same class which sounds
useful, however I can also run my function as many times as I like using
different variables.

What am I missing here?

Thanks

Mojo



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




[PHP] Re: OOP .. I just don't get it.

2002-03-05 Thread mojo jojo

Hi Phillip

Yes, thanks this does help.

The problem with the tutorials that I have seen so far is that they are very
simplistic and therefore do not reveal the benefits of this style of
programming.

If anybody knows of any good tutorials, I would appreciate a link.

Thanks

Peter (Mojo)


Philip Hallstrom <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED].;
> I'm not an OOP master, but I'll give it a shot.  In your example below
> you don't gain much from using OOP.  However, consider this example (all
> pseudo code)...
>
> class animal (
> function eat() ...
> function sleep() ...
> function walk() ...
> );
>
> class bird extends animal (
> function fly()...
> #inherits eat,sleep,walk
> );
>
>
> Now where this gets useful is when you want to create a class "duck".  You
> can just do this:
>
> class duck extends bird (
> function swim()...
> #inherits eat,sleep,walk,fly
> );
>
> What's nice about this is you don't need to know the implementation of the
> animal or bird class to do this. Heck you don't even need the source (just
> the compiled library).  All you need to know is the public functions (or
> methods).  However you still get all the functionality of an animal and
> bird.
>
> You also get some overhead, but that's the price you pay.
>
> Does that help?
>
> Search the net for OOP tutorial and I'm sure you'll find some better
> examples and reasons.
>
> -philip
>
> On Wed, 6 Mar 2002, mojo jojo wrote:
>
> > Hi
> >
> > I've been using php for a while now but I have not got my head around
OOP
> > (classes).
> >
> > Why bother using them? I've read thru a few tutorials on using classes
and
> > the examples given are quite simple. This is probably the problem - I
just
> > can't see the benefit of using this style of programming.
> >
> > Here is what I'm getting  at.
> >
> > USING A CLASS-
> > class Table {
> >
> > var $rows;
> > var $columns;
> >
> > function MakeTable() {
> >
> > draw a table with $this->columns as the number of columns
> > and $this->rows as the number of rows
> >
> > }
> > }
> >
> > $mytable = new Table;
> > $mytable->rows = 5;
> > $mytable->columns = 10;
> > $mytable->MakeTable();
> >
> > ---USING A NORMAL FUNCTION-
> >
> > function MakeTable($rows,$columns) {
> >
> > make a table with $rows as the number of rows
> > and $columns as the number of columns
> >
> > }
> >
> > $rows = 5;
> > $columns = 10;
> > MakeTable($rows,$columns);
> >
> > ---
> >
> > Using a class doesn't appear to give me any benefits - in fact the code
is
> > longer.
> >
> > I know that you can spawn more instances of the same class which sounds
> > useful, however I can also run my function as many times as I like using
> > different variables.
> >
> > What am I missing here?
> >
> > Thanks
> >
> > Mojo
> >
> >
> >
> > --
> > 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




RE: [PHP] OOP .. I just don't get it.

2002-03-05 Thread mojo jojo

Thanks to all those who contributed to the thread.

Very helpful.

Mojo



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




[PHP] Re: Proxy problems

2002-03-05 Thread mojo jojo

Hi

Try adding the following to the top of your pages



"Petre Agenbag" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi
> I'm suspecting that I am having proxy problems with one of my PHP/MySQL
> websites.
> I am getting strange behaviour that ( at this point) seem only logical
> to be due to proxy servers on the net holding outdated pages.
> I would like to know if there is a way to force the bypass of a proxy
> server or to deal with it in some way on a server side ( php script
> method) as I cannot rely on the co-operation of the clients to disable
> proxy settings of their browsers.
>
> Can someone please help me with this?
> Thank you.
>
>



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




[PHP] Re: capturing email adresses

2001-07-10 Thread mojo jojo

As far as I am aware, none of the major web browsers will reveal the email
address of the user to any website or web application. This is for privacy
reasons.

You will need to get your guests to enter their email address in a text
field to capture it for your records.

Pete

Scorpio1 <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi
>
> I am creating a guestbook for an intranet. In case I get people sending
> inappropriate messages to the guestbook I want to keep a log of
> visitor's emaill addresses.
>
> Is there a way in PHP of getting the web browsers email address?
>
> cheers dave
>
>
>



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