RE: [PHP] Variable Problem

2002-01-19 Thread Philip Olson


Just to add a bit to this thread.  The following can be 
bad:

  
  
  

A potential gotcha.  Be sure to either define an array key 
and/or a value.  Because assuming all the above are checked, 
the following will result:

   $foo = array('on','on','on');

If two are checked, then we'll get:

   $foo = array('on','on');

Doesn't matter which two were checked :)  And as you 
guessed/know, if no value is set, 'on' will be the value as 
'on' is the default value for checkboxes.  And, if something 
is not checked, no value is passed at all.

That said, either do one of the following formats, feel 
free to mix and match, it doesn't matter.  Just know 
what you're doing :)

  

  

  

Then work with array foo as you see fit.  Be sure to read 
that faq (link posted earlier), it covers this.  Regarding 
your words, you guessed right, the second wrote over 
the first.  PHP requires [brackets] for arrays in forms.

And on a related note, a good way to "debug" arrays 
is through using print_r or var_dump.  You said you 
use PHP3, so use var_dump().

  var_dump($HTTP_POST_VARS);

It's been so long since PHP3 was cool, I barely remember 
how it works.  Maybe just try phpinfo() :)  But if 
track_vars are on, predefined php variables such 
as $HTTP_POST_VARS will exist.  And $foo should exist, 
anyway, enough on that.  Try hard to get PHP4 :)

  http://jp.php.net/manual/ja/language.variables.predefined.php

That page is in Japanese, hope it makes sense to you 
as it sure doesn't to me :)

Regards,
Philip Olson


On Sat, 19 Jan 2002, Steven Maroney wrote:

> 
> I hope im on the right track Cause im jumping in on this post.
> 
>  $MYCHK isn't an array cause you aren't using array syntax or simply left
> out the brackets.
> 
>  try:
> 
>  ( for the checkboxes )
>  
>  
> 
> I have done this 100's of times.
> 
> 
> Hope this helps,
> Steve
> 
> On Sat, 19 Jan 2002, K.Tomono wrote:
> 
> > Yes, I think too, it's better way to use an array rather than a dynamic
> >  name of the variable.
> > 
> > I thought that the first question means how to use a dynamic variable.
> > 
> > By the way,
> > 
> > > little array propaganda, jic  :)  Arrays work great in forms too!
> > >
> > >   http://www.php.net/manual/en/faq.html.php#AEN73718
> > 
> > Does this technique work fine on the version 3.0.14 later to 3.0.18
> >  of PHP? (Not PHP4)
> > 
> > I tried an array in forms simply like below in the other day,
> >  but this didn't work fine...
> > 
> > ( for the checkboxes )
> > 
> > 
> > 
> > Unfortunately, I had thought that it could be got as an array,
> >  but variable $MYCHK is overwritten by the last value "B" always.
> > 
> > (To mention about java servlet, this value could be retrieved by
> >  the syntax as below.
> > 
> > (HttpServletRequest)request.getParameterValues("MYCHK")[0]
> > 
> > off course, such a syntax occurs an error on PHP. ;D)
> > 
> > --
> > Well, I'll try the technique you mentioned.
> > Your offering is very appreciated.
> > Thank you!
> > :-]
> > 
> > ps.
> > execute me for my english...
> > 
> > ---
> > K.Tomono
> > 
> > 
> > > -Original Message-
> > > From: Philip Olson [mailto:[EMAIL PROTECTED]]
> > > Sent: Saturday, January 19, 2002 2:30 PM
> > > To: —F–쌤Œá
> > > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > > Subject: Re: [PHP] Variable Problem
> > >
> > >
> > >
> > > > How do I combine the following so it is treated as one variable.
> > >
> > > It's a good question, but why?  Most likely an array will
> > > work best for
> > > this job, arrays are good:
> > >
> > >   http://www.php.net/manual/en/language.types.array.php
> > >
> > > The man page on foreach is nice too, and has many examples
> > > which include
> > > while/list alternatives:
> > >
> > >   http://www.php.net/manual/en/control-structures.foreach.php
> > >
> > > Your question was answered below but I couldn't resist throwing in a
> > > little array propaganda, jic  :)  Arrays work great in forms too!
> > >
> > >   http://www.php.net/manual/en/faq.html.php#AEN73718
> > >
> > > Regards,
> > > Philip Olson
> > >
> > >
> > > > >
> > > > >$i=10
> > > > >$result$i="test";
> > > > >
> > > > >I want this to be:
> > > > >
> > > > >$result10="test";
> > > > >
> > > > >$i changes so I cannot just put in 10 instead of I.
> > > > >anybody know how i can do that?
> > > > >
> > > > >TIA
> > > > >Randy
> > > >
> > > > How about the below.
> > > >
> > > >  > > > $i=10;
> > > > ${"result$i"}="test";
> > > > echo $result10;
> > > > ?>
> > > >
> > > > or
> > > >
> > > >  > > > $i=10;
> > > > ${'result'.$i}="test";
> > > > echo $result10;
> > > > ?>
> > > >
> > > > Cheers :-)
> > > > ---
> > > > K.Tomono
> > >
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.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/)

[PHP] phpPgAdmin 2.4 Release -- Enhances Security

2002-01-19 Thread Dan Wilson

phpPgAdmin 2.4 Release Enhances Security

The phpPgAdmin Development team is pleased to announce the release of
version 2.4. A major security issue was resolved with the implementation of
a new authorization scheme that places all security in the hands of
PostgreSQL itself.

In addition to security updates, the new version contains various bug fixes
and a few new minor features.

Download version 2.4 at http://sourceforge.net/projects/phppgadmin

About phpPgAdmin:
phpPgAdmin was originally a port from phpMyAdmin. The PostgreSQL feature set
pushed the development of phpPgAdmin into different areas of administration
of the DBMS. phpPgAdmin now includes the ability to administer not only
tables, but triggers, functions (stored procedures), views, operators,
indices, and sequences.

Additional features provide user and group administration, multiple servers
support as well as other critical features such as browsing table data,
editing and deleting rows, primary and unique key administration and a
reports utility to keep your most commonly used queries handy.

-Dan Wilson
and the phpPgAdmin Development Team


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




Re: [PHP] Re: Programming a state controller for page transitions

2002-01-19 Thread Geoff Caplan

Manuel

>You may want to try this multi-page forms class

Thanks for the tip. If I may make a comment about the way people present
their open source contributions...

As with most code I look at, it doesn't fully meet my needs ( I really do
need a generic state engine). But is rather hard to learn from and change,
as the comments and white space have been stripped. 

Some authors compound the problem by using cryptic variable names, 
though your variable names are very clear.

It seems to me that both the author and the user benefit when code is easy
to read: the user is much more likely to read the code to learn new ideas
and techniques, and the author is much more likely to get bugfixes and
contributions from the users.

On the other hand, the benefits of stripping comments, in terms of reduced
download and executions times, seem trivial.

Just my two cents worth - thanks for all your contibutions to the php
community.

Geoff Caplan
Advantae Ltd.






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




Re: [PHP] Re: Redirection and Passing Data (arrays)

2002-01-19 Thread m. ali

how do you mean it echo in the login script


here is what I mean

do{
$product_type= $db->f("Product_Type");
$part_number = $db->f("Part_Search");
$make = $db->f("Make");
$model = $db->f("Model");
$model_year = $db->f("Model_Year");
$engine = $db->f("Engine");
$part_specs = $db->f("Part_Specs");
$part_desc = $db->f("Part_Description");
$price = $db->f("price");
$product_id = $db->f("product_id");
$discount_price = round($price - (0.35 * $price),2); // the price is
35% off
$str = explode (".", $discount_price);
if(strlen($str[1]) < 2 ){
  $discount_price = $discount_price."0";
}

$color = ($coloralternator++ %2 ? "D9D9D9" : "E9E9E9");

$product_info = $make ." ".$model." ".$model_year
."/".$engine."/".$part_specs;

echo "$product_type";
echo "$part_number";
echo "$make";
echo "$model";
echo "$model_year";
echo "$engine";
echo "$part_specs";
echo "$part_desc";
echo "$discount_price";



echo "";


echo "";
echo "";
echo "";
echo "";




$is_next_record = @$db->next_record();
  } while($is_next_record );

i need to forward the hidden variables values + the checkboxes values after
the login to the schopping cart account
how can i make them being seen through over the login script

thanx


"Bogdan Stancescu" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> ...or echo some hidden inputs in the login form?
>
> Julio Nobrega Trabalhando wrote:
>
> > session_register('array_of_selected_checkboxes');
> >
> >   Just use sessions! ;-)
> >
> > --
> >
> > Julio Nobrega.
> >
> > Um dia eu chego lá:
> > http://sourceforge.net/projects/toca
> >
> > Ajudei? Salvei? Que tal um presentinho?
> > http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
> >
> > "M. Ali" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > >
> > > hi
> > >
> > > may can some body help me
> > >
> > > I'm writing a shopping cart system where the user can search for a
> > product.
> > > the search result is a page with number of items where the user can
select
> > > some them using checkboxes and enter the quantity that he needs, then
add
> > > them to his shopping cart this works fine when his logged in but when
he
> > is
> > > not logged in, after the search and selecting the items when he comes
to
> > add
> > > them to the shopping cart a login screen appears where he enters his
login
> > > user/password his shopping cart appears.
> > >
> > > the problem is that the items that he selected in the result page are
not
> > > passed after his login so how can i pass these arrays of checkboxes
and
> > > textfields with the login script.
> > >
> > > thanx for your help
> > >
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] RTFM

2002-01-19 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Crikey, you do go on don't you?
My original point was not intended to flame newbies. Merely to point out
that giving detailed explanations/answers to such questions as 'my .html
file is showing my php code' repeatedly will not help newbies. Whereas a
gentle push toward the manual will.

* On 19-01-02 at 11:31 
* Richard Baskett said

> I just don't understand all the intolerance some of the people on this list
> show.  We're not all as intelligent and wise in the arts of php/mysql/etc as
> some of the members on this list are.  One thing I do know is that we all
> started from the beginning and had plenty of questions.  We all think
> differently also, which means, just because I look for two hours online for
> an answer to my question doesnt mean everyone else does.  That also means I
> CAN look for two hours for an answer to my question while Joe Smoe over
> yonder CAN NOT look for two hours for an answer, so he posts to the list
> sooner than I do.  Does that mean he should be flamed because of it?  Nah
> not in my opinion..
> 
> There have also been plenty of times where I have tried everything and I
> just cant get it to work, so I ask, and when I get the answer back.. I hit
> myself on the head and think ahhh dumb$#!t I should have know that!  What
> was I thinking!  And then there have been times that friends who are much
> better programmers than I am can't figure something out and I whip something
> up quickly for them and they hit themselves on the head.  We're fallible,
> the sooner everyone understands that the more tolerance we'll have.  Some
> days are worse than others and hopefully someone will extend to you
> tolerance on those days.
> 
> I loved this list when September 11th rolled around, people became tolerant,
> people became caring, people embraced people on this list.  It was amazing..
> lots of love going around.  I wish I could see that type of caring for
> others all year long, not just until we forget that the person on the other
> side of the email is human also and can be offended by our intolerance and
> verbal assaults.  
> 
> Sure some questions could be solved with a little more research on the
> php.net site or any other site, but hey give them a break, they'll learn
> eventually.. hopefully.. :)  Direct them to the page their answer is on and
> it just might introduce them to a new way of learning.
> 
> Just my two, three, four cents worth.. Where's the love? :)
> 
> Rick
> 
> "Work like you don't need the money. Dance like no one is watching. And love
> like you've never been hurt." - Mark Twain
> 
> > From: Shane Wright <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > Date: Sat, 19 Jan 2002 01:16:17 +
> > To: Richard Crawford <[EMAIL PROTECTED]>, Nick Wilson
> > <[EMAIL PROTECTED]>
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] RTFM
> > 
> > Hi
> > 
> > Maybe this list should be split - kindof into a php-newbies and a
> > php-advanced ?
> > 
> > --
> > Shane
> > 
> > On Friday 18 Jan 2002 9:39 pm, Richard Crawford wrote:
> >> Consider yourself fried. ;-)
> >> 
> >> Seriously, though, I think that there are more advanced PHP lists that
> >> would probably be more to your liking.  Try doing a search on php.net or
> >> yahoogroups.com for something more technical.  I, personally, joined
> >> this list just over a year ago when I was assigned a project at work to
> >> rebuild Phorum to work against my former company's custom database.  The
> >> respondents on this group were incredibly helpful; and most of the
> >> responses to technical questions I've seen on this list have usually
> >> included comments like, "This works because...", or "You can find more
> >> information about this at...".
> >> 
> >> I've found that this list is an excellent resource for beginners, as
> >> well as an excellent place for advanced users to get quick answers to
> >> urgent questions.
> >> 
> >> Nick Wilson wrote:
> >>> -BEGIN PGP SIGNED MESSAGE-
> >>> Hash: SHA1
> >>> 
> >>> 
> >>> Hi all,
> >>> just a very quick note: I've been following the list for about a
> >>> week and I probably follow one or two threads a day. Some of the stuff
> >>> here is *very* interesting. Unfortunately most of the stuff posted is a
> >>> little ridiculous in that it's posted by people that clearly don't know
> >>> where the online manual is located.
> >>> 
> >>> Don't get me wrong, I'm no expert and I don't object to the 'I had a
> >>> look but...' posts I just think the list might be a little more
> >>> interesting if those that *really* know there stuff stopped giving
> >>> detailed answers to Q's like 'my html page shows the php code' and were
> >>> just a little less tolerant.
> >>> 
> >>> Feel free to fry me.
> >>> - --
> >>> 
> >>> Nick Wilson
> >>> 
> >>> Tel:+45 3325 0688
> >>> Fax:+45 3325 0677
> >>> Web:www.explodingnet.com
> >>> 
> >>> 
> >>> 
> >>> -BEGIN PGP SIGNATURE-
> >>> Version: GnuPG v1.0.6 (GNU/Linux

Re: [PHP] RTFM

2002-01-19 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 19-01-02 at 11:31 
* Christopher William Wesley said

> On Sat, 19 Jan 2002, Shane Wright wrote:
> 
> > Maybe this list should be split - kindof into a php-newbies and a
> > php-advanced ?
> 
> So all the newbies can help all the newbies, and all the advanced people
> can help the advanced people?  That wouldn't work out.  All the newbies
> would subscribe to the advanced list, and advanced users who like helping
> newbies would subscribe to the newbies list.  And we'd have two of the
> same list.

Yeah, I agree, that just wouldn't work.

> 
> I don't see a problem with this list.  The person who started this thread,
> after being on the list for only a week, made a very uninformed decision
> to say something so devoid of value or thought that it makes less sense
> than when a newbie asks a question without checking the manual first.

Hehe

> 
> After being on the list for a year, and following the newsgroup for a year
> prior to subscribing to the list, I've noticed very few people asking
> questions that are answered in the manual more than once ... "repeat
> offenders" if you will.  And there are even fewer people who are dumb
> enough to make an issue out of it.  This list is actually quite friendly
> to newbies, and is a primary reason why I stay on subscribed.  I like
> helping new php developers (in terms of using php), and I like that that
> there are good number of people who like helping new php developers in a
> very friendly manner.

I'm not suggesting anyone be unfriendly to newbies, we were all there
once and some of us (like me) *still* make newbies mistakes :)

> 
> I suspect that those are the same reasons why new php users subscribe to
> the list or follow the news group for a while.
> 
> On Fri, 18 Jan 2002, Nick Wilson wrote:
> 
> > just a very quick note: I've been following the list for about a
> > week and I probably follow one or two threads a day. Some of the stuff
> > here is *very* interesting. Unfortunately most of the stuff posted is a
> > little ridiculous in that it's posted by people that clearly don't know
> > where the online manual is located.
> 
> If you notice someone asking a question that has been asnwered in the
> manual, and you're going to spend the time writing to the list, you might
> as well be as helpful as possible.  Answer a question, politely note that

I agree, I'm just saying that it would be more helpful to provide a
gentle shove toward the relevant section of the manual than a detailed
explanation that's been given many times before.

> the manual is a great first-source for anwers, and provide a link into the
> manual where the person can find that you're telling the truth.  Everyone

...er, why would anyone lie?

> has a lapse in judgement or knowledge at some point, and if that annoys
> you, note that it annoys us to hear that it annoys you.  People are more
> receptive to someone who treats them with respect than to people who
> preach down from a self-built soap box.

No one said anything about disrespect. I think you're taking this a
little to much to heart.

> 
> I'm not your mom, nor a list moderator ... so take the above as advice
> that will help you not look like more of a fool than those whom you think
> are foolish.

I don't think I look foolish at all :)

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8SVFxHpvrrTa6L5oRAjgfAJwJSQ37Sc1MluuSGEYf+FGs5+J8GACgn7nR
sknCKTSelMnFMY/0i0sqtdg=
=7TDr
-END PGP SIGNATURE-

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




Re: [PHP] RTFM

2002-01-19 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 19-01-02 at 00:04 
* Darren Gamble said

> Good day,

Hi there!

> 
> I would agree that there certainly are some questions that deserve a bit
> more thought before they are posted to the list.  Witness, for example,
> posters who respond to their own question 10 minutes later with "Never mind,
> I solved it".

Yep, that's annoying.

> 
> However, I don't think anyone is in a position to say whether a question is
> stupid or not.  Sometimes there is a simple way to do something, but it
> escapes the poster who is otherwise a good programmer.

Good point :)

> 
> Yes, for a user to succeed with a programming language it's important that
> they not use a mailing list as a crutch, and be told to examine the
> documentation when appropriate (especially documentation as good as it is
> with PHP).  But I, for one, would much rather have a friendly community such
> as this one to encourage and support the use of PHP for all.

Me too, many people who responded to my original post seem to think that
*i think* all newbie questions that would not have been asked had they bothered to 
look at the manual should be responded to unkindly. Not true, we were all there once 
(and still am somtimes) and I was told to RTFM on more than one occasion :) Best 
advice I was ever given!

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8SVOJHpvrrTa6L5oRAr1MAJ9JoIVSeSx6mqiI3urExMtDQ44kwgCgrhqF
MDb74teAmyBZFhLQ3d2Yjjo=
=1LPo
-END PGP SIGNATURE-

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




[PHP] PHP - browser - ERROR !

2002-01-19 Thread Dani

Hi!

I'm trying to make a user login page and it works fine with Internet
explorer. However when I try it using Netscape 4.5 I get this ERROR
message:

"HTTP Error 405

405 Method Not Allowed

The method specified in the Request Line is not allowed for the resource
identified by the request. Please ensure that you have
the proper MIME type set up for the resource you are requesting.

Please contact the server's administrator if this problem persists."

What have I done wrong

Any reply is appriciated!

Thank you for reviewing my email.

regards

Dani


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




Re: [PHP] PHP - browser - ERROR !

2002-01-19 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 19-01-02 at 12:24 
* Dani said

> Hi!
> 
> I'm trying to make a user login page and it works fine with Internet
> explorer. However when I try it using Netscape 4.5 I get this ERROR
> message:
> 
> "HTTP Error 405
> 
> 405 Method Not Allowed
> 
> The method specified in the Request Line is not allowed for the resource
> identified by the request. Please ensure that you have
> the proper MIME type set up for the resource you are requesting.
> 
> Please contact the server's administrator if this problem persists."
> 
> What have I done wrong

No idea. Why not post the code in question?

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8SViDHpvrrTa6L5oRAoMXAJ4pfMq6f8J67BAl/SgREw4u9vF7bQCdH1mR
LEs+lKt9e0GloWjfCFPGcps=
=tIfq
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.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] Does anyone have the 'edit_member.php' script ....

2002-01-19 Thread Mike C

I have not been able to find an electronic copy of the above script that is in the 
book 'MySQL'.
Is anyone prepared to help me out. My, self-typed version contains a parse error that 
I cannot find?

Regards
Mike C
-- 

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




Re: [PHP] PHP - browser - ERROR !

2002-01-19 Thread Dani

Hi Nick!
Thanks for the reply.

here the code: This works on IE but not Netscape (strange!)

session_start();
if (!isset($lgname)&&!isset($passw))
 {
include("login_input.php");
 }

 else

 {
 if ($checkpsw)
   {
  session_register("session_login");
  $session_login =$lgname;
  include("admin.php");
}
  else
  {
  echo"Not a member!";
  }
}

thanks!

Nick Wilson wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> * On 19-01-02 at 12:24
> * Dani said
>
> > Hi!
> >
> > I'm trying to make a user login page and it works fine with Internet
> > explorer. However when I try it using Netscape 4.5 I get this ERROR
> > message:
> >
> > "HTTP Error 405
> >
> > 405 Method Not Allowed
> >
> > The method specified in the Request Line is not allowed for the resource
> > identified by the request. Please ensure that you have
> > the proper MIME type set up for the resource you are requesting.
> >
> > Please contact the server's administrator if this problem persists."
> >
> > What have I done wrong
>
> No idea. Why not post the code in question?
>
> - --
>
> Nick Wilson
>
> Tel:+45 3325 0688
> Fax:+45 3325 0677
> Web:www.explodingnet.com
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8SViDHpvrrTa6L5oRAoMXAJ4pfMq6f8J67BAl/SgREw4u9vF7bQCdH1mR
> LEs+lKt9e0GloWjfCFPGcps=
> =tIfq
> -END PGP SIGNATURE-
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




RE: [PHP] Does anyone have the 'edit_member.php' script ....

2002-01-19 Thread James Cox

copy and paste your self typed script, plus the parse error and i am sure
someone - or i will be able to help you out :)

James

--
James Cox :: [EMAIL PROTECTED]
Please CC me when replying to my messages on lists.
Was I helpful?  http://www.amazon.co.uk/exec/obidos/wishlist/23IVGHQ61RJGO/

> -Original Message-
> From: Mike C [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 19, 2002 11:30 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Does anyone have the 'edit_member.php' script 
>
>
> I have not been able to find an electronic copy of the above
> script that is in the book 'MySQL'.
> Is anyone prepared to help me out. My, self-typed version
> contains a parse error that I cannot find?
>
> Regards
> Mike C
> --
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] PHP - browser - ERROR !

2002-01-19 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 19-01-02 at 12:35 
* Dani said

> Hi Nick!
> Thanks for the reply.
> 
> here the code: This works on IE but not Netscape (strange!)
> 
> session_start();
> if (!isset($lgname)&&!isset($passw))
>  {
> include("login_input.php");
>  }
> 
>  else
> 
>  {
>  if ($checkpsw)
>{
>   session_register("session_login");
>   $session_login =$lgname;
>   include("admin.php");
> }
>   else
>   {
>   echo"Not a member!";
>   }
> }
> 
> thanks!
> 
> > > Hi!
> > >
> > > I'm trying to make a user login page and it works fine with Internet
> > > explorer. However when I try it using Netscape 4.5 I get this ERROR
> > > message:
> > >
> > > "HTTP Error 405
> > >
> > > 405 Method Not Allowed
> > >
> > > The method specified in the Request Line is not allowed for the resource
> > > identified by the request. Please ensure that you have
> > > the proper MIME type set up for the resource you are requesting.
> > >
> > > Please contact the server's administrator if this problem persists."

Hmmm. I'm sorry Dani, I can't see *anything* really wrong with it.
I suspect it's a session thing though unless one of your includes is
trying to post data of some kind?
Try taking all the session stuff out and seeing if it still produces the
error and let us know what happens?

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8SVvAHpvrrTa6L5oRAot6AKCixnV+2yD1A80yxgK6Ox8M+jJTyQCgl0t5
MKXb4aCs6kSIWZoipyvoPvA=
=BLMw
-END PGP SIGNATURE-

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




Re: [PHP] PHP - browser - ERROR !

2002-01-19 Thread Dani

Hi again!

I tried it and I still get the error.

Do you think that this has somthing todo with my PWS server? or the installation
of PHP?

thanks!

Nick Wilson wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> * On 19-01-02 at 12:35
> * Dani said
>
> > Hi Nick!
> > Thanks for the reply.
> >
> > here the code: This works on IE but not Netscape (strange!)
> >
> > session_start();
> > if (!isset($lgname)&&!isset($passw))
> >  {
> > include("login_input.php");
> >  }
> >
> >  else
> >
> >  {
> >  if ($checkpsw)
> >{
> >   session_register("session_login");
> >   $session_login =$lgname;
> >   include("admin.php");
> > }
> >   else
> >   {
> >   echo"Not a member!";
> >   }
> > }
> >
> > thanks!
> >
> > > > Hi!
> > > >
> > > > I'm trying to make a user login page and it works fine with Internet
> > > > explorer. However when I try it using Netscape 4.5 I get this ERROR
> > > > message:
> > > >
> > > > "HTTP Error 405
> > > >
> > > > 405 Method Not Allowed
> > > >
> > > > The method specified in the Request Line is not allowed for the resource
> > > > identified by the request. Please ensure that you have
> > > > the proper MIME type set up for the resource you are requesting.
> > > >
> > > > Please contact the server's administrator if this problem persists."
>
> Hmmm. I'm sorry Dani, I can't see *anything* really wrong with it.
> I suspect it's a session thing though unless one of your includes is
> trying to post data of some kind?
> Try taking all the session stuff out and seeing if it still produces the
> error and let us know what happens?
>
> Nick Wilson
>
> Tel:+45 3325 0688
> Fax:+45 3325 0677
> Web:www.explodingnet.com
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8SVvAHpvrrTa6L5oRAot6AKCixnV+2yD1A80yxgK6Ox8M+jJTyQCgl0t5
> MKXb4aCs6kSIWZoipyvoPvA=
> =BLMw
> -END PGP SIGNATURE-
>
> --
> PHP General Mailing List (http://www.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]




AW: [PHP] PHP - browser - ERROR !

2002-01-19 Thread Marcel Besancon

Hi, 

maybe it's a problem of netscape. In many cases netscape doesn't
work like the IE. Just remember CSS and other things !!!

Marcel

> -Ursprüngliche Nachricht-
> Von: Dani [mailto:[EMAIL PROTECTED]]
> Gesendet: Samstag, 19. Januar 2002 15:47
> An: Nick Wilson
> Cc: [EMAIL PROTECTED]
> Betreff: Re: [PHP] PHP - browser - ERROR !
> 
> Hi again!
> 
> I tried it and I still get the error.
> 
> Do you think that this has somthing todo with my PWS server? or the
installation
> of PHP?
> 
> thanks!
> 
> Nick Wilson wrote:
> 
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > * On 19-01-02 at 12:35
> > * Dani said
> >
> > > Hi Nick!
> > > Thanks for the reply.
> > >
> > > here the code: This works on IE but not Netscape (strange!)
> > >
> > > session_start();
> > > if (!isset($lgname)&&!isset($passw))
> > >  {
> > > include("login_input.php");
> > >  }
> > >
> > >  else
> > >
> > >  {
> > >  if ($checkpsw)
> > >{
> > >   session_register("session_login");
> > >   $session_login =$lgname;
> > >   include("admin.php");
> > > }
> > >   else
> > >   {
> > >   echo"Not a member!";
> > >   }
> > > }
> > >
> > > thanks!
> > >
> > > > > Hi!
> > > > >
> > > > > I'm trying to make a user login page and it works fine with
Internet
> > > > > explorer. However when I try it using Netscape 4.5 I get this
ERROR
> > > > > message:
> > > > >
> > > > > "HTTP Error 405
> > > > >
> > > > > 405 Method Not Allowed
> > > > >
> > > > > The method specified in the Request Line is not allowed for
the resource
> > > > > identified by the request. Please ensure that you have
> > > > > the proper MIME type set up for the resource you are
requesting.
> > > > >
> > > > > Please contact the server's administrator if this problem
persists."
> >
> > Hmmm. I'm sorry Dani, I can't see *anything* really wrong with
it.
> > I suspect it's a session thing though unless one of your includes is
> > trying to post data of some kind?
> > Try taking all the session stuff out and seeing if it still produces
the
> > error and let us know what happens?
> >
> > Nick Wilson
> >
> > Tel:+45 3325 0688
> > Fax:+45 3325 0677
> > Web:www.explodingnet.com
> >
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.0.6 (GNU/Linux)
> >
> >
> iD8DBQE8SVvAHpvrrTa6L5oRAot6AKCixnV+2yD1A80yxgK6Ox8M+jJTyQCgl0t5
> > MKXb4aCs6kSIWZoipyvoPvA=
> > =BLMw
> > -END PGP SIGNATURE-
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
[EMAIL PROTECTED]



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




Re: [PHP] PHP - browser - ERROR !

2002-01-19 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 19-01-02 at 12:55 
* Dani said

> Hi again!
> 
> I tried it and I still get the error.
> 
> Do you think that this has somthing todo with my PWS server? or the installation
> of PHP?
> 
Could be althoug that doesn't really explain why it works with IE and
not NS. Are any of your includes posting data?
Have you thought about testing on a real server? There are some nice
setups from Nusphere and PHPTriad that will set up Apache, PHP and MySQL
for you. The links are somewhere in this article
www.explodingnet.com/articles/latest/7


> Nick Wilson wrote:
> 
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > * On 19-01-02 at 12:35
> > * Dani said
> >
> > > Hi Nick!
> > > Thanks for the reply.
> > >
> > > here the code: This works on IE but not Netscape (strange!)
> > >
> > > session_start();
> > > if (!isset($lgname)&&!isset($passw))
> > >  {
> > > include("login_input.php");
> > >  }
> > >
> > >  else
> > >
> > >  {
> > >  if ($checkpsw)
> > >{
> > >   session_register("session_login");
> > >   $session_login =$lgname;
> > >   include("admin.php");
> > > }
> > >   else
> > >   {
> > >   echo"Not a member!";
> > >   }
> > > }
> > >
> > > thanks!
> > >
> > > > > Hi!
> > > > >
> > > > > I'm trying to make a user login page and it works fine with Internet
> > > > > explorer. However when I try it using Netscape 4.5 I get this ERROR
> > > > > message:
> > > > >
> > > > > "HTTP Error 405
> > > > >
> > > > > 405 Method Not Allowed
> > > > >
> > > > > The method specified in the Request Line is not allowed for the resource
> > > > > identified by the request. Please ensure that you have
> > > > > the proper MIME type set up for the resource you are requesting.
> > > > >
> > > > > Please contact the server's administrator if this problem persists."
> >
> > Hmmm. I'm sorry Dani, I can't see *anything* really wrong with it.
> > I suspect it's a session thing though unless one of your includes is
> > trying to post data of some kind?
> > Try taking all the session stuff out and seeing if it still produces the
> > error and let us know what happens?
> >
> > Nick Wilson
> >
> > Tel:+45 3325 0688
> > Fax:+45 3325 0677
> > Web:www.explodingnet.com
> >
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.0.6 (GNU/Linux)
> >
> > iD8DBQE8SVvAHpvrrTa6L5oRAot6AKCixnV+2yD1A80yxgK6Ox8M+jJTyQCgl0t5
> > MKXb4aCs6kSIWZoipyvoPvA=
> > =BLMw
> > -END PGP SIGNATURE-
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8SWAXHpvrrTa6L5oRAhrIAJ9pZXj7cyw0SjoGny95iT8BergIIwCeJnRh
mxY4RFaE8Emg+ZPaGtoqL30=
=rcSn
-END PGP SIGNATURE-

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




[PHP] Re: Does anyone have the 'edit_member.php' script ....

2002-01-19 Thread Mike C

It was suggested I send this to the list. The 'samp_db.inc' file follows this. The 
parse error is:
Parse error: parse error in /edit_member.php on line 11

#edit_member.php

\n",
$PHP_SELF, DISPLAY_ENTRY);
print ("Enter your membership ID number and password,\n");
print ("then select submit.\n\n");
print ("\n");
print ("");
print ("Member ID");
print ("\n");
print ("");
print ("");
print ("Password");
print ("\n");
print ("");
print ("\n");
print ("\n");
print "\n";
}

function display_entry ()
{
global $PHP_SELF;
global $member_id, $password;

$member_id = trim ($member_id);
if (empty ($member_id))
die ("No member ID specified");
if (!ereg ("^[0-9]+$", $member_id))
die ("Invalid member ID specified (must be a number)");
if (empty ($password))
die ("No password specified");
if (check_pass ($member_id, $password))
$admin = 0;
else if (check_pass (0, $password))
$admin = 1;
else
die ("Invalid password");

$query = "SELECT last_name, first_name, suffix, email,"
. "street, city, state, zip, phone, interests,"
. "member_id, expiration"
. " FROM member"
. " WHERE member_id = $member_id"
. " ORDER by last_name";
$result = mysql_query ($query)
or die ("Cannot execute query");
if (mysql_num_rows ($result) == 0)
die ("No user with member_id = $member_id found");
if (mysql_num_rows ($result) > 1)
die ("More than one user with member_id = $member_id found");

printf ("\n",
$PHP_SELF, UPDATE_ENTRY);
 
hidden_field ("member_id", $member_id);
hidden_field ("password", $password);
print ("\n");
$row = mysql_fetch_array ($result);
display_column ("Member ID", $row, "member_id", 0);

display_column ("Expiration", $row, "expiration", $admin);

display_column ("Last name", $row, "last_name", 1);
display_column ("First name", $row, "first_name", 1);
display_column ("Suffix", $row, "suffix", 1);
display_column ("Email", $row, "email", 1);
display_column ("Street", $row, "street", 1);
display_column ("City", $row, "city", 1);
display_column ("State", $row, "state", 1);
display_column ("Zip", $row, "zip", 1);
display_column ("Phone", $row, "phone", 1);
display_column ("Interests", $row, "interests", 1);
print ("\n");
print ("\n");
print "\n";

}

function check_pass ($id, $pass)
{

$query = "Select password from member_pass where member_id = $id";
if (!($result = mysql_query ($query)))
die ("Error reading password table");
if (!($row = mysql_fetch_array ($result)))
return (FALSE);
return ($row["password"] == $pass);
}

function display_column ($label, $row, $col_name, $editable)
{
print ("\n");
printf ("%s\n", htmlspecialchars ($label));
$value = htmlspecialchars ($row[$col_name]);
if ($editable)
{
$str = sprintf ("\n", $value);
}
else
$str = $value;
printf ("%s\n", $str);
print ("\n");
}

function update_entry ()
{
global $row, $member_id, $password;

$member_id = trim ($member_id);
if (empty ($member_id))
die ("No member ID specified");
if (!ereg ("^[0-9]+$", $member_id))
die ("Invalid member ID specified (must be number)");
if (!check_pass ($member_id, $password) && !check_pass (0, $password))
die ("Invalid password");
$result = mysql_query ("select * from member where 1 = 0");
if (!$result)
die ("Cannot query member table");

$query = "Update member ";
$delim = "set ";# put "set" before first column,"," before others
while (list ($col_name, $val) = each ($row))
{
$query .= "$delim $col_name =";
$delim = ",";

$val = trim ($val);
if (empty ($val))
{
if (nullable ($result, $col_name))
$query .= "NULL";
else
$query .= "\"\"";
}
else
$query .= "\"" . addslashes ($val) . "\"";
}
$query .= " where member_id = $member_id";
if (mysql_query ($query) && mysql_affected_rows () > 0)
print ("Entry updated successfully.\n");
else
print ("Entry not updated.\n");
}

function nullable ($result, $col_name)
{
for ($i = 0; $i < mysql_num_fields ($result); $i++)
{
if (!($fld = mysql_fetch_field ($result, $i)))
continue;
if ($fld->name == $col_name)
return (!$fld->not_null);
}
return (0);
}

if (empty ($action))
$action = INITIAL_PAGE;

$title = "Historical League member editing form";
html_begin ($title, $title);

samp_db_connect()
or die ("Cannot connect to the server");

switch ($action)
{
case initial_page:
solicit_member_id ();
break;
case display_entry:
display_entry ();
break;
case update_entry:
update_entry ();
break;


default:
die ("Unknown action code ($action)");
}

html_end ();
?>

_


#samp_db.inc

\n");
print ("\n");

if ($title)

print ("$title\n");
print ("\n");
print ("\n");

if ($header)
print ("$header\n");
}

function html_end ()
{
print ("\n");
}

?>

Regards
Mike
-- 

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




Re: [PHP] PHP - browser - ERROR !

2002-01-19 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 19-01-02 at 13:02 
* Marcel Besancon said

> Hi, 
> 
>   maybe it's a problem of netscape. In many cases netscape doesn't
> work like the IE. Just remember CSS and other things !!!

Yes, but this is *server side* code. I suspect you're right though and
there is just something we are missing :)
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8SWFSHpvrrTa6L5oRAmsEAJ9SV9bhnVXek7ni/+U0d15G4FbmFwCdGtSp
5vBoSLuyLdCtoMyKKZDzkzI=
=JzIb
-END PGP SIGNATURE-

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




[PHP] RE: Does anyone have the 'edit_member.php' script ....

2002-01-19 Thread James Cox

change

printf ("\n",
$PHP_SELF, DISPLAY_ENTRY);

to

printf ("\n",
$PHP_SELF, $DISPLAY_ENTRY);

> -Original Message-
> From: Mike C [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 19, 2002 12:02 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: Does anyone have the 'edit_member.php' script 
> 
> 
> It was suggested I send this to the list. The 'samp_db.inc' file 
> follows this. The parse error is:
> Parse error: parse error in /edit_member.php on line 11
> 
> #edit_member.php
> 
>  include ("/users/mike/documents/include_files/samp_db.inc");
> define (initial_page, 0);
> define (display_entry, 1);
> define (update_entry, 2);
> 
> function solicit_member_id ()
> {
> global $PHP_SELF;
> 
> printf ("\n",
> $PHP_SELF, DISPLAY_ENTRY);
> print ("Enter your membership ID number and password,\n");
> print ("then select submit.\n\n");
> print ("\n");
> print ("");
> print ("Member ID");
> print ("\n");
> print ("");
> print ("");
> print ("Password");
> print ("\n");
> print ("");
> print ("\n");
> print ("\n");
> print "\n";
> }
> 
> function display_entry ()
> {
> global $PHP_SELF;
> global $member_id, $password;
> 
> $member_id = trim ($member_id);
> if (empty ($member_id))
> die ("No member ID specified");
> if (!ereg ("^[0-9]+$", $member_id))
> die ("Invalid member ID specified (must be a number)");
> if (empty ($password))
> die ("No password specified");
> if (check_pass ($member_id, $password))
> $admin = 0;
> else if (check_pass (0, $password))
> $admin = 1;
> else
> die ("Invalid password");
> 
> $query = "SELECT last_name, first_name, suffix, email,"
> . "street, city, state, zip, phone, interests,"
> . "member_id, expiration"
> . " FROM member"
> . " WHERE member_id = $member_id"
> . " ORDER by last_name";
> $result = mysql_query ($query)
> or die ("Cannot execute query");
> if (mysql_num_rows ($result) == 0)
> die ("No user with member_id = $member_id found");
> if (mysql_num_rows ($result) > 1)
> die ("More than one user with member_id = $member_id found");
> 
> printf ("\n",
> $PHP_SELF, UPDATE_ENTRY);
>  
> hidden_field ("member_id", $member_id);
> hidden_field ("password", $password);
> print ("\n");
> $row = mysql_fetch_array ($result);
> display_column ("Member ID", $row, "member_id", 0);
> 
> display_column ("Expiration", $row, "expiration", $admin);
> 
> display_column ("Last name", $row, "last_name", 1);
> display_column ("First name", $row, "first_name", 1);
> display_column ("Suffix", $row, "suffix", 1);
> display_column ("Email", $row, "email", 1);
> display_column ("Street", $row, "street", 1);
> display_column ("City", $row, "city", 1);
> display_column ("State", $row, "state", 1);
> display_column ("Zip", $row, "zip", 1);
> display_column ("Phone", $row, "phone", 1);
> display_column ("Interests", $row, "interests", 1);
> print ("\n");
> print ("\n");
> print "\n";
> 
> }
> 
> function check_pass ($id, $pass)
> {
> 
> $query = "Select password from member_pass where member_id = $id";
> if (!($result = mysql_query ($query)))
> die ("Error reading password table");
> if (!($row = mysql_fetch_array ($result)))
> return (FALSE);
> return ($row["password"] == $pass);
> }
> 
> function display_column ($label, $row, $col_name, $editable)
> {
> print ("\n");
> printf ("%s\n", htmlspecialchars ($label));
> $value = htmlspecialchars ($row[$col_name]);
> if ($editable)
> {
> $str = sprintf (" $str .= sprintf (" VALUE=\"%s\" SIZE=\"80\">\n", $value);
> }
> else
> $str = $value;
> printf ("%s\n", $str);
> print ("\n");
> }
> 
> function update_entry ()
> {
> global $row, $member_id, $password;
> 
> $member_id = trim ($member_id);
> if (empty ($member_id))
> die ("No member ID specified");
> if (!ereg ("^[0-9]+$", $member_id))
> die ("Invalid member ID specified (must be number)");
> if (!check_pass ($member_id, $password) && !check_pass (0, $password))
> die ("Invalid password");
> $result = mysql_query ("select * from member where 1 = 0");
> if (!$result)
> die ("Cannot query member table");
> 
> $query = "Update member ";
> $delim = "set ";# put "set" before first column,"," before others
> while (list ($col_name, $val) = each ($row))
> {
> $query .= "$delim $col_name =";
> $delim = ",";
> 
> $val = trim ($val);
> if (empty ($val))
> {
> if (nullable ($result, $col_name))
> $query .= "NULL";
> else
> $query .= "\"\"";
> }
> else
> $query .= "\"" . addslashes ($val) . "\"";
> }
> $query .= " where member_id = $member_id";
> if (mysql_query ($query) && mysql_affected_rows () > 0)
> print ("Entry updated successfully.\n");
> else
> print ("Entry not updated.\n");
> }
> 
> function nullable ($result, $col_name)
> {
> for ($i = 0; $i < mysql_num_fields ($result); $i++)
> {
> if (!($fld = mysql_fetch_field ($result, $i)))
> continue;
> if ($fld->name == $col_name)
> return (!$fld->not_null);
> }
> return (0);
> }
> 
> if (empty ($action))
> $action = INITIAL_PAGE;
> 
> $title = "Historical League member editing form";
> html_begin ($title, $title);
> 
> samp_db_connect

Re: [PHP] PHP - browser - ERROR !

2002-01-19 Thread Dani

Hi !

thanks for the info.

when I tried to open some of include files directly from the browser, they
work fine.

So I guess it's just my authentician page which doesn't work.

I'll keep trying.

Thanks again!

Nick Wilson wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> * On 19-01-02 at 13:02
> * Marcel Besancon said
>
> > Hi,
> >
> >   maybe it's a problem of netscape. In many cases netscape doesn't
> > work like the IE. Just remember CSS and other things !!!
>
> Yes, but this is *server side* code. I suspect you're right though and
> there is just something we are missing :)
> - --
>
> Nick Wilson
>
> Tel:+45 3325 0688
> Fax:+45 3325 0677
> Web:www.explodingnet.com
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8SWFSHpvrrTa6L5oRAmsEAJ9SV9bhnVXek7ni/+U0d15G4FbmFwCdGtSp
> 5vBoSLuyLdCtoMyKKZDzkzI=
> =JzIb
> -END PGP SIGNATURE-
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] I need help

2002-01-19 Thread Hassan Khan

Dear Sir,

I am facing the problem with the PHP configuration. Whenever I try to load 
the php_oci8.dll. It gives me an error

"Unable to load dynamic library 'C:\php\extensions\php_oci8.dll' - The 
specified module could not be found"

I have tried my best to resolve this problem but all in vain. Please let me 
know if there is any solution for that.

I am using Windows2000 and Oracle 8.1.7 and IIS 5 Web Server.

If there is any extra library that I need to load then please tell me about 
that and how to get it.


Thanks and Best Regards

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




Re: [PHP] I need help

2002-01-19 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 19-01-02 at 13:14 
* Hassan Khan said

> Dear Sir,
> 
> I am facing the problem with the PHP configuration. Whenever I try to load 
> the php_oci8.dll. It gives me an error
> 
> "Unable to load dynamic library 'C:\php\extensions\php_oci8.dll' - The 
> specified module could not be found"
> 
> I have tried my best to resolve this problem but all in vain. Please let me 
> know if there is any solution for that.
> 
> I am using Windows2000 and Oracle 8.1.7 and IIS 5 Web Server.
> 
> If there is any extra library that I need to load then please tell me about 
> that and how to get it.
> 

Not sure about that but there are some good 'all-in-one' packages that
will install Apache, MySQL and PHP on your machine. You can get the
links here www.explodingnet.com/articles/latest/7 

Oh, and please use a more descriptive subject if you mail the list again
it helps people decide what they would like to read :)

Good luck!
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8SWRBHpvrrTa6L5oRAhWiAJ0YDZeduC9DPqELxsRRelS/YwnXeACgk5lv
+qRYQJ3Hd3s3iYFRQCWVgsI=
=bZR/
-END PGP SIGNATURE-

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




Re: [PHP] Re: PHP 4 on OSX 10.1.2

2002-01-19 Thread Andrew White

On Saturday, January 19, 2002, at 03:58  am, Ben Richardson wrote:

> this should give me "Friday in Danish is Fredag" but no matter
> what I set the languagecode to it always returns "Friday"
>
> Why?

Because locale support in libc on Mac OS X is broken. There isn't even a 
/usr/share/locale/da for starters and the locales that are there just have 
LC_MESSAGES, nothing else.

I guess not much attention has been paid to this bug since Mac OS X has 
its own method of localization and multi-lingual support which goes beyond 
what's available with setlocale.

Somebody did port libxpg4 from FreeBSD3.x but I'm not sure how you go 
about getting php to use that instead of the built in libc. See the 
following message for more details:



Andrew


-- 
PHP General Mailing List (http://www.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] FIXED - PHP - browser - ERROR !

2002-01-19 Thread Dani

Hi Again!

I found the problem!

It seems that netscape can't take an empty value for 'action' in the form
tag. here is the example:



this will result ERROR because the value for the action is written.

this one works:



I hope this help for those who are trying to use Netscape.

regards,
Dani

Nick Wilson wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> * On 19-01-02 at 13:02
> * Marcel Besancon said
>
> > Hi,
> >
> >   maybe it's a problem of netscape. In many cases netscape doesn't
> > work like the IE. Just remember CSS and other things !!!
>
> Yes, but this is *server side* code. I suspect you're right though and
> there is just something we are missing :)
> - --
>
> Nick Wilson
>
> Tel:+45 3325 0688
> Fax:+45 3325 0677
> Web:www.explodingnet.com
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8SWFSHpvrrTa6L5oRAmsEAJ9SV9bhnVXek7ni/+U0d15G4FbmFwCdGtSp
> 5vBoSLuyLdCtoMyKKZDzkzI=
> =JzIb
> -END PGP SIGNATURE-
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] Re: FIXED - PHP - browser - ERROR !

2002-01-19 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 19-01-02 at 13:37 
* Dani said

> Hi Again!
> 
> I found the problem!
> 
> It seems that netscape can't take an empty value for 'action' in the form
> tag. here is the example:
> 
> 
> 
> this will result ERROR because the value for the action is written.
> 
> this one works:
> 
> 
> 
> I hope this help for those who are trying to use Netscape.

Excellent news!

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8SWjDHpvrrTa6L5oRAl0sAJ0agqZDuWaR6NN9Br98FfSOmJ1g1wCgjWNM
8JSGrkd4x3q3Yhm7f8YfykM=
=5Wnn
-END PGP SIGNATURE-

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




Re: [PHP] Computer Science and PHP

2002-01-19 Thread Hank Marquardt

Hmm, well I'm 20 years removed from college at this point, but I can
relate somewhat to the issue ... the tail end of my college life was
when the IBM PC was introduced and I can assure you there were no
classes in 'small systems' of any kind despite the fact that many could
see the future ---

Certainly some things have changed, but I think the college v. scripting
languages issue is this:

College still views CompSci as a science/engineering discipline and I
think they still use the classics -- Aho's Dragon Book, Knuth's
Algorithm stuff etc.   -- all this more prepares you for life as a
kernel hacker than a web scripter ... and I believe that appropriate; I
think no one would disagree that if your a competent C hacker you can
probably pick up PHP in a couple hours and go "hey this is cool!" -- If
anything you could argue the converse side that languages like PHP ...
and ASP and Python ... pick your poision; have resulted in a lot of
people being drawn to programming in a casual way which is great for web
pages and the like, but there are also a lot of people calling
themselves programmers that really couldn't code their way out a paper
bag at a lower level, nor understand anything below the highlevel
scripting API.

I think you could have an interesting side debate here about the shift
toward teached in OOP as a paradigm.

I think you look those two points and I can understand why you see Java
in a lot of cirriculums ... it's OO, it's easier than C, yet you can
code most anything you want without obsfuncticating the low level stuff
with a over-simple API.  I really don't like Java myself, but I can see
why it's popular as a teaching language.

Just my $0.02

On Thu, Jan 17, 2002 at 06:57:07PM -0500, Francesco Gallarotti wrote:
> I am a student in a college in NY state. Here we have several servers and
> dozens of courses on computer science. No server is PHP ready and no course
> instructor knows anything about PHP. Why do you think this is happening? I
> really like PHP and I am using it in my personal website to work with some
> text files and a small database. Why PHP is so not popular in the computer
> science teaching area?
> 
> F.G.
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
Hank Marquardt <[EMAIL PROTECTED]>
http://web.yerpso.net
GPG Id: 2BB5E60C
Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C
*** Web Development: PHP, MySQL/PgSQL - Network Admin: Debian/FreeBSD
*** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild 
*** Beginning PHP -- Starts January 7, 2002 
*** See http://www.hwg.org/services/classes

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




Re: [PHP] Computer Science and PHP

2002-01-19 Thread DL Neil

Hank,
You youngster you!

One other dimension, the institutions can only offer classes in the languages (and 
techniques/technologies) that
the trainers know and than they have the resources (hardware, compilers/interpreters) 
to cover.

Maybe therein lies an answer to the 'marketing' side too. The best way to 'market' a 
new language, ie to cause
it to spread virulently (?virus-like) is by offering classes in the schools! Certainly 
when my customers ask
about 'which tool' my first question is always, "what skill sets do the staff have?".

Regards,
=dn


- Original Message -
From: "Hank Marquardt" <[EMAIL PROTECTED]>
To: "Francesco Gallarotti" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: 19 January 2002 13:01
Subject: Re: [PHP] Computer Science and PHP


> Hmm, well I'm 20 years removed from college at this point, but I can
> relate somewhat to the issue ... the tail end of my college life was
> when the IBM PC was introduced and I can assure you there were no
> classes in 'small systems' of any kind despite the fact that many could
> see the future ---
>
> Certainly some things have changed, but I think the college v. scripting
> languages issue is this:
>
> College still views CompSci as a science/engineering discipline and I
> think they still use the classics -- Aho's Dragon Book, Knuth's
> Algorithm stuff etc.   -- all this more prepares you for life as a
> kernel hacker than a web scripter ... and I believe that appropriate; I
> think no one would disagree that if your a competent C hacker you can
> probably pick up PHP in a couple hours and go "hey this is cool!" -- If
> anything you could argue the converse side that languages like PHP ...
> and ASP and Python ... pick your poision; have resulted in a lot of
> people being drawn to programming in a casual way which is great for web
> pages and the like, but there are also a lot of people calling
> themselves programmers that really couldn't code their way out a paper
> bag at a lower level, nor understand anything below the highlevel
> scripting API.
>
> I think you could have an interesting side debate here about the shift
> toward teached in OOP as a paradigm.
>
> I think you look those two points and I can understand why you see Java
> in a lot of cirriculums ... it's OO, it's easier than C, yet you can
> code most anything you want without obsfuncticating the low level stuff
> with a over-simple API.  I really don't like Java myself, but I can see
> why it's popular as a teaching language.
>
> Just my $0.02
>
> On Thu, Jan 17, 2002 at 06:57:07PM -0500, Francesco Gallarotti wrote:
> > I am a student in a college in NY state. Here we have several servers and
> > dozens of courses on computer science. No server is PHP ready and no course
> > instructor knows anything about PHP. Why do you think this is happening? I
> > really like PHP and I am using it in my personal website to work with some
> > text files and a small database. Why PHP is so not popular in the computer
> > science teaching area?
> >
> > F.G.
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
> --
> Hank Marquardt <[EMAIL PROTECTED]>
> http://web.yerpso.net
> GPG Id: 2BB5E60C
> Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C
> *** Web Development: PHP, MySQL/PgSQL - Network Admin: Debian/FreeBSD
> *** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild
> *** Beginning PHP -- Starts January 7, 2002
> *** See http://www.hwg.org/services/classes
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] how to send to URL on if statement?

2002-01-19 Thread Daniel Grace

There is one other option if you're willing to take a slight drop in
performance. Take a quick look at:
http://www.php.net/manual/en/ref.outcontrol.php

-- Daniel Grace <[EMAIL PROTECTED]>

"Richard Crawford" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> If you have already sent output to the browser, then you won't be able
> to use the PHP header() command to redirect the browser.
>
> There are a couple of ways around this, though; look into the META tag
> in HTML, or you can use JavaScript to redirect the browser.
>




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




Re: [PHP] bug in echo function?

2002-01-19 Thread Daniel Grace


"Billy Harvey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Fri, 2002-01-18 at 13:54, Darren Gamble wrote:
> > Good day,
> >
> > The reason that the first statement doesn't work as intended is due to
the
> > order that the operands are processed.
> >
> > The operands in the line:
> >
> > "" . ($i*8)+$j . ""
> >
> > are being processed like this:
> >
> > ("" . ($i*8))+($j . "")
> >
> > If you change the line to:
> >
> > "" . (($i*8)+$j) . ""
> >
> > then you'll get the desired result.
> >
> > Rule of thumb: Use parenthesis whenever you have a complex operation to
> > ensure the result is what you want.
>
> Hmmm - so my assumption that the concatenation operator between the
> strings gives them a delination equivalent to listing this as three
> separate echo statements is incorrect, I take it.
>
> Shouldn't the echo function process it in this manner from a standpoint
> of consistency?
>
> Thanks for the clarification.
>
> Billy
>

Rather than concatenating strings, you can use commas with echo as well:

echo "", ($i * 8) + $j, "";

I *think* that you may in fact get a VERY SLIGHT increase in performance by
doing it this way, because PHP will simply dump each 'piece' to the output
buffer/to the browser one by one rather than having to go through the work
of building one large string and then outputting that.

Caveats: This won't work if you use the function-like syntax for echo <<
echo(foo, bar, baz) /* this won't work */ >>, but as your example code
doesn't use it I'm imagining you probably aren't either.

-- Daniel Grace <[EMAIL PROTECTED]>



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




[PHP] Re: I need help

2002-01-19 Thread David

 If i\'m not wrong, you did not specify the php extensions dir in php.ini correctly, 

mine is: 
extension_dir = c:/php/extensions

assumming c:\\php\\extensions is the php extensions are stored.

pls tell me if it works, i\'ve got some oracle questions to ask u if u don\'t mind ;)

>Dear Sir, 
>
>I am facing the problem with the PHP configuration. >Whenever I try to load 
>the php_oci8.dll. It gives me an error 
>
>\"Unable to load dynamic >library \'C:phpextensionsphp_oci8.dll\' - The 
>specified module could not be found\" 
>
>I have tried my best to resolve this problem but all in >vain. Please let me 
>know if there is any solution for that. 
>
>I am using Windows2000 and Oracle 8.1.7 and IIS 5 Web >Server. 
>
>If there is any extra library that I need to load then >please tell me about 
>that and how to get it. 
>
>Thanks and Best Regards 

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




Re: [PHP] Re: I need help

2002-01-19 Thread Michael Sims

At 05:13 PM 1/19/2002 +, David wrote:
>  If i\'m not wrong, you did not specify the php extensions dir in php.ini 
> correctly,
[...]
>pls tell me if it works, i\'ve got some oracle questions to ask u if u 
>don\'t mind ;)

LOL!  Somebody needs to turn off magic_quotes_gpc on their PHP web-based 
email script...

It\'s adding backslashes to your emails.. :-)


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




Re: [PHP] RTFM

2002-01-19 Thread Brian Clark

* Nick Wilson ([EMAIL PROTECTED]) [Jan 19. 2002 06:05]:

[...]

> Me too, many people who responded to my original post seem to think
> that *i think* all newbie questions that would not have been asked had
> they bothered to look at the manual should be responded to unkindly.
> Not true, we were all there once (and still am somtimes) and I was
> told to RTFM on more than one occasion :) Best advice I was ever
> given!

Usually, it goes like this, from what I've seen on this list over the
past few years:

1. An experienced user answers a FAQ 99 times.

2. The 100th time, the question just gets deleted and the experienced 
   user gives up answering those questions ever again.

3. A new generation of listers finally get it, and approach 
   `experienced user' status.

4. GOTO 1

So the majority of the people that know the answers don't answer FAQ
questions unless they're really bored out of their mind, or _feel like
learning, themselves_.

I'm not trying to be sarcastic, I'm just speaking the truth.

And, the PHP manual /is/ a Fine one.

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
All you will ever be you are now becoming.


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




Re: [PHP] RTFM

2002-01-19 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 19-01-02 at 18:46 
* Brian Clark said

> * Nick Wilson ([EMAIL PROTECTED]) [Jan 19. 2002 06:05]:
> 
> [...]
> 
> > Me too, many people who responded to my original post seem to think
> > that *i think* all newbie questions that would not have been asked had
> > they bothered to look at the manual should be responded to unkindly.
> > Not true, we were all there once (and still am somtimes) and I was
> > told to RTFM on more than one occasion :) Best advice I was ever
> > given!
> 
> Usually, it goes like this, from what I've seen on this list over the
> past few years:
> 
> 1. An experienced user answers a FAQ 99 times.
> 
> 2. The 100th time, the question just gets deleted and the experienced 
>user gives up answering those questions ever again.
> 
> 3. A new generation of listers finally get it, and approach 
>`experienced user' status.
> 
> 4. GOTO 1
> 
> So the majority of the people that know the answers don't answer FAQ
> questions unless they're really bored out of their mind, or _feel like
> learning, themselves_.
> 
> I'm not trying to be sarcastic, I'm just speaking the truth.
> 
> And, the PHP manual /is/ a Fine one.
> 
> -- 
> Brian Clark | Avoiding the general public since 1805!
> Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
> All you will ever be you are now becoming.

Yeeh! That's both funny *and* true!

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8SbOwHpvrrTa6L5oRAhneAJ462JCJRRhFrBVBzxjidDZPhIQrawCeMhN8
NmSlASdbu/jdGZZsNjqbjts=
=jfaJ
-END PGP SIGNATURE-

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




Re: [PHP] RTFM

2002-01-19 Thread sundogcurt

I've been (sorta) following this thread for the last little while and I 
have to say that I'm on the side of "one list for all!". The problem 
with splitting the list is the different levels of "newbie-ism" on 
different subjects, There are things that advanced users can learn from 
new comers to the language too.

For instance. I don't really consider myself a "total newb" when it 
comes to PHP anymore, but there are areas of the language that I still 
haven't touched upon, which would make me a newbie. I agree though that 
some questions are asked a little too often, and that could be due to 
unclear documentation. If it is bothersome to you, write a nice simple 
tutorial and post it!

For example, quite often I see people ask how to INSERT multiple values 
from one selectbox. I have yet to see anybody post any help save for 
telling people to use checkboxes instead. Using a selectbox for this 
isn't all that difficult at all!


//FIRST YOU START WITH A SELECTBOX


//NOTE THE "[]" AT THE END OF THE NAME FOR THE SELECTBOX, ONCE SUBMITTED 
THIS WILL BE TREATED AS AN ARRAY CONTAINING THE SELECTED VALUES.

//THE "MULTIPLE" STATEMENT ALLOWS THE USER TO SELECT MULTIPLE OPTIONS 
INSTEAD OF JUST ONE.

0
1
2


/// AFTER THE FORM IS SUBMITTED ///

//GET A COUNT ON THE NUMBER OF ENTRIES SELECTED
$mycount = count($selectpackage);

//USE THE RESULT FOR A COUNTER
while($mycount){
$mycount--;

//RUN YOUR INSERT COMMAND UNTIL THE COUNTER HAS EXPIRED
mysql_query("INSERT INTO mytable (myvalue1,myvalue2) VALUES 
('$selectpackage[$mycount]', '$mycount')");
}



Maybe some of use should get together and start putting things like this 
in a repository with an easy flexible search. I know from experience 
that some of the documentation that is available to new users is a bit 
on the stuffy side. Sometimes a better approach is to give up some 
"starter code" and let them go from there.

Just my two cents worth and a mini tutorial that can be used to get 
things started.

Now if you'll excuse me, I have to continue banging my forehead on my 
keyboard figuring out this "%$#%$#@" file upload. (C:

We all benefit from "new and used" users alike.
~Curt~


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




Re: [PHP] RTFM

2002-01-19 Thread sundogcurt

I would be more than happy to put some mini-tutorials together to send 
you, I'm not sure of the relevance of them though. Maybe adding a 
"suggest a tut" area where people that are having trouble can request a 
tutorial and anybody interested can fire one in?

Just a thought
~Curt~

[EMAIL PROTECTED] wrote:

>I've actually been working on just that.  I've been reading this list for a
>long time and noticed the repetition.  I have 65+ faqs on my site
>http://www.php-faq.com/  that are there basically from my own experiences.
>I haven't posted it yet, because I don't think it's "full" enough.  It even
>has a suggest-a-faq page, that'd I'd need to activate. I do like your idea
>of mini-tutorials.  I have a lot of programming experience (12+ years),
>mostly in business applications, and know what it's like to struggle.  The
>mailing list is awesome; I've never really posted a question because the
>answers are in the archive.
>
>- Original Message -
>From: "sundogcurt" <[EMAIL PROTECTED]>
>To: "GENERAL PHP LIST" <[EMAIL PROTECTED]>
>Sent: Saturday, January 19, 2002 12:56 PM
>Subject: Re: [PHP] RTFM
>
>
>>I've been (sorta) following this thread for the last little while and I
>>have to say that I'm on the side of "one list for all!". The problem
>>with splitting the list is the different levels of "newbie-ism" on
>>different subjects, There are things that advanced users can learn from
>>new comers to the language too.
>>
>>For instance. I don't really consider myself a "total newb" when it
>>comes to PHP anymore, but there are areas of the language that I still
>>haven't touched upon, which would make me a newbie. I agree though that
>>some questions are asked a little too often, and that could be due to
>>unclear documentation. If it is bothersome to you, write a nice simple
>>tutorial and post it!
>>
>>For example, quite often I see people ask how to INSERT multiple values
>>from one selectbox. I have yet to see anybody post any help save for
>>telling people to use checkboxes instead. Using a selectbox for this
>>isn't all that difficult at all!
>>
>>
>>file://FIRST YOU START WITH A SELECTBOX
>>
>>
>>file://NOTE THE "[]" AT THE END OF THE NAME FOR THE SELECTBOX, ONCE
>>
>SUBMITTED
>
>>THIS WILL BE TREATED AS AN ARRAY CONTAINING THE SELECTED VALUES.
>>
>>file://THE "MULTIPLE" STATEMENT ALLOWS THE USER TO SELECT MULTIPLE OPTIONS
>>INSTEAD OF JUST ONE.
>>
>>0
>>1
>>2
>>
>>
>>/// AFTER THE FORM IS SUBMITTED ///
>>
>>file://GET A COUNT ON THE NUMBER OF ENTRIES SELECTED
>>$mycount = count($selectpackage);
>>
>>file://USE THE RESULT FOR A COUNTER
>>while($mycount){
>>$mycount--;
>>
>>file://RUN YOUR INSERT COMMAND UNTIL THE COUNTER HAS EXPIRED
>>mysql_query("INSERT INTO mytable (myvalue1,myvalue2) VALUES
>>('$selectpackage[$mycount]', '$mycount')");
>>}
>>
>>
>>
>>Maybe some of use should get together and start putting things like this
>>in a repository with an easy flexible search. I know from experience
>>that some of the documentation that is available to new users is a bit
>>on the stuffy side. Sometimes a better approach is to give up some
>>"starter code" and let them go from there.
>>
>>Just my two cents worth and a mini tutorial that can be used to get
>>things started.
>>
>>Now if you'll excuse me, I have to continue banging my forehead on my
>>keyboard figuring out this "%$#%$#@" file upload. (C:
>>
>>We all benefit from "new and used" users alike.
>>~Curt~
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>>
>




Re: [PHP] RTFM

2002-01-19 Thread Brian Clark

* sundogcurt ([EMAIL PROTECTED]) [Jan 19. 2002 13:39]:

> I would be more than happy to put some mini-tutorials together to send
> you, I'm not sure of the relevance of them though. Maybe adding a
> "suggest a tut" area where people that are having trouble can request
> a tutorial and anybody interested can fire one in?

> [EMAIL PROTECTED] wrote:

> >I've actually been working on just that. I've been reading this list
> >for a long time and noticed the repetition. I have 65+ faqs on my
> >site http://www.php-faq.com/ that are there basically from my own
> >experiences.

You guys have seen this, right?



-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Easy as 3.1415926535897932384626433832795028841


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




Re: [PHP] RTFM

2002-01-19 Thread Miles Thompson


Yes, and keep forgetting about it. Now it's bookmarked again.

Miles

PS Brian - You can come out now.


At 01:46 PM 1/19/2002 -0500, Brian Clark wrote:
>* sundogcurt ([EMAIL PROTECTED]) [Jan 19. 2002 13:39]:
>
> > I would be more than happy to put some mini-tutorials together to send
> > you, I'm not sure of the relevance of them though. Maybe adding a
> > "suggest a tut" area where people that are having trouble can request
> > a tutorial and anybody interested can fire one in?
>
> > [EMAIL PROTECTED] wrote:
>
> > >I've actually been working on just that. I've been reading this list
> > >for a long time and noticed the repetition. I have 65+ faqs on my
> > >site http://www.php-faq.com/ that are there basically from my own
> > >experiences.
>
>You guys have seen this, right?
>
>
>
>--
>Brian Clark | Avoiding the general public since 1805!
>Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
>Easy as 3.1415926535897932384626433832795028841
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Re: Does anyone have the 'edit_member.php' script ....

2002-01-19 Thread Janet Valade

The problem is on this line.

print ("\n");

There is a space between the \ and the " before Submit.

Janet

- Original Message -
From: "Mike C" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, January 19, 2002 4:02 AM
Subject: [PHP] Re: Does anyone have the 'edit_member.php' script 


> It was suggested I send this to the list. The 'samp_db.inc' file follows
this. The parse error is:
> Parse error: parse error in /edit_member.php on line 11
>
> #edit_member.php
>
>  include ("/users/mike/documents/include_files/samp_db.inc");
> define (initial_page, 0);
> define (display_entry, 1);
> define (update_entry, 2);
>
> function solicit_member_id ()
> {
> global $PHP_SELF;
>
> printf ("\n",
> $PHP_SELF, DISPLAY_ENTRY);
> print ("Enter your membership ID number and password,\n");
> print ("then select submit.\n\n");
> print ("\n");
> print ("");
> print ("Member ID");
> print ("\n");
> print ("");
> print ("");
> print ("Password");
> print ("\n");
> print ("");
> print ("\n");
> print ("\n");
> print "\n";
> }
>
> function display_entry ()
> {
> global $PHP_SELF;
> global $member_id, $password;
>
> $member_id = trim ($member_id);
> if (empty ($member_id))
> die ("No member ID specified");
> if (!ereg ("^[0-9]+$", $member_id))
> die ("Invalid member ID specified (must be a number)");
> if (empty ($password))
> die ("No password specified");
> if (check_pass ($member_id, $password))
> $admin = 0;
> else if (check_pass (0, $password))
> $admin = 1;
> else
> die ("Invalid password");
>
> $query = "SELECT last_name, first_name, suffix, email,"
> . "street, city, state, zip, phone, interests,"
> . "member_id, expiration"
> . " FROM member"
> . " WHERE member_id = $member_id"
> . " ORDER by last_name";
> $result = mysql_query ($query)
> or die ("Cannot execute query");
> if (mysql_num_rows ($result) == 0)
> die ("No user with member_id = $member_id found");
> if (mysql_num_rows ($result) > 1)
> die ("More than one user with member_id = $member_id found");
>
> printf ("\n",
> $PHP_SELF, UPDATE_ENTRY);
>
> hidden_field ("member_id", $member_id);
> hidden_field ("password", $password);
> print ("\n");
> $row = mysql_fetch_array ($result);
> display_column ("Member ID", $row, "member_id", 0);
>
> display_column ("Expiration", $row, "expiration", $admin);
>
> display_column ("Last name", $row, "last_name", 1);
> display_column ("First name", $row, "first_name", 1);
> display_column ("Suffix", $row, "suffix", 1);
> display_column ("Email", $row, "email", 1);
> display_column ("Street", $row, "street", 1);
> display_column ("City", $row, "city", 1);
> display_column ("State", $row, "state", 1);
> display_column ("Zip", $row, "zip", 1);
> display_column ("Phone", $row, "phone", 1);
> display_column ("Interests", $row, "interests", 1);
> print ("\n");
> print ("\n");
> print "\n";
>
> }
>
> function check_pass ($id, $pass)
> {
>
> $query = "Select password from member_pass where member_id = $id";
> if (!($result = mysql_query ($query)))
> die ("Error reading password table");
> if (!($row = mysql_fetch_array ($result)))
> return (FALSE);
> return ($row["password"] == $pass);
> }
>
> function display_column ($label, $row, $col_name, $editable)
> {
> print ("\n");
> printf ("%s\n", htmlspecialchars ($label));
> $value = htmlspecialchars ($row[$col_name]);
> if ($editable)
> {
> $str = sprintf (" $str .= sprintf (" VALUE=\"%s\" SIZE=\"80\">\n", $value);
> }
> else
> $str = $value;
> printf ("%s\n", $str);
> print ("\n");
> }
>
> function update_entry ()
> {
> global $row, $member_id, $password;
>
> $member_id = trim ($member_id);
> if (empty ($member_id))
> die ("No member ID specified");
> if (!ereg ("^[0-9]+$", $member_id))
> die ("Invalid member ID specified (must be number)");
> if (!check_pass ($member_id, $password) && !check_pass (0, $password))
> die ("Invalid password");
> $result = mysql_query ("select * from member where 1 = 0");
> if (!$result)
> die ("Cannot query member table");
>
> $query = "Update member ";
> $delim = "set ";# put "set" before first column,"," before others
> while (list ($col_name, $val) = each ($row))
> {
> $query .= "$delim $col_name =";
> $delim = ",";
>
> $val = trim ($val);
> if (empty ($val))
> {
> if (nullable ($result, $col_name))
> $query .= "NULL";
> else
> $query .= "\"\"";
> }
> else
> $query .= "\"" . addslashes ($val) . "\"";
> }
> $query .= " where member_id = $member_id";
> if (mysql_query ($query) && mysql_affected_rows () > 0)
> print ("Entry updated successfully.\n");
> else
> print ("Entry not updated.\n");
> }
>
> function nullable ($result, $col_name)
> {
> for ($i = 0; $i < mysql_num_fields ($result); $i++)
> {
> if (!($fld = mysql_fetch_field ($result, $i)))
> continue;
> if ($fld->name == $col_name)
> return (!$fld->not_null);
> }
> return (0);
> }
>
> if (empty ($action))
> $action = INITIAL_PAGE;
>
> $title = "Historical League member editing form";
> html_begin ($title, $title);
>
> samp_db_connect()
> or die ("Cannot conn

Re: [PHP] RTFM

2002-01-19 Thread Matt

Yeah, I've seen (and used) that.  But it requires searching.  My idea is to
put together a list of the simple questions in one place ... much like the
apache faq ... and also allowing "world input" like the php manual does.

> You guys have seen this, right?
>
> 
>


-- 
PHP General Mailing List (http://www.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] password=password('$password') <----- ? help me... :P

2002-01-19 Thread Hawk

I've been trying to get this to work for a while, and everyone says that I
should use the same thing, but it doesn't work, can anyone tell me what I'm
doing wrong?
from the form on the previous page I have the $username and $password vars

mysql_connect($host, $user, $pswd);
mysql_select_db($db);
$query = "SELECT username,password FROM users WHERE username='$username' AND
password=password('$password')";
$result = mysql_query($query);
$num = mysql_num_rows($result);

the $query line is made up from what everyone has told me to write..
I tried to add a list($usarname, $pessword) = mysql_fetch_row($result);
and it returned "" .. but when I removed the "AND
password=password('$password')" part the list showed the username and the
password in encrypted form
I don't know how this could help me in any way, but atleast it shows I have
an encrypted password, but the problem is that the line everyone uses
doesn't work.. maybe I need to change some setting in mysql och php.ini or
something? anyone have any idea?
I know I've asked this several times but it doesn't seem like I'm understood
with my problem. Hope I will be now.

Hawk




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




AW: [PHP] password=password('$password') <----- ? help me... :P

2002-01-19 Thread Wolf-Dietrich von Loeffelholz

Try this one .. :) .. 

mysql_connect($host, $user, $pswd);
mysql_select_db($db);
$query = "SELECT username,password FROM users WHERE username='$username'
AND
password='$password'";
$result = mysql_query($query);
$num = mysql_num_rows($result);



-Ursprüngliche Nachricht-
Von: Hawk [mailto:[EMAIL PROTECTED]] 
Gesendet: Samstag, 19. Januar 2002 20:41
An: [EMAIL PROTECTED]
Betreff: [PHP] password=password('$password') <- ? help me... :P

I've been trying to get this to work for a while, and everyone says that
I
should use the same thing, but it doesn't work, can anyone tell me what
I'm
doing wrong?
from the form on the previous page I have the $username and $password
vars

mysql_connect($host, $user, $pswd);
mysql_select_db($db);
$query = "SELECT username,password FROM users WHERE username='$username'
AND
password=password('$password')";
$result = mysql_query($query);
$num = mysql_num_rows($result);

the $query line is made up from what everyone has told me to write..
I tried to add a list($usarname, $pessword) = mysql_fetch_row($result);
and it returned "" .. but when I removed the "AND
password=password('$password')" part the list showed the username and
the
password in encrypted form
I don't know how this could help me in any way, but atleast it shows I
have
an encrypted password, but the problem is that the line everyone uses
doesn't work.. maybe I need to change some setting in mysql och php.ini
or
something? anyone have any idea?
I know I've asked this several times but it doesn't seem like I'm
understood
with my problem. Hope I will be now.

Hawk




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



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




Re: [PHP] Re: Does anyone have the 'edit_member.php' script ....

2002-01-19 Thread Steven Maroney



Ahh so the \ is escaping the space and not the quote. Good one.

On Sat, 19 Jan 2002, Janet Valade wrote:

> The problem is on this line.
> 
> print ("\n");
> 
> There is a space between the \ and the " before Submit.
> 
> Janet
> 
> - Original Message -
> From: "Mike C" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Saturday, January 19, 2002 4:02 AM
> Subject: [PHP] Re: Does anyone have the 'edit_member.php' script 
> 
> 
> > It was suggested I send this to the list. The 'samp_db.inc' file follows
> this. The parse error is:
> > Parse error: parse error in /edit_member.php on line 11
> >
> > #edit_member.php
> >
> >  > include ("/users/mike/documents/include_files/samp_db.inc");
> > define (initial_page, 0);
> > define (display_entry, 1);
> > define (update_entry, 2);
> >
> > function solicit_member_id ()
> > {
> > global $PHP_SELF;
> >
> > printf ("\n",
> > $PHP_SELF, DISPLAY_ENTRY);
> > print ("Enter your membership ID number and password,\n");
> > print ("then select submit.\n\n");
> > print ("\n");
> > print ("");
> > print ("Member ID");
> > print ("\n");
> > print ("");
> > print ("");
> > print ("Password");
> > print ("\n");
> > print ("");
> > print ("\n");
> > print ("\n");
> > print "\n";
> > }
> >
> > function display_entry ()
> > {
> > global $PHP_SELF;
> > global $member_id, $password;
> >
> > $member_id = trim ($member_id);
> > if (empty ($member_id))
> > die ("No member ID specified");
> > if (!ereg ("^[0-9]+$", $member_id))
> > die ("Invalid member ID specified (must be a number)");
> > if (empty ($password))
> > die ("No password specified");
> > if (check_pass ($member_id, $password))
> > $admin = 0;
> > else if (check_pass (0, $password))
> > $admin = 1;
> > else
> > die ("Invalid password");
> >
> > $query = "SELECT last_name, first_name, suffix, email,"
> > . "street, city, state, zip, phone, interests,"
> > . "member_id, expiration"
> > . " FROM member"
> > . " WHERE member_id = $member_id"
> > . " ORDER by last_name";
> > $result = mysql_query ($query)
> > or die ("Cannot execute query");
> > if (mysql_num_rows ($result) == 0)
> > die ("No user with member_id = $member_id found");
> > if (mysql_num_rows ($result) > 1)
> > die ("More than one user with member_id = $member_id found");
> >
> > printf ("\n",
> > $PHP_SELF, UPDATE_ENTRY);
> >
> > hidden_field ("member_id", $member_id);
> > hidden_field ("password", $password);
> > print ("\n");
> > $row = mysql_fetch_array ($result);
> > display_column ("Member ID", $row, "member_id", 0);
> >
> > display_column ("Expiration", $row, "expiration", $admin);
> >
> > display_column ("Last name", $row, "last_name", 1);
> > display_column ("First name", $row, "first_name", 1);
> > display_column ("Suffix", $row, "suffix", 1);
> > display_column ("Email", $row, "email", 1);
> > display_column ("Street", $row, "street", 1);
> > display_column ("City", $row, "city", 1);
> > display_column ("State", $row, "state", 1);
> > display_column ("Zip", $row, "zip", 1);
> > display_column ("Phone", $row, "phone", 1);
> > display_column ("Interests", $row, "interests", 1);
> > print ("\n");
> > print ("\n");
> > print "\n";
> >
> > }
> >
> > function check_pass ($id, $pass)
> > {
> >
> > $query = "Select password from member_pass where member_id = $id";
> > if (!($result = mysql_query ($query)))
> > die ("Error reading password table");
> > if (!($row = mysql_fetch_array ($result)))
> > return (FALSE);
> > return ($row["password"] == $pass);
> > }
> >
> > function display_column ($label, $row, $col_name, $editable)
> > {
> > print ("\n");
> > printf ("%s\n", htmlspecialchars ($label));
> > $value = htmlspecialchars ($row[$col_name]);
> > if ($editable)
> > {
> > $str = sprintf (" > $str .= sprintf (" VALUE=\"%s\" SIZE=\"80\">\n", $value);
> > }
> > else
> > $str = $value;
> > printf ("%s\n", $str);
> > print ("\n");
> > }
> >
> > function update_entry ()
> > {
> > global $row, $member_id, $password;
> >
> > $member_id = trim ($member_id);
> > if (empty ($member_id))
> > die ("No member ID specified");
> > if (!ereg ("^[0-9]+$", $member_id))
> > die ("Invalid member ID specified (must be number)");
> > if (!check_pass ($member_id, $password) && !check_pass (0, $password))
> > die ("Invalid password");
> > $result = mysql_query ("select * from member where 1 = 0");
> > if (!$result)
> > die ("Cannot query member table");
> >
> > $query = "Update member ";
> > $delim = "set ";# put "set" before first column,"," before others
> > while (list ($col_name, $val) = each ($row))
> > {
> > $query .= "$delim $col_name =";
> > $delim = ",";
> >
> > $val = trim ($val);
> > if (empty ($val))
> > {
> > if (nullable ($result, $col_name))
> > $query .= "NULL";
> > else
> > $query .= "\"\"";
> > }
> > else
> > $query .= "\"" . addslashes ($val) . "\"";
> > }
> > $query .= " where member_id = $member_id";
> > if (mysql_query ($query) && mysql_affected_rows () > 0)
> > print ("Entry updated successfully.\n");
> > else
> > print 

[PHP] Re: password=password('$password') <----- ? help me... :P

2002-01-19 Thread LaserJetter

Try changing all the single quotes to double quotes (' to "). As far as I
know, PHP only expands the contents of the variable if it inside double
quotes, otherwise it reads it as $variable

LJ


"Hawk" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've been trying to get this to work for a while, and everyone says that I
> should use the same thing, but it doesn't work, can anyone tell me what
I'm
> doing wrong?
> from the form on the previous page I have the $username and $password vars
>
> mysql_connect($host, $user, $pswd);
> mysql_select_db($db);
> $query = "SELECT username,password FROM users WHERE username='$username'
AND
> password=password('$password')";
> $result = mysql_query($query);
> $num = mysql_num_rows($result);
>
> the $query line is made up from what everyone has told me to write..
> I tried to add a list($usarname, $pessword) = mysql_fetch_row($result);
> and it returned "" .. but when I removed the "AND
> password=password('$password')" part the list showed the username and the
> password in encrypted form
> I don't know how this could help me in any way, but atleast it shows I
have
> an encrypted password, but the problem is that the line everyone uses
> doesn't work.. maybe I need to change some setting in mysql och php.ini or
> something? anyone have any idea?
> I know I've asked this several times but it doesn't seem like I'm
understood
> with my problem. Hope I will be now.
>
> Hawk
>
>
>



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




Re: [PHP] help installing php

2002-01-19 Thread Juni Adi

Ok, I did it through 

./configure --prefix=/usr/local/php3 --with-mysql
--with-apx 

I didn't give the '--with' any directory argument
(and for the prefix, I din't create the directory
first). For the first try, it failed (said that
apx is broken). But after a couple retry, it
worked! Brb..I don't know what hapened behind the
scene (hope somebody could explain to me). 

Now that everything works fine (PHP, MySQL,
Apache), thanks folks for the helps! But still I
have a question:

I unpacked the tar.gz file into /home
directory. I thought that through the
--prefix argument, those files would go to
/usr/local/php3.

After instalation, I checked my /usr/local
directory and found no php3 sub directory
there. Where did those files
go? I'm asking this because I'm thinking of
deleting files under my /home/php-3.0.15
directory (I have to save my disk spaces).


-- 
+
||   Juni Adi  ||
||   Volunteers Alliance for Saving the Nature ||   
||   www.arupa.or.id   ||
+


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




[PHP] Re: password=password('$password') <----- ? help me... :P

2002-01-19 Thread LaserJetter

Forget that last post - sorry!!!

Instead of using password('$password') in the query string, I would insert a
line before connecting to the DB:

$newpass = password($password)<-- dont need quotes round here

then

$query = "SELECT username,password FROM users WHERE username=$username AND
password=$newpass";

As $username and $newpass are already inside double quotes you dont need to
put them in again!!

LJ

"Hawk" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've been trying to get this to work for a while, and everyone says that I
> should use the same thing, but it doesn't work, can anyone tell me what
I'm
> doing wrong?
> from the form on the previous page I have the $username and $password vars
>
> mysql_connect($host, $user, $pswd);
> mysql_select_db($db);
> $query = "SELECT username,password FROM users WHERE username='$username'
AND
> password=password('$password')";
> $result = mysql_query($query);
> $num = mysql_num_rows($result);
>
> the $query line is made up from what everyone has told me to write..
> I tried to add a list($usarname, $pessword) = mysql_fetch_row($result);
> and it returned "" .. but when I removed the "AND
> password=password('$password')" part the list showed the username and the
> password in encrypted form
> I don't know how this could help me in any way, but atleast it shows I
have
> an encrypted password, but the problem is that the line everyone uses
> doesn't work.. maybe I need to change some setting in mysql och php.ini or
> something? anyone have any idea?
> I know I've asked this several times but it doesn't seem like I'm
understood
> with my problem. Hope I will be now.
>
> Hawk
>
>
>



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




Re: [PHP] Re: Does anyone have the 'edit_member.php' script ....

2002-01-19 Thread Miles Thompson


You keener!! Eagle eyes!

At 11:00 AM 1/19/2002 -0800, you wrote:
>The problem is on this line.
>
>print ("\n");
>
>There is a space between the \ and the " before Submit.
>
>Janet
>
>- Original Message -
>From: "Mike C" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Cc: <[EMAIL PROTECTED]>
>Sent: Saturday, January 19, 2002 4:02 AM
>Subject: [PHP] Re: Does anyone have the 'edit_member.php' script 
>
>
> > It was suggested I send this to the list. The 'samp_db.inc' file follows
>this. The parse error is:
> > Parse error: parse error in /edit_member.php on line 11
> >
> > #edit_member.php
> >
> >  > include ("/users/mike/documents/include_files/samp_db.inc");
> > define (initial_page, 0);
> > define (display_entry, 1);
> > define (update_entry, 2);
> >
> > function solicit_member_id ()
> > {
> > global $PHP_SELF;
> >
> > printf ("\n",
> > $PHP_SELF, DISPLAY_ENTRY);
> > print ("Enter your membership ID number and password,\n");
> > print ("then select submit.\n\n");
> > print ("\n");
> > print ("");
> > print ("Member ID");
> > print ("\n");
> > print ("");
> > print ("");
> > print ("Password");
> > print ("\n");
> > print ("");
> > print ("\n");
> > print ("\n");
> > print "\n";
> > }
> >
> > function display_entry ()
> > {
> > global $PHP_SELF;
> > global $member_id, $password;
> >
> > $member_id = trim ($member_id);
> > if (empty ($member_id))
> > die ("No member ID specified");
> > if (!ereg ("^[0-9]+$", $member_id))
> > die ("Invalid member ID specified (must be a number)");
> > if (empty ($password))
> > die ("No password specified");
> > if (check_pass ($member_id, $password))
> > $admin = 0;
> > else if (check_pass (0, $password))
> > $admin = 1;
> > else
> > die ("Invalid password");
> >
> > $query = "SELECT last_name, first_name, suffix, email,"
> > . "street, city, state, zip, phone, interests,"
> > . "member_id, expiration"
> > . " FROM member"
> > . " WHERE member_id = $member_id"
> > . " ORDER by last_name";
> > $result = mysql_query ($query)
> > or die ("Cannot execute query");
> > if (mysql_num_rows ($result) == 0)
> > die ("No user with member_id = $member_id found");
> > if (mysql_num_rows ($result) > 1)
> > die ("More than one user with member_id = $member_id found");
> >
> > printf ("\n",
> > $PHP_SELF, UPDATE_ENTRY);
> >
> > hidden_field ("member_id", $member_id);
> > hidden_field ("password", $password);
> > print ("\n");
> > $row = mysql_fetch_array ($result);
> > display_column ("Member ID", $row, "member_id", 0);
> >
> > display_column ("Expiration", $row, "expiration", $admin);
> >
> > display_column ("Last name", $row, "last_name", 1);
> > display_column ("First name", $row, "first_name", 1);
> > display_column ("Suffix", $row, "suffix", 1);
> > display_column ("Email", $row, "email", 1);
> > display_column ("Street", $row, "street", 1);
> > display_column ("City", $row, "city", 1);
> > display_column ("State", $row, "state", 1);
> > display_column ("Zip", $row, "zip", 1);
> > display_column ("Phone", $row, "phone", 1);
> > display_column ("Interests", $row, "interests", 1);
> > print ("\n");
> > print ("\n");
> > print "\n";
> >
> > }
> >
> > function check_pass ($id, $pass)
> > {
> >
> > $query = "Select password from member_pass where member_id = $id";
> > if (!($result = mysql_query ($query)))
> > die ("Error reading password table");
> > if (!($row = mysql_fetch_array ($result)))
> > return (FALSE);
> > return ($row["password"] == $pass);
> > }
> >
> > function display_column ($label, $row, $col_name, $editable)
> > {
> > print ("\n");
> > printf ("%s\n", htmlspecialchars ($label));
> > $value = htmlspecialchars ($row[$col_name]);
> > if ($editable)
> > {
> > $str = sprintf (" > $str .= sprintf (" VALUE=\"%s\" SIZE=\"80\">\n", $value);
> > }
> > else
> > $str = $value;
> > printf ("%s\n", $str);
> > print ("\n");
> > }
> >
> > function update_entry ()
> > {
> > global $row, $member_id, $password;
> >
> > $member_id = trim ($member_id);
> > if (empty ($member_id))
> > die ("No member ID specified");
> > if (!ereg ("^[0-9]+$", $member_id))
> > die ("Invalid member ID specified (must be number)");
> > if (!check_pass ($member_id, $password) && !check_pass (0, $password))
> > die ("Invalid password");
> > $result = mysql_query ("select * from member where 1 = 0");
> > if (!$result)
> > die ("Cannot query member table");
> >
> > $query = "Update member ";
> > $delim = "set ";# put "set" before first column,"," before others
> > while (list ($col_name, $val) = each ($row))
> > {
> > $query .= "$delim $col_name =";
> > $delim = ",";
> >
> > $val = trim ($val);
> > if (empty ($val))
> > {
> > if (nullable ($result, $col_name))
> > $query .= "NULL";
> > else
> > $query .= "\"\"";
> > }
> > else
> > $query .= "\"" . addslashes ($val) . "\"";
> > }
> > $query .= " where member_id = $member_id";
> > if (mysql_query ($query) && mysql_affected_rows () > 0)
> > print ("Entry updated successfully.\n");
> > else
> > print ("Entry not updated.\n");
> > }
> >
> > function nullable (

[PHP] open/read file/directory and file test

2002-01-19 Thread Juni Adi

On Sun, 20 Jan 2002, Juni Adi wrote:

Hi folks,
After meessing up with installation stuffs, now
it's time for PHP code:

1. How to tell PHP to open a file like Perl do
through:

  open (FILE, $file);

2. Same question, this time to open/read a
directory:

  opendir (DIR, $dir);

and 

  readdir DIR;

3. Do PHP have a file test like -A $file in Perl?


Cheers


-- 
+
||   Juni Adi  ||
||   Volunteers Alliance for Saving the Nature ||   
||   www.arupa.or.id   ||
+


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




Re: [PHP] password=password('$password') <----- ? help me... :P

2002-01-19 Thread Miles Thompson

Hawk,

Pardon me for not following this thread very closely, but I just played 
around at the MySQL console. The fields I have are cName c(20) and 
cPassword(10)

This executed OK
insert admin (cName, cPassword) values ('Deb', password('peaches'));

select cName, cPassword from admin;
returned
Deb : 041ae71715

select cName, cPassword from admin where cName = 'Deb' and cPassword = 
password('peaches');
returned
Empty Set (Uh Oh! -- Thought a bit ...)

select cName, cPassword from admin where cName = 'Deb' and cPassword = 
left(password('peaches'),10);
returned
Deb : 041ae71715

I've left the field names out just for convenience, but this leads me to 
two questions:

1. Password is the name of a function and you're using it as a field name. 
Can you confirm that MySQL isn't choking on that?

2. Could field length be the problem?

A query of this form works
select cName, cPassword from admin where cName = 'Deb' and cPassword = 
left(password('peaches'),10);
so in PHP this should work
$cName = 'Deb';
$cPassword = 'peaches';
$qry = "select cName, cPassword from admin where cName = '$cName' and 
cPassword = left(password('$cPasswordf),10)";
etc 

Have you echoed your query and what does it display?

I hope this is helpful - Miles



At 08:41 PM 1/19/2002 +0100, Hawk wrote:
>I've been trying to get this to work for a while, and everyone says that I
>should use the same thing, but it doesn't work, can anyone tell me what I'm
>doing wrong?
>from the form on the previous page I have the $username and $password vars
>
>mysql_connect($host, $user, $pswd);
>mysql_select_db($db);
>$query = "SELECT username,password FROM users WHERE username='$username' AND
>password=password('$password')";
>$result = mysql_query($query);
>$num = mysql_num_rows($result);
>
>the $query line is made up from what everyone has told me to write..
>I tried to add a list($usarname, $pessword) = mysql_fetch_row($result);
>and it returned "" .. but when I removed the "AND
>password=password('$password')" part the list showed the username and the
>password in encrypted form
>I don't know how this could help me in any way, but atleast it shows I have
>an encrypted password, but the problem is that the line everyone uses
>doesn't work.. maybe I need to change some setting in mysql och php.ini or
>something? anyone have any idea?
>I know I've asked this several times but it doesn't seem like I'm understood
>with my problem. Hope I will be now.
>
>Hawk
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] password=password('$password') <----- ? help me... :P

2002-01-19 Thread Miles Thompson

I've got a typo near the bottom:
left(password('$cPasswordf),10)";
should be
left(password('$cPassword'),10)";

(Strange, the "f" is nowhere near " ' ")
mt

At 05:41 PM 1/19/2002 -0400, Miles Thompson wrote:
>Hawk,
>
>Pardon me for not following this thread very closely, but I just played 
>around at the MySQL console. The fields I have are cName c(20) and 
>cPassword(10)
>
>This executed OK
>insert admin (cName, cPassword) values ('Deb', password('peaches'));
>
>select cName, cPassword from admin;
>returned
>Deb : 041ae71715
>
>select cName, cPassword from admin where cName = 'Deb' and cPassword = 
>password('peaches');
>returned
>Empty Set (Uh Oh! -- Thought a bit ...)
>
>select cName, cPassword from admin where cName = 'Deb' and cPassword = 
>left(password('peaches'),10);
>returned
>Deb : 041ae71715
>
>I've left the field names out just for convenience, but this leads me to 
>two questions:
>
>1. Password is the name of a function and you're using it as a field name. 
>Can you confirm that MySQL isn't choking on that?
>
>2. Could field length be the problem?
>
>A query of this form works
>select cName, cPassword from admin where cName = 'Deb' and cPassword = 
>left(password('peaches'),10);
>so in PHP this should work
>$cName = 'Deb';
>$cPassword = 'peaches';
>$qry = "select cName, cPassword from admin where cName = '$cName' and 
>cPassword = left(password('$cPasswordf),10)";
>etc 
>
>Have you echoed your query and what does it display?
>
>I hope this is helpful - Miles
>
>
>
>At 08:41 PM 1/19/2002 +0100, Hawk wrote:
>>I've been trying to get this to work for a while, and everyone says that I
>>should use the same thing, but it doesn't work, can anyone tell me what I'm
>>doing wrong?
>>from the form on the previous page I have the $username and $password vars
>>
>>mysql_connect($host, $user, $pswd);
>>mysql_select_db($db);
>>$query = "SELECT username,password FROM users WHERE username='$username' AND
>>password=password('$password')";
>>$result = mysql_query($query);
>>$num = mysql_num_rows($result);
>>
>>the $query line is made up from what everyone has told me to write..
>>I tried to add a list($usarname, $pessword) = mysql_fetch_row($result);
>>and it returned "" .. but when I removed the "AND
>>password=password('$password')" part the list showed the username and the
>>password in encrypted form
>>I don't know how this could help me in any way, but atleast it shows I have
>>an encrypted password, but the problem is that the line everyone uses
>>doesn't work.. maybe I need to change some setting in mysql och php.ini or
>>something? anyone have any idea?
>>I know I've asked this several times but it doesn't seem like I'm understood
>>with my problem. Hope I will be now.
>>
>>Hawk
>>
>>
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] open/read file/directory and file test

2002-01-19 Thread DL Neil

Juni,

> On Sun, 20 Jan 2002, Juni Adi wrote:
> 
> Hi folks,
> After meessing up with installation stuffs, now
> it's time for PHP code:
> 
> 1. How to tell PHP to open a file like Perl do
> through:
> 
>   open (FILE, $file);
> 
> 2. Same question, this time to open/read a
> directory:
> 
>   opendir (DIR, $dir);
> 
> and 
> 
>   readdir DIR;
> 
> 3. Do PHP have a file test like -A $file in Perl?


These questions (and more) are answered at 
http://www.php.net/manual/en/ref.filesystem.php
There seem to be many similarities, but sorry can't help with comparisons between Perl 
and PHP.

Regards,
=dn



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




Re: [PHP] open/read file/directory and file test

2002-01-19 Thread Miles Thompson

Juni,

It's read the manual time  http://www.php.net
and use the function search box on the top right for "file" and then for 
"directory". They are separated, and there are a number of functions.

As I don't know Perl I can't answer 3. (I must be morally deficient!)

Miles


At 04:39 AM 1/20/2002 -0500, Juni Adi wrote:
>On Sun, 20 Jan 2002, Juni Adi wrote:
>
>Hi folks,
>After meessing up with installation stuffs, now
>it's time for PHP code:
>
>1. How to tell PHP to open a file like Perl do
>through:
>
>   open (FILE, $file);
>
>2. Same question, this time to open/read a
>directory:
>
>   opendir (DIR, $dir);
>
>and
>
>   readdir DIR;
>
>3. Do PHP have a file test like -A $file in Perl?
>
>
>Cheers
>
>
>--
>+
>||   Juni Adi  ||
>||   Volunteers Alliance for Saving the Nature ||
>||   www.arupa.or.id   ||
>+
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Re: Does anyone have the 'edit_member.php' script ....

2002-01-19 Thread Mike C

Hi Janet,

>
>The problem is on this line.
>
>print ("\n");
>
>There is a space between the \ and the " before Submit.

Yes indeed :-(, how could I miss that 

Your wonderful :-) Thank you (and others) so much.

Regards
Mike C
-- 


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




Re: [PHP] RTFM

2002-01-19 Thread B. van Ouwerkerk


>Yeah, I've seen (and used) that.  But it requires searching.  My idea is to
>put together a list of the simple questions in one place ... much like the
>apache faq ... and also allowing "world input" like the php manual does.

Sorry.. can't resist to reply :)

 From what I've seen it doesn't matter how many faqs minifaqs.. 
whateverfaqs you create.. Some will never learn cause the don't spend 
enough time to understand.. There are more then enough tutorials out there 
for anyone to find.

How to learn PHP, or any other language: tutorials, manuals/books online or 
printed. Spending a LOT of time.. testing.. playing..

Bye,


B.


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




[PHP] Re: application variable

2002-01-19 Thread Joe Van Meer

Hi there, I usually test at the top of the page that does my 'logging-in' to
see if the variable I set for each user once they actually login is set.
So if I set a variable called '$isloggedin' upon a successful login, I would
check at the top of that page to see if it is set or not, if it's already
set bypass the login and redirect them to a new page.

HTH Joe :)




Ye Tun <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Do we have application variable in PHP as in ASP?
>
> I have a small database running with user name and password kept in MySQL
> database.  Once user is login, how can I prevent the same user from
> logging in again?
>
> REgards,
>
> Ye
>



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




Re: [PHP] RTFM

2002-01-19 Thread Miles Thompson

B.

Yeah - play. It's the only way --  take a function, use it the right way 
and the wrong way. Can it be combined with other functions. What quirks of 
punctuation are there, etc etc.

You know, I'd forgotten that too -- piddling about brings returns.

Now excuse me, I have to go play with an array.

Ah, true geekdom - Miles

At 11:38 PM 1/19/2002 +0100, B. van Ouwerkerk wrote:

>>Yeah, I've seen (and used) that.  But it requires searching.  My idea is to
>>put together a list of the simple questions in one place ... much like the
>>apache faq ... and also allowing "world input" like the php manual does.
>
>Sorry.. can't resist to reply :)
>
> From what I've seen it doesn't matter how many faqs minifaqs.. 
> whateverfaqs you create.. Some will never learn cause the don't spend 
> enough time to understand.. There are more then enough tutorials out 
> there for anyone to find.
>
>How to learn PHP, or any other language: tutorials, manuals/books online 
>or printed. Spending a LOT of time.. testing.. playing..
>
>Bye,
>
>
>B.
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] Variable referencing/substitution

2002-01-19 Thread Gaylen Fraley

How can this be done?

If I have the name of a variable that is stored in an array, how do I use
the stored value to represent the actual variable?

Example:

$variable = "old value";
$vNames[1] = '$variable';  //literal $variable

I want to say $vNames[1] = "new value";  /and have $variable actually
change.

How?

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com/
PHP KISGB v3.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/




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




[PHP] Re: Variable referencing/substitution

2002-01-19 Thread Fred

See the manual on references:
http://php.he.net/manual/en/language.references.php
$vNames[1] = &$variable

Fred

Gaylen Fraley <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How can this be done?
>
> If I have the name of a variable that is stored in an array, how do I use
> the stored value to represent the actual variable?
>
> Example:
>
> $variable = "old value";
> $vNames[1] = '$variable';  //literal $variable
>
> I want to say $vNames[1] = "new value";  /and have $variable actually
> change.
>
> How?
>
> --
> Gaylen
> [EMAIL PROTECTED]
> Home http://www.gaylenandmargie.com/
> PHP KISGB v3.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/
>
>
>



-- 
PHP General Mailing List (http://www.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] Upload & View Image

2002-01-19 Thread Thomas Edison Jr.

Hi,

I have a penpal system running on a site. I want to
add a feature wherein the person can upload his image
and when somebody views the PenPal list, the uploaded
image is shown next to his ad.

Can we also control the Image Width & Height? I mean
when the Image is displayed, it should be in a Size i
want, and not any size. And also the File Size.. i
dont' want very heavy images uploaded. Can that be
restricted?

Thanks,
T. Edison jr.


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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




[PHP] imap problems

2002-01-19 Thread Cary Mathews

I am trying to get twiggi-gw (http://sourceforge.net/projects/twiggi/) to
run on an OpenBSD 2.9 system using Apache 1.3.22 with php 4.1.1 compiled
as a static module. Is this even possible?  I'm starting to think it is
not!

php is configured with the --with-imap, --with-mysql, and --with-apache
options. php does not seem to have any problems with these flags.
However, when compiling apache, I got errors relating to my c-client
linker module (?) : /usr/local/lib/libc-client.so.2.1.  The actual error
message doesn't come to mind at the moment.

So I tried recompiling the imap binary; I'm using the one which comes with
pine4.44. When I configured php with --with-imap=/tmp/pine4.44, it told me
it should be --with-imap-ssl. So I changed it to
--with-imap-ssl=/tmp/pine4.44, and re-configured it. No problems with php
or apache this time. Apache and php both work wonderfully.  But when I run
the twiggi installation test, I get the following error regarding imap:

Fatal error:  Call to undefined function:  imap_rfc822_parse_adrlist() in
/usr/local/apache/htdocs/twiggi/lib/mail/php-imap.inc.php on line 873

After reading the Zend and Php.net pages regarding imap, I copied the new
libc-client.a, rfc822.h, mail.h, and linkage.h files to my include path,
and tried recompiling once more.  Again, php, apache compiled fine, but
the same error as above occured.

Why did php tell me it configured in imap functionality and then give me
this error?

Any help, additional documentation would be greatly appreciated!
Cary




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