Re: [PHP] Ereg ()

2002-04-16 Thread Erik Price
tch('/^[A-Za-z0-9][A-Za-z0-9%!:;,]{5,}[A-Za-z0-9]$/', $string); > > The above regex will only match a string that begins with A-Z or a-z or > 0-9, then any number of characters that are in the middle character > class, then a final A-Z or a-z or 0-9. > > I think. Try

[PHP] unset() on arrays

2002-04-16 Thread Erik Price
the array is being unset, and I was just curious if anyone knew for sure whether this works the way I think it does. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Conditions within a function

2002-04-16 Thread Erik Price
a common mistake for new PHP coders. Even a single line of whitespace sent before the header() line will screw it up, and this applies to all header() types, not just "Location:". Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] formatting form input

2002-04-16 Thread Erik Price
(). Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] format date

2002-04-16 Thread Erik Price
to whatever format you like for display. (Also, be sure to use either DATE_FORMAT or UNIX_TIMESTAMP in MySQL queries to pull the data out in a desired format! Much better than running string functions on the date result after the fact.) Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem grabbing value of session

2002-04-16 Thread Erik Price
> am I > missing? You'll have to post the context of this function (how it is called in the script) for an answer to this question. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] superglobal var names can't access object methods?

2002-04-16 Thread Erik Price
le. Now that you've heard my life story... Does anyone know of any reasons why I might be getting the "undefined function" error? Am I unable to use a superglobal ($_SESSION['prfolder']) as the name of an object when attempting to use a method of that object (as in

Re: [PHP] Re: superglobal var names can't access object methods?

2002-04-16 Thread Erik Price
ake some lines out of my code if I can avoid this. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] form posting to a fake page

2002-04-17 Thread Erik Price
variables), you will need to come up with a way to pass this data along to the redirected-to page. Again, I could be completely off-base in this assumption, I'm just working off of logic here and not any knowledge of how Apache's redirect actually works. Erik Erik Price Web

Re: [PHP] form posting to a fake page

2002-04-17 Thread Erik Price
grab the GET and POST data and throw it onto the querystring. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] unsetting object references

2002-04-17 Thread Erik Price
exist. $_SESSION['object'] = serialize($object); (in another script:) $object = unserialize($_SESSION['object']); // do some stuff with $object unset($object); What's going on with my $_SESSION['object'] ? Erik Erik Price Web Developer Temp Media Lab, H.H. B

Re: [PHP] unsetting object references

2002-04-17 Thread Erik Price
ill > referencing > it. You will just break the reference. Correct me if I'm wrong *chuckle* What if I did $objectFoo = new MyObject; $objectFee = $objectFoo; unset($objectFoo); essentially, does PHP make a (deep|shallow) copy of an object in this reassignment, or is it just creating

Re: [PHP] sessions protection

2002-04-17 Thread Erik Price
right source (superglobal array, actually). BTW if you are using PHP 4.1.x, the manual suggests that you use isset($_SESSION['auth_user']) rather than session_is_registered(). Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] form posting to a fake page

2002-04-17 Thread Erik Price
iguel, and myself earlier, was suggesting. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Error Handling Class - Any Recommendations?

2002-04-18 Thread Erik Price
mValidatorClass/page1.html Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] function returning true or errors

2002-04-18 Thread Erik Price
function performs some logic that determines what kind of error message to give. I was thinking of having the function return "1" if succeeds, "2" if error code A, or "3" if error code B, and then a switch statement could decide what to do in the calling script -- but

Re: [PHP] Re: function returning true or errors

2002-04-18 Thread Erik Price
keep my script's switch() statement nice and clean. But in this case, it just was too much trouble (I was also running into a situation where I had to deal with a global variable, etc). Since I don't really need this anywhere else in the script, I don't really even need it to be

Re: [PHP] Tabs + SELECTED

2002-04-18 Thread Erik Price
te then you will want to investigate the *focus-related attributes. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] function returning true or errors

2002-04-18 Thread Erik Price
On Thursday, April 18, 2002, at 11:56 AM, Jason Wong wrote: > What I tend to do is define functions like so: > > function doo($dah, $dib, &$error) { > ... > I had not even thought about passing an extra parameter by reference -- great idea. Erik Erik Price

[PHP] limit on extended classes

2002-04-18 Thread Erik Price
Is there a limit on how many times you can extend a class in PHP 4? Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Number checker

2002-04-18 Thread Erik Price
a regex: preg_match('/^\d+$/', $test); Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] limit on extended classes

2002-04-18 Thread Erik Price
owed one level of extension. I just want to make sure this isn't the case for PHP 4. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Array Question

2002-04-19 Thread Erik Price
> My question is what function should I use to iterate array elements > (with > arrays in it)? $arr3 = (list($arr3) = each($arr2)); I think. Untested. Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how to popup a new browser window from php

2002-04-19 Thread Erik Price
What about target="_blank" ? I didn't think this was JavaScript, but achieves the same effect. Or is it JavaScript? Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] .inc over .php

2002-04-19 Thread Erik Price
fe from being served directly. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] .inc over .php

2002-04-19 Thread Erik Price
e it's as easy as Order allow,deny Deny from all Not sure about IIS though. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] official statement about PHP file extensions?

2002-04-19 Thread Erik Price
t; traffic/big" sites > Some ISP´s suggest that you use php3/4 extensions, as they have both > versions > running. Yeah, it really only depends on the web server. I saw someone just the other day posting on this list who had their httpd.conf set to parse any ".asp"-suff

Re: [PHP] Re: how to popup a new browser window from php

2002-04-19 Thread Erik Price
On Friday, April 19, 2002, at 08:00 AM, Wo Chang wrote: > I think I didn't make myself clear. I want > to use php command to popup a dialog or window > msg to alert user like the Javascript "alert" > without using javascript. no Erik Price Web Developer

Re: [PHP] how to popup a new browser window from php

2002-04-19 Thread Erik Price
eah, but nobody said anything about JavaScript "alert" or controlling the size/specs -- I was responding to the first email that Wo Chang sent, where Wo asked about a new browser (which I assumed meant "new browser window", not "javascript alert box"). Erik > on 19

Re: [PHP] GMT Time

2002-04-19 Thread Erik Price
> only, the table timestamp is GMT time and the time function is returning > local time. How do I convert time() to GMT time? MySQL has a function called NOW() which returns the current time. Use it: SELECT field FROM table WHERE table.time < NOW() Erik Price Web Developer Tem

Re: [PHP] php permissions

2002-04-19 Thread Erik Price
hem. > > How do I give php permissions to delete files etc., without opening up > an security hole? Is this an issue at all? First hit at Google: http://www.w3.org/Security/Faq/ Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing Lis

Re: [PHP] php permissions

2002-04-19 Thread Erik Price
thing. But you leave yourself open to exploitation by other users of the Dark side. However, if you invest a lot of time and effort (A LOT) into your Jedi training, you can continually learn how to secure your system or write clean code or normalize your database tables until 900 years old you re

Re: [PHP] GMT Time

2002-04-19 Thread Erik Price
ry($sql, $db); echo "\n"; while ($row = mysql_fetch_assoc($result)) { echo "" . $row['field'] . "\n"; } echo "\n"; HTH, I'm gone for the weekend. Erik PS: if my math was wrong or I went in the wrong direction, sorry, but do some playing ar

Re: [PHP] $HTTP_*_VARS ?

2002-04-22 Thread Erik Price
> newest ) and newest PHP release. You don't want to use $HTTP_*_VARS. You want to use $_* ($_SESSION, $_COOKIE, $_GET, $_POST, $_SERVER, etc) Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To u

Re: [PHP] Empty $_SESSION and $_POST ??

2002-04-22 Thread Erik Price
s "variable=1" or something on the querystring in your browser. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP editor for windows

2002-04-22 Thread Erik Price
iting? Sounds pretty cool. (stupid Monday morning humor) Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $HTTP_*_VARS ?

2002-04-22 Thread Erik Price
hen type the name of the variable. Then type another apostrophe, and the closing bracket, like this: $_GET['variablename'] Now you know how to use them. If you continue to have problems, please try to describe them so that others on this list can come up with helpful information. Whe

Re: [PHP] PHP editor for windows

2002-04-22 Thread Erik Price
> my day > started 8 hours ago!) I was thinking of Adam Sandler. I think it was "Happy Gilmore". Shooter McGrath makes threats, then: "I eat shit like you for breakfast!" Happy Gilmore: "You eat shit for breakfast?" Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $HTTP_POST_VARS vs _POST

2002-04-22 Thread Erik Price
you had just tried it. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Empty $_SESSION and $_POST ??

2002-04-22 Thread Erik Price
] unless you set it so. > Once I figure out how I'm supposed to write the variables in the > scripts, > I'll be OK. But I'm so CONFUSED!  */ > > if  ($bozo == "") die ("Please enter your 'First Name'. Click > 'Back" in your browser to enter this information."); This is fine. > /* This page is actually a confirmation page, I've tried to collect the > info > from page 1 ($bozo) and page 2 ($dodo) and print them to screen as in */ > > $bozo = $_GET['bozo']; > $dodo = $_GET['dodo']; > > print $bozo $dodo; > > /* I've also tried $_SESSION['bozo'], $_GET['bozo'], left out the > '$bozo = $_GET['bozo']' etc, etc, etc. -- I don't know what I'm doing > here!! Help! !  */ > ?> What seems to be the problem here? Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Empty $_SESSION and $_POST ??

2002-04-23 Thread Erik Price
ing. Test to make sure that your PHP binary is working correctly, with the following script: test My name is: " . $_GET['name'] . "\n"; } else { print " \n"; } ?> If you look carefully at this script, you will see that I have broken out of strings and used the dot to concatenate the superglobals into the string. Note that PHP_SELF, which you may have formerly called $PHP_SELF, is in fact a member of the SERVER array, so you need to use this as a superglobal too. Again, in this case, I have jumped out of the string to concatenate $_SERVER['PHP_SELF'] to the rest of the form. Let me know if this does or doesn't work for you. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] The so-called improvment in PHP 4.2.0

2002-04-23 Thread Erik Price
pace/scope? (I use that last term loosely.) IMHO that is much lazier than using superglobals with register_globals off. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] dynamic drop down

2002-04-23 Thread Erik Price
#x27;t sure what I'm talking about I can write up an example. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] The so-called improvment in PHP 4.2.0

2002-04-23 Thread Erik Price
ifferent interpretations of laziness. The coder must still be vigillant regarding user input, and check everything. But superglobals, imho do tend to reduce the sloppiness of the final code. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP Gener

Re: [PHP] Re: {PHP] Empty $_SESSION and $_POST??

2002-04-23 Thread Erik Price
> I think I'll get used to dot notation [I used it a lot in Paradox PAL] > and re-do my scripts properly. I'll get back to you on how it goes. > > Thank-you very much, Eric -- your advice and your excellent help is > really > what OpenSource is all about. Hey no prob

Re: [PHP] Question for Linux users...

2002-04-23 Thread Erik Price
ur comments might spark something. :) Offlist is actually appropriate for any response to this thread. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Header variables

2002-04-24 Thread Erik Price
ient or the server, depending on who sends and who receives the entity. HTH, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] comparing time (related question)

2002-04-24 Thread Erik Price
27;s DATE_FORMAT() or UNIX_TIMESTAMP() functions, and PHP's date() function, let you manipulate these numbers in any way you prefer for display, once the database has performed its work. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP Gen

Re: [PHP] Destroy a session var passed as an argument

2002-04-24 Thread Erik Price
h the name $mensagem, but you are not passing the value by reference -- try this: function showError(&$mensagem) // note the '&' before $mensagem { return '' . $mensagem . ''; } And let me know if that works or doesn't work. (It's kind of a hunch

Re: [PHP] Destroy a session var passed as an argument

2002-04-24 Thread Erik Price
might not be able to do it without explicitly trying unset($_SESSION['forum']['error']['insert']); Good luck, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Setcookie problems...

2002-04-24 Thread Erik Price
is?? Is the different directory pointed to by a different virtual host? I could be completely mistaken, but don't cookies only work on a per-domain name basis? If that's not it, I don't know what else it could be. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown

Re: [PHP] newbie: string manipulation

2002-04-24 Thread Erik Price
show me how to do this? http://www.php.net/manual/en/function.basename.php Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Apache->Php->MySql(GD,ZLib,LIBJPEG,LIBPNG)

2002-04-24 Thread Erik Price
" "eeEERE BOY!" "lookout!" "phht!" "yuk yuk" So funny! Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie Book & Database Question

2002-04-25 Thread Erik Price
orm or including vars on the querystring in a href attribute, make sure that in the "receiving" script you use $_GET['varname'] instead of $varname (as the book will no doubt use). Same for $_COOKIE, $_SERVER, $_SESSION, $_SERVER (read the man page for this one), and $_POS

Re: [PHP] basename unix/windows

2002-04-25 Thread Erik Price
only knows "/" Just make sure that you never need to use this particular code on a Unix-style path with an escaped character or space, such as this: /home/eprice/includes/php\ scripts/script.php Of course, it's very rare to see the above, but should be a consideration. Erik

Re: [PHP] New "Variables"

2002-04-25 Thread Erik Price
viously they would not have done it if there was'nt an urgent reason > for it. As Kirk Johnson told me when I asked the same question a few months back: "Give this a read first, then come back and ask if you still have questions." http://www.securereality.com.au/studyinscarlet.t

Re: [PHP] Array function to delete

2002-04-25 Thread Erik Price
nd that > will delete the third member in the array (which would > be 4 above), so that the array would contain 1, 2, 3, > 5. > > Is there such a function? It's a secret. Sshh! unset($a[0]); // removes the first element Erik Erik Price Web Developer Temp Media

Re: [PHP] Array function to delete

2002-04-25 Thread Erik Price
This gives you an array called $newlistitems. Each element in $newlistitems is an element from the old $listitems that does not match $item. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Ordering output

2002-04-25 Thread Erik Price
_id' order by pts DESC, > score_for DESC, score_against DESC, score_differential DESC, max_pt > DESC, name ASC Only problem -- what is $sea_id ? I need to know your WHERE criteria. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] > --

Re: [PHP] Code Troubles

2002-04-26 Thread Erik Price
te database is unavailable."); > > return $dbcnx; > } > ?> Well, you've simply defined a few variables and then a function. Do you expect it to do something? Show us the context in which this function is used. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] good php editor for the mac

2002-04-26 Thread Erik Price
for the upgrade. There is also a full version demo of BBEdit that has all of the features, which works for 25 days or something like that. Check it out, I did and promptly ordered my copy within a few days. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL

Re: [PHP] passing vars. betn. php and javascript

2002-04-26 Thread Erik Price
ke foreach ($_GET['freaks'] as $freak) { print $freak; } Or whatever processing you need to do. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] web application development question

2002-04-26 Thread Erik Price
RNAME the other being VALUE, and pull this kind of standalone data out of it, but was curious what other people do when they need to store something like this. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php

Re: [PHP] Sessions with register_globals = off

2002-04-26 Thread Erik Price
myVar; This is not what the documentation says. http://www.php.net/manual/en/ref.session.php You should use $_SESSION['myVar'] = $myVar; Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] web application development question

2002-04-26 Thread Erik Price
s thinking of using the database... ... well, I may just keep it in an include file, and if anyone ever needs to change the data, I'll explain in the documentation where the data should be changed. Thanks for the tips guys Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [

Re: [PHP] Variables not set

2002-04-26 Thread Erik Price
ing accessible to a function definition in Python, but not in PHP), they seem to be comparable. Is this the case? Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] IMPORTANT question for anyone using XSLT

2002-05-13 Thread Erik Price
tc... > > then, in stylesheet, for instance: > > select="document('arg:/MySecondBuffer')/MyNode"/> > > etc, etc. > > On Mon, 01 Apr 2002 11:08:12 -0500, Erik Price wrote: > > >> On Friday, March 29, 2002, at 01:56 PM, Erik Price wrote: >

[PHP] OOP with PHP

2002-05-21 Thread Erik Price
ect. This contradicts my limited experience with OOP in PHP, but I hoped someone could confirm this before I write up this giant class I'm working on. Thanks! Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://w

[PHP] encryption and HTTP

2002-02-23 Thread Erik Price
_POST['password'] once it gets to the script, because anyone can submit the same intercepted string to the script via POST and it will be md5()ed when it gets there, thus defeating the purpose. Maybe I haven't quite wrapped my brain around a decent authentication scheme yet. Erik

Re: [PHP] using PHP to access another site - stock quotes ??

2002-02-23 Thread Erik Price
to access quotes - any pointers? > > Thanks > Paul > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP Gener

Re: [PHP] adding 'vote' mechanism

2002-02-23 Thread Erik Price
idea shooting the moon, the truth is that it would probably be fine either way. A matter of personal preference. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] when to use htmlspecialchars()

2002-02-25 Thread Erik Price
ond method, but I want to make sure that doing so won't expose me to any risks that I haven't considered. Please give me your thoughts on this. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.ph

[PHP] is there an "in" qualifier in PHP?

2002-02-26 Thread Erik Price
see more detail, I am trying to execute code that is very similar to the following: {$row['name']}"; } else { echo "{$row['name']}"; } $c++; // bump up the counter for the next iteration of the fetched $row } ?>

Re: [PHP] Valid characters for filenames. List available?

2002-02-26 Thread Erik Price
hem to be very careful about how they refer to the filename. Likewise, spaces need to be escaped, so they're a bad idea. This is just my opinion, but I'm sure others will agree. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] changing the http status from file not found to....

2002-02-26 Thread Erik Price
ery messy as a page must be created for every entry into the > database... The secret to this is at phpbuilder -- you need access to your server I think http://www.phpbuilder.com/columns/tim2526.php3 Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PH

Re: [PHP] Variables containing HTML?

2002-02-28 Thread Erik Price
the variables in the session, they do not change to the > new > input. > > I hope someone out there can make sence of what i have said... because i > think i confused even myself.... ;) > > Thanks for any help! > > //Nick Richardson > > > -- > PHP General

[PHP] elseif without else

2002-02-28 Thread Erik Price
y if statements check for conditions and then set a variable, and later in the script if that variable exists then something else happens. Is this "sloppy"? Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variables containing HTML?

2002-02-28 Thread Erik Price
#x27;); > ?> > > it returns 's:4:"blah";' > > now, consider > > encode('blah'); > > it returns '098108097104' > > now consider which of the two output strings you end up having to escape > special characters for... > &

Re: [PHP] elseif without else

2002-02-28 Thread Erik Price
On Thursday, February 28, 2002, at 07:56 PM, Dennis Moore wrote: > Perfectly legitimate... it is much like having a switch statement > without a > default clause. > Oh, I didn't know that that was legitimate either. :) Thanks Dennis Erik Erik Price Web Develop

Re: [PHP] elseif without else

2002-02-28 Thread Erik Price
a; } elseif (different bad user input) { $error = true; $error_message = $b; } elseif (still different bad user input) { $error = true; $error_message = $c; } if ($error) { do some things and then echo $error_message; } else { present confirmation dialog } Erik Pr

[PHP] user input in HTML

2002-03-01 Thread Erik Price
even properly work or be efficient. Thanks Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg_replace() ??

2002-03-01 Thread Erik Price
gexes. If you are just looking to replace certain predefined strings with other strings, then you should use substr() it's faster. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Pros/Cons over PHP_SELF vs script

2002-03-01 Thread Erik Price
y a further level of difficulty and not an impossibility for a clever attacker. (Obviously a clever attacker would have considered this and would be sending values for any hidden form fields on previous instances of the script, etc, to bypass the supposed security lent by the 'switch' statement.) Hope that helps, please discuss if I am off base in any of this. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg_replace() ??

2002-03-01 Thread Erik Price
On Friday, March 1, 2002, at 10:34 AM, Erik Price wrote: > > On Thursday, February 28, 2002, at 10:33 PM, Monty wrote: > >> Is preg_replace() the best PHP command to use for parsing custom codes >> in >> text retrieved from a database (e.g., turning "[link= ]&

[PHP] get the median from an array of integers

2002-03-01 Thread Erik Price
pretty bad at math -- I could enter all the values into an array and run some kind of averaging code on them, but the problem is that I don't want an "average", I need the "most-chosen" value. Thanks if you have any advice. Erik Erik Price Web Developer

Re: [PHP] empty() & texarea

2002-03-01 Thread Erik Price
{ // then you know they have entered a new value, so you can // perform whatever code you need to on that } HTH Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: get the median from an array of integers

2002-03-01 Thread Erik Price
en rsorted and flipped. Crazy! Erik PS: can anyone see a flaw in this scheme? Can anyone even tell what I'm talking about? Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variables that can't be set by query string

2002-03-01 Thread Erik Price
all they want, but your script doesn't globalize them -- and your script is also specifically programmed to only check the $_SESSION array for the presence of "true=1" (i.e. : if ($_SESSION['true'] == 1) etc). Thus any extraneous GET variables just bounce off your script, ha

Re: [PHP] CheckBoxes....

2002-03-04 Thread Erik Price
ML Strict to allow brackets? IMO it's not something that cause problems if it were to be supported. Kind of lame that it's not, actually. Until then, I'll keep using them (brackets) b/c there's some things that it seems I can't do without this technique, but it would

Re: [PHP] ID variable alsways set

2002-03-04 Thread Erik Price
technically I could just open up the browser's prefs and look at them this way, but I could format the cookie list/contents better with a script, and it wouldn't require me clicking all over my preferences (I have a lot of cookies too). Just a thought. Erik Erik Price Web Develo

Re: [PHP] keeping the dot

2002-03-04 Thread Erik Price
(in this thread) the dot was being used inside of a character class -- and that it does not need to be escaped when it is inside of a character class (wouldn't make sense for "match any character" to exist inside a character class). [^A-Za-z0-9\.] Erik Erik Price W

Re: [PHP] CheckBoxes....

2002-03-04 Thread Erik Price
omething > that's worth bringing up in case it makes it into the next version. Too many mailing lists already! :) I will look into making a suggestion to the W3, however. Thanks for your reply (just curious if this had already been dealt with yet). Erik Erik Price Web Deve

Re: [PHP] keeping the dot

2002-03-04 Thread Erik Price
On Monday, March 4, 2002, at 10:50 AM, Erik Price wrote: > I thought that in this example (in this thread) the dot was being used > inside of a character class -- and that it does not need to be escaped > when it is inside of a character class (wouldn't make sense for "mat

Re: [PHP] MySQL Query

2002-03-04 Thread Erik Price
e concept, but you can find this information in a hundred other places: http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html After you have it figured out, you can use the PHP manual pages function-hunter to learn all of the many mysql functions that PHP offers. Erik

Re: [PHP] MySQL Query

2002-03-04 Thread Erik Price
rom the perspective of using register_globals off, which I think is pretty important (personal opinion). It's not that hard to pick up, though, once you've gotten started. Still, I think it makes alot more sense to do so since it helps the new user remember that variable $x is actually i

[PHP] mktime() into TIMESTAMP ?

2002-03-04 Thread Erik Price
ue. Any suggestions? Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Parsing Content

2002-03-05 Thread Erik Price
not do it the way the pros do it? This topic is a current front page headline at Developer Shed (www.devshed.com). Here is the link to the tutorial on this very topic: http://www.devshed.com/Server_Side/PHP/PHPRDF/page1.html You get to teach yourself a bit about XML along the way. Erik

Re: [PHP] mktime() into TIMESTAMP ?

2002-03-05 Thread Erik Price
ormat the Unix timestamp (mktime()) for that later, and I plan to do searches based on date at times. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can I authenicate user with the accounts in passwd and shadow??

2002-03-05 Thread Erik Price
, then I don't know. http://www.onlamp.com/pub/a/php/2001/07/26/encrypt.html HTH, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] live Counter

2002-03-05 Thread Erik Price
ld you do otherwise, unless you can come up with a really clever JavaScript code chunk that sends a message to the server when the user closes a browser window or quits or whatever. Even that would not be very reliable. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL

<    1   2   3   4   5   6   7   >