You might want to think about client side validation as well.
This infomrs the user of any probelms *before* it hits your server.
Now, this does *not* remove the step of form value checking on the server.
Check out...
http://groups.yahoo.com/group/javascript_validation/
A nice little clien
How can I determine if a given UNIX timestamp is out of range on the current
system?
Right now I get an error thrown that tells me the timestamp is out of range.
I'd like to "catch" that error, deal with it in my own manner, and not have
the user see what went wrong.
Thanks
Walter
--
PHP Gene
I should have posted some "rules" with this...
assuming:
- a SPACE is used to delimit first from last name [Walter Torres]
- a HYPHEN is used to separate a dual name (British style) [Conrad-Smyth]
- an APOSTROPHE is used in many Irish and Scotish names [O'Reilly]
- a PERIOD is used in titles,
I've hit my limit on regular expressions.
I need to check a string to see if it contains legal characters...
A thru Z [a-z], SPACE, PERIOD, DASH/HYPHEN, APOSTROPHE [\' -,\.]
OK, this is not a problem.
My problem comes in with extended characters, as these examples...
González
Vänligen
för
Why does...
// assume October...
setlocale(LC_TIME, "de_GR");
echo strftime("%d. %B %Y");
gives me 'October'?
and this...
// assume October...
setlocale(LC_TIME, "de");
echo strftime("%d. %B %Y");
gives me 'October'?
and this...
// assume October...
setlocale(LC_TIME,
"Martin Towell" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > Hi everybody!
> >
> > Have somebody any idea how I could do something like that?
> >
> > > settype($phpScreenWidth, "string");
> > settype($phpScreenHeight, "string");
> > ?>
This is a servers
I have an array... [ sample of contents below]
[0] =>
[1] => # words are recognized ceaselessly: true, yes, on, false, no,
off.
[2] => # ---
[3] =>
[4] =>
[5] => # The mailing address of the list.
[6] => # If e
"Daevid Vincent" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Here is a snippet from my dhcp web page found on my site below... Not
> exactly what you want, but could help you start...
thanks!
> // read in the dhcp_map.ini file to map MAC addresses to images
> $mapFile = "./dhc
"- Edwin -" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wed, 22 Oct 2003 03:10:44 -0500
> "jsWalter" <[EMAIL PROTECTED]> wrote:
>
> [snip]
> > There must be a better way to do this.
> [/snip]
>
> http://www.php.ne
I need to read (write comes later) from a config file that we used to handle
manually.
I'm getting lazy, so I'm writing a web interface for this.
What I have does this...
- open a given file
- dump entire file into a string
- explode string into an array at the EOL marker
- walk down this
"Robert Cummings" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> See the "include_path" setting in your php.ini file.
Right!
I have many classes I've pulled from phpclasses.org.
They all sit in a CLASSES directory inside my PHP directory.
Just like PEAR, same format as well.
Ju
"Tom Rogers" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Those locales actually have to be available or they will be ignored and
that
> will depend on what type of system your running on.
OK, I'm on Windows 2k, and after reading Microsofts docs, I thought it was
all there.
Mayb
"Tom Rogers" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> Sunday, September 28, 2003, 5:39:53 PM, you wrote:
> j> I found this function, setlocale...
>
> j> now, is there a way to GET the LOCALE setting of a machine?
>
> j> Walter
>
>
> call setlocale with 0 (zero or NULL)
I found this function, setlocale...
now, is there a way to GET the LOCALE setting of a machine?
Walter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
"Greg Beaver" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Walter,
Hi Greg...
> in PHP 4, you can kludge this:
>
> Class Foo
> {
> function getBaz($set = null)
> {
> static $_TintBaz = 9;
> if (!is_null($set)) {
> $_TintBaz = $set;
>
Is there a way that a method within a Class, when called statically, can
access a property of that Class?
Class Foo
{
var $_TintBaz = 9;
function getBaz()
{
return Foo::_TintBaz; // <-- line 8
}
}
echo Foo::getBaz();
This returns...
Parse error:
"Martin Towell" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What about something like this?
I've been playing with that same approach this evening.
But I guess I was hoping for a more direct, 1 level of inderection instead
of 2.
But, by making a "base" method in the main cl
I have a quandary and I hope I can explain myself well enough that someone
may understand and enlighten me.
I am in the middle of building a (largish) Class. It is done for the most
part, at least all pieces are there. Now I'm just trying to put the pieces
together in a logical order.
This is my i
That's it!
It works like a charm!
Thank you very, very much!
Walter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have a link on a page...
Add or Update Your Event
This open the PHP file just fine and passes the vars fine.
But I need a new window to open via JavaScript. Why? Because I have a
"RETURN" link on the opening page that closes the child page, and if this
new window is not opened
I use Homesite.
It has plug-ins for PHP so you have tps and cose completion.
I just modified another plug it has so I can see then entire list of methods
a script has in a window, which can then jump to, scroll to, insert here.
And I can hit F-12 and it will talk to my apache server and run the
"Harry Yau" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
> I am writing a HTML page to gather whole bunch of information
> provided by user and pass it to the PHP script to generate a report base
> on these information. Namely, user inputs data in textfields of a HTML
>
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Although i dont code for pear standards, i must recommend learning the
pear
> code, its how i taught myself classes.
I concur.
It is how I am learning this stuff.
That and my stupid questions to this list (see previous posts just
yes
"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> The constructor should be as quick as possible and have as little
> logic as possible. What kind of failure are you trying to catch?
not really trying to 'catch' a failure.
I have to parse the given string format and d
"Raditha Dissanayake" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> hi,
>
> It's generaly considered that constructors are supposed return an
> instance of that class. Use a factory instead if you want to return nulls;
A Factory?
OK, I'll look that up, do some readng and try tha
Thanks Curt for your reply.
It helped my head a bit.
Walter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I've read the entire manual on classes, and I did not see an answer to my
question.
I see how to access methods of a parent from the child...
parentName::foo();
or
parent::foo();
but I would like to gain access to read and/or modify properties from the
parent.
Yes, I built getters tha
I found this in the docs...
If you want your constructor to possibly not create the object
class A
{
function A()
{
// ...
// some error occurred
$this = null;
return;
}
}
I tested it, it works great.
Then I read on...
Setting $
I'm in the process of building my first "real" class.
43 methods, 23 properties, nearly 1000 lines of codes.
What I would like to know...
Is it better to keep al this in a single file? Or break it up into
sub-classes?
This does have logical sections, so a breakup would be possible, but then
I'm
Once again, I ask a stupid question, wotk on it some more and find the
answer under my nose.
Thanks anyway, I have what I'm looking for.
Walter
BTW: If you would like to know what I did, or even look at it and comment...
===
/*
American Standard Format - accepts SLASH or DASH
Thanks for the pointer, but this only deals with date/time in EPOCH range.
I'm trying to handle dates pre-epoch.
Thanks
Walter
"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote jsWalter ([EMAIL PROTECTED]):
> > I hav
I have a fairly complicated regular expression that was written for perl.
I've spent the last 4 days trying to convert it to PHP.
I guess I'm just that bright.
I can't even get the sub parts (between the || to work, much less the
conditionals
Would someone mind showing me how I can make this wo
I have a complete setup and testing procedure for windows class machines.
Hope it can help you.
www.torres.ws/dev/php
Walter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Evans, thx for your effort.
I see what your says, as I noticed the trouble at 3 this morning!
This is how I fixed it...
$session = &Auth::_importGlobalVariable("session");
$session[$this->_sessionName]['data']['_loginAttempts'] =
$this->_loginAttempts;
Pretty much the way you indicated.
I have a parent Class that does this in one of it's methods...
$session = &Auth::_importGlobalVariable("session");
$session[$this->_sessionName]['registered'] = true;
I would like to "hook" into this in on eof my methods in a child class
I thought I could do this...
[538] $se
Thanks.
That is waht I needed to know!
It works!
Thanks
Walter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am trying to see how many times a person has tried to log in during a
session.
the login script...
$objAuth->start();
if ($objAuth->getAuth()) // is user logged in already
...display hello page...
else
...display login page
OK, so far so good.
If the user punches in an
"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> jsWalter wrote:
> > I'm wanting to EXTEND the orginal class.
> >
> > meaning, my THECHILD class efines new methods/properties, and I want it
used
> > as if it was part
> -Original Message-
> From: Matt Matijevich [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 03, 2003 11:21 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP] Q on Class and EXTEND
>
>
> I dont know much about classes, but dont you want
>
> $a = new THECHILD('walter')
I found a piece of code in the docs, and thought it was a way to EXTEND a
Class with new properties tha cna be accessed from original Class Object.
can someone tell me what I did wrong?
Thx
Walter
=
name = $newName ;
}
}
class THECHILD extends THEPARENT {
var $abc;
this difference bewteen A and B below?
A)$a = &new className(true, 6);
B)$a = new className(true, 6); /* missing & on the NEW */
thanks
walter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
If I am in a second level IF conditional and it failes, I want to jump out
of the parent IF.
How can I do that?
Thanks
Walter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Can someone tell me why all mt PHP generated HTML has this pre-pended to it?
And how can I turn it off?
Thanks
Walter