Re: [PHP] Need eregi() help

2002-02-01 Thread Erik Price
n connect\n"; > exit; > } > $line = fread ($file, filesize ($file)); Looks like you forgot the opening braces for your first 'if' statement. Does that help? If not, your error message will help others come up with suggestions. Erik Erik Price Web

Re: [PHP] Re: Anyone Up?

2002-02-01 Thread Erik Price
you would switch from one to the other. > BTW--entities are something else entirely. In trying to avoid calling XML entities "tags", I forgot that we were talking about XHTML, where "tags" do indeed exist. Thanks for the correction. Erik Erik Price Web Developer

Re: [PHP] Check Boxes and updating records. (HELP ME....)

2002-02-04 Thread Erik Price
the SQL query. Hope this helps, and if not, post some code since we have to answer this question in the abstract. 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: Sending an e-mail to 1,000 people

2002-02-04 Thread Erik Price
rs of Spam, have published a surprisingly enlightened position statement on the Internet usage. 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't fint php.ini on OS X

2002-02-04 Thread Erik Price
I think that it depends on where you put it at compile time... but on my system it's /usr/local/lib/php.ini Erik On Monday, February 4, 2002, at 01:40 AM, Andy wrote: > does anybody know where the php.ini is on Mac OS X? > > I would like to activate gdlibrary. > > Tha

Re: [PHP] can't fint php.ini on OS X

2002-02-04 Thread Erik Price
P. I recompiled my own. Sorry, php.ini may not be at /usr/local/lib/php.ini after all! 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: help - config setting directives in Apache config files not working

2002-02-04 Thread Erik Price
, even though PHP provides its own. Upon sharing this frustration, I took consolation with others who had "been there", and we all found salvation in installing the static mod_php (and Apache is still welcome to accept any other DSO). Erik Erik Price Web Developer Tem

Re: [PHP] general question...

2002-02-04 Thread Erik Price
ve done what's needed in the "default" section. Unless they break your page somehow. Note that I've used PHP 4.1.0-style variable names, in case you're using register_globals=0. You don't need to use them if you have register_globals=1. 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] breaking out of two loops

2002-02-04 Thread Erik Price
Short and sweet: If I have an "if" statement inside a "switch" statement, how can I "break" out of both blocks that I am in? Will one "break" end everything? Or should I use one for each level deep that I am? Erik Erik Price Web Dev

Re: [PHP] OS X cersion coming soon...(was Re: [PHP] Zend Studio)

2002-02-04 Thread Erik Price
> should be out in 30 days or so. It certainly looks powerful. But you'd have to pry BBEdit out of my lifeless fingers. 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] Books on PHP

2002-02-06 Thread Erik Price
on www.php.net web site and have the PHP Bible. The Wrox "Beginning PHP" (by Choi, et al) got me started quite comfortably with the basic syntax and theory, and the www.php.net + this list helps me expand on that knowledge. Erik Erik Price Web Developer Temp Media Lab, H.H.

Re: [PHP] how to pass value from popup window to php program

2002-02-06 Thread Erik Price
is to store the $email_name as a session variable. 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] how to pass value from popup window to php program

2002-02-06 Thread Erik Price
rm-submitting, you'll have to use JavaScript to store/display the variable dynamically on the client side. I don't know how to grab JavaScript variables and use them as PHP variables, perhaps someone else on the list can help here. Erik Erik Price Web Developer Temp Media Lab,

Re: [PHP] Is this possible?

2002-02-06 Thread Erik Price
a out of the query's array. Pull out the data you want and assign it to different variables, then echo those variables surrounded by whatever HTML tags you want. Standard procedure, unless you're asking something different. Erik Erik Price Web Developer Temp Media Lab, H.

Re: [PHP] how to pass value from popup window to php program

2002-02-06 Thread Erik Price
ect). > Ahh... is this the standard procedure for passing variables form JS to PHP? Is there a way that will work on browsers with cookies disabled? Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To uns

[PHP] !isset ??

2002-02-06 Thread Erik Price
T, use "!isset($_GET['var'])"). Pretty confusing. Can anyone shed some light on whether or not there is a final definite way to do this? I've used (!($_POST['var'])) with no problems in the past, but does good coding style suggest that I use (!isset($_POST['va

Re: [PHP] Re: !isset ??

2002-02-06 Thread Erik Price
true" and "false" values, whatever they may end up being. No BFD, I was just wondering if there was a definite method for doing these tests. Thanks to all who've responded on this thread. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PR

Re: [PHP] !isset ??

2002-02-06 Thread Erik Price
ese are evaluated as FALSE when cast > as a boolean. That's the meat of it, then. I wasn't aware of the different types of evaluation that could be done on a variable (boolean, etc). Okay, I'm reading that link as I write this. Thanks again. Erik Erik Price Web De

Re: [PHP] Manual input, to form, to array, to session register...

2002-02-06 Thread Erik Price
ed to use session_register(). Rather, you just define the variable you want in the $_SESSION array: $_SESSION['rate'] = $rate; But maybe that's not what you want... ? Erik PS: you could get this value into the default by doing print ""; IOW, concatenation. Erik P

Re: [PHP] if variable is equal to 2 through 4

2002-02-06 Thread Erik Price
Also, it was excessive to cross-post to different lists, especially with this kind of question. It has nothing to do with MySQL. Cross-posting is really only relevant for certain kinds of important announcements, and even then probably aren't cool. Erik On Wednesday, February 6, 200

Re: [PHP] if variable is equal to 2 through 4

2002-02-06 Thread Erik Price
e == 2 through 4 ??? if ($variable >= 2) && ($variable <= 4) 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] Differences between PHP, ASP, JSP

2002-02-07 Thread Erik Price
ther doesn't? > > Could PHP be used for online banking? Usually banks use JSP or ASP, why > don't banks use PHP? Is there security issues? Because they're fools. I admit to being biased. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED]

Re: [PHP] function to post data

2002-02-07 Thread Erik Price
e variables, from a (PHP) script. Is obo asking something different here? I read about posttohost yesterday (someone provided a link) but I didn't see the purpose behind this process. What is it for? 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] mysql_insert_id() vs LAST_INSERT_ID()

2002-02-07 Thread Erik Price
le SQL queries simultaneously, is it better to give them their own variable (each SQL statement), or can you lump them all together? Thank 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] Need XML info for PHP -- XML Newbie

2002-02-07 Thread Erik Price
devshed.com/Server_Side/XML I just got that in the mail from DevShed a few seconds ago. 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] Quote in input tag value?

2002-02-07 Thread Erik Price
them. To the end user it won't matter, but for another reader of your code, it may help. But again, it's probably more opinion (and if you -are- using the quotes for some obscure code, then nevermind what I just wrote). Erik Erik Price Web Developer Temp Media Lab, H.H. Br

[PHP] does header("Location: n") work on non-browser agents?

2002-02-08 Thread Erik Price
ed_in to 1). But then I thought to myself, could this page still be accessed by a script or a spider, or some other agent besides a browser? I don't know much about how HTTP works, but I am wondering if this is an adequate means of protecting my site from unlogged-in visitors. TIA, Erik

Re: [PHP] session register!!

2002-02-08 Thread Erik Price
e next page if i do echo > $the_var . I could be wrong about this: did you try restarting Apache? e.g., "apachectl graceful" ? 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 not returning TRUE

2002-02-12 Thread Erik Price
-- is there an advantage to using 'TRUE' or 'FALSE' rather than numbers? In other words, why did you choose to do it the way you did? 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] How do I send a POST request?

2002-02-12 Thread Erik Price
he headers followed by an extra newline and then the connection followed by the POST variables. In theory. 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] session_id()

2002-02-12 Thread Erik Price
://localhost/index.php?error_message=message+goes+here&.SID > > I actually get &.SID and the end and not SID value? any thoughts? 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] getting $PHP_SELF's basename

2002-02-12 Thread Erik Price
age_name; } but I'm wondering if someone already did it for me. 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 Work in New York

2002-02-12 Thread Erik Price
(luckier to be using PHP). 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] getting $PHP_SELF's basename

2002-02-12 Thread Erik Price
function after all! Well, not really. But it seems that the optional 2nd parameter corrupts the 1st parameter even if it is a predefined variable (which is what I'm doing) -- which could have repercussions for $_SERVER['PHP_SELF'] down the road, right? Erik Er

Re: [PHP] PHP Work in New York

2002-02-12 Thread Erik Price
ured they'd wait a YEAR before telling him so that they'd have a good point if it came down to an argument. Much as I'd love to evangelize my open source philosophy and the merits of my Linux/MySQL/PHP installation, it's going to have to wait until I'm done with this proje

Re: [PHP] why AddType not working for me as expected?

2002-02-12 Thread Erik Price
to do with .htm or .html files. But it's worth eliminating as a potential problem. 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 Work in New York

2002-02-12 Thread Erik Price
ting language or another. To clear my name, here: the fact is that I suggested this project, explained that it would cost very little money by using PHP/MySQL/Linux, and it was approved. So I'm doing it. I just don't rub it in anyone's face that I don't toe the MS party l

[PHP] trouble with headers

2002-02-12 Thread Erik Price
or a certain line, or what? I thought that it was a blank line, but since I haven't outputted any text, I am not sure how that's possible. 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] trouble with headers

2002-02-12 Thread Erik Price
interpreted as the end of the headers. (Man that book on HTTP I was reading at the library came in handy! Perl Web Client Programming or something) It isn't truly HTML since it isn't between the and tags, but it gets sent along as blank lines in the HTML document. That's my

[PHP] querystrings passed in header("Location: n") ?

2002-02-13 Thread Erik Price
ge.php?errorcode=$errorcode"); See what I'm doing? Trying to send the "errorpage.php" a variable in the querystring to identify which page sent them there. I'd like to avoid HTTP_REFERER for now, if possible. But when I get sent to "errorpage.php", there i

Re: [PHP] querystrings passed in header("Location: n") ?

2002-02-13 Thread Erik Price
ipulation within a function's arguments? I'm not trying to question you, only to tie up a loose end. Back to the subject at hand, I am sorry to report that header() is not passing along the querystring. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PR

Re: [PHP] trouble with headers

2002-02-13 Thread Erik Price
On Tuesday, February 12, 2002, at 09:10 PM, Miles Thompson wrote: > You're right Erik. Subtle, ain't it? > > On the other hand, look how accepting browsers are of malformed HTML. > I'm inclined to think that today they see the tag and 'think': >

Re: [PHP] PHP Work in New York

2002-02-13 Thread Erik Price
m a MS proponent, but basing .NET on XML seems like a great idea. Also, there is an open-source .NET initiative called "Mono", http://www.go-mono.com/ Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.n

Re: [PHP] How to POST a HTML-page with the header function

2002-02-13 Thread Erik Price
// until the end of the "file", eat 128 bytes at a time echo fgets($fp, 128); } fclose($fp); // close the "file" } Sorry about

Re: [PHP] Re: Difference between cookie and session

2002-02-13 Thread Erik Price
ession, but it would require the villain to be quick. Note that this is not a limitation of PHP but rather of the HTTP protocol which governs WWW interactions -- unless you're using an encrypted connection like SSL, there is no way around this fact. HTH, Erik PS: the transmission of viru

Re: [PHP] Convert a string to an array w/o spliting or exploding

2002-02-13 Thread Erik Price
de an example. Also, are you sure you mean to use brackets when you say 'split[]' and 'explode[]' ? It's supposed to be parentheses. 'split()', 'explode()'. 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] querystrings passed in header("Location: n") ?

2002-02-13 Thread Erik Price
t lurkers on this list comment on this? > I agree with you that it is handled as any string. You mean that I am correct? Or that you think I should be correct? (not trying to sound insolent, just trying to nail down what's being said ;) Thanks Rick Erik Erik Price

Re: [PHP] querystrings passed in header("Location: n") ?

2002-02-13 Thread Erik Price
syntax list is like this: > Hope this helps, It definitely cleared up quite a bit about how function arguments are interpreted. Thank 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

[PHP] how a function 'return' statement works

2002-02-13 Thread Erik Price
ent_page_name, -1); return $current_page_name; } (I know this does the same thing as 'basename("$_SERVER['PHP_SELF'])', I just want to understand something a bit more fundamental to the way functions work) Thanks, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown

Re: [PHP] trouble with headers

2002-02-13 Thread Erik Price
bytes, > which are output. I see that as a Good Thing. That means that PHP can do much more than just generate web pages. Thanks for clearing that up Torben. (It seems that whenever I ask a question, you always have the answer.) Erik Erik Price Web Developer Temp Media Lab,

Re: [PHP] how a function 'return' statement works

2002-02-14 Thread Erik Price
;m positive that I've specified the last element of the array. (Haven't I?) Erik On Wednesday, February 13, 2002, at 05:03 PM, Darren Gamble wrote: > I think what you're trying to do is return one particular element out > of the > array. If that's the cas

Re: [PHP] trouble with headers

2002-02-14 Thread Erik Price
On Wednesday, February 13, 2002, at 05:18 PM, Rick Emery wrote: > Next time you go to the PHP Manual (dated 19-09-2001) for answers, go > to the > title page and count down 5 names... ---- Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP Genera

Re: [PHP] Authentication with sessions - Recommendation and suggestions?

2002-02-14 Thread Erik Price
it works very similar to yours. I think you should turn register_globals off if you really want security. PHP 4.1.0 has some neat shortcuts to make your life easier if you do this. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing L

Re: [PHP] What are you using for please wait?

2002-02-14 Thread Erik Price
On Thursday, February 14, 2002, at 09:39 AM, [EMAIL PROTECTED] wrote: > and the I am not giving the user any indication as to what is going on. > Distract the user with a flash animation (say, a status bar or something) stored in cache on prior page. ;) Erik Erik Pri

Re: [PHP] how a function 'return' statement works

2002-02-14 Thread Erik Price
On Thursday, February 14, 2002, at 10:46 AM, Alastair Battrick wrote: > Do you not have to make $_SERVER a global variable in the function ? $_SERVER is global AFAIK, but good thinking. All $_* variables are global (unlike the $HTTP_*_VARS arrays). Erik ---- Erik Price Web Develo

Re: [PHP] how a function 'return' statement works

2002-02-14 Thread Erik Price
s # === function get_current_page_name() { $current_page = $_SERVER['PHP_SELF']; $current_page_name = explode("/", $current_page); $pagename = array_slice($current_page_name, -1, 1); return $

Re: [PHP] Anyway to open a PHP file and view its code in the browser?

2002-02-14 Thread Erik Price
t have you tried this? $text = "/* "; $text .= readfile($fp); $text .= " */"; To comment the code? Just a guess. (And it would result in nested comments, not sure if that is a no-no for the parser or not). Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAI

Re: [PHP] good practice

2002-02-15 Thread Erik Price
te directory. Not to mention I have a directive in my server's conf file that specifically prevents it from serving any file with the extension '.inc'. 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] fopen

2002-02-15 Thread Erik Price
7;re writing data to the temp file, processes just > keep using the original. Once you're done, the rename happens > atomically, preventing the race condition. What method do you use to get rid of the temporary file once you've used it? It appears, from reading the man page, that the f

Re: [PHP] good practice

2002-02-15 Thread Erik Price
ot;.php" > extensions. Maybe I don't understand the security implications of .inc -- I thought that it was perfectly safe. Since my php.ini is not configured to parse files with '.inc' extensions, I thought that I was better off using a separate extension than '.ph

Re: [PHP] good practice

2002-02-15 Thread Erik Price
n't use them), and to tackle the second problem, we don't add '.inc' to our list of file types that should be parsed in the "AddType" line. Here's the directive: Order allow,deny Deny from all If you look under the archives, you will find the thread

[PHP] s.osborne, are you out there?

2002-02-15 Thread Erik Price
over the limit of 31457280 bytes. > > Automated Postmaster > 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] Anyway to open a PHP file and view its code in the browser?

2002-02-15 Thread Erik Price
ix-and-Internet-Fundamentals-HOWTO/ HTH, Erik >> -Original Message- >> From: Erik Price [mailto:[EMAIL PROTECTED]] >> Sent: Friday, February 15, 2002 8:41 AM >> To: Kevin Stone >> Subject: Re: [PHP] Anyway to open a PHP file and view its code in the >>

Re: [PHP] Re: The ASP "application" object in PHP?

2002-02-15 Thread Erik Price
cripting language, I didn't have much to justify why I chose PHP (the real reason is a matter of ethics ;). I would love to have had your explanation of ASP's application object vs PHP's lack of an "application object" when I wrote that. I'm saving this post. E

Re: [PHP] What Do You Think?

2002-02-15 Thread Erik Price
on tap, I can hardly find it in stores! LOVE Tetley's. 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] Sessions that last for ever

2002-02-16 Thread Erik Price
e or a GET variable is being sent along with the HTTP headers. Keeping a session going for more time than needed means that the variable representing the session ID is leaving footprints all over the place. Erik <-- who has become overcautious lately upon learning how HTTP works Er

Re: [PHP] scheduled tasks

2002-02-16 Thread Erik Price
that. NB this code is definitely untested, so it probably won't work, but the theory is there. Also, be sure to take into account the security issues of having a file writeable by your web server -- I'm assuming you already have experience with this. Erik Erik Price Web D

Re: [PHP] Sessions that last for ever

2002-02-18 Thread Erik Price
can either run a password authentication to make sure that they are who their cookie says they are, or skip that and deal with the fact that some people may change their cookie to be the name of their opponent so that they can play as another character. Sounds like a cool site, good luck Eri

Re: [PHP] Re: building dynamic pdf files?

2002-02-18 Thread Erik Price
ng SGML documents and whatnot. I'm also pretty sure that it's somewhere between $800 and $1100 for a one-license desktop copy! 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] What Do You Think?

2002-02-18 Thread Erik Price
On Monday, February 18, 2002, at 07:01 AM, Ford, Mike [LSS] wrote: >> -Original Message- >> From: Erik Price [mailto:[EMAIL PROTECTED]] >> Sent: 15 February 2002 19:52 >> >> Not only can I hardly find a place with Tetley's on tap, I can hardly >&g

Re: [PHP] Unsubscribe s.osborne

2002-02-18 Thread Erik Price
Yes, me too (to verify) -- Check the archives for Friday, you'll see that this has been ongoing for a few days. Thank you Erik On Monday, February 18, 2002, at 12:24 PM, Rick Emery wrote: > List Moderator, > > Can you please unsubscribe s.osborne > > Every post I sen

Re: [PHP] http_referer

2002-02-18 Thread Erik Price
In PHP4.1 or later, try: echo $_SERVER['HTTP_REFERER']; 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] get_browser();

2002-02-18 Thread Erik Price
er to your question, but keep in mind that this kind of information depends on the user-agent -- you're not guaranteed to get any information, as some user-agents handle headers in nonconformant ways. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] --

Re: [PHP] ereg_replace

2002-02-18 Thread Erik Price
t, but I accept no liability. (Also, this regex has not been optimized for speed -- sorry, I don't have time to play with it.) $text = "http://www.domain.com/directory/images/image.jpg"; preg_replace("(http://[^<>\s]+[-a-zA-Z0-9_/.]+\.(gif|jpg|jpeg)$)", ""

Re: [PHP] NULL Apache environment variables

2002-02-18 Thread Erik Price
k that this is described in the 4.1.0 release announcement. http://www.php.net/release_4_1_0.php In the 4.1.1 release announcement, it doesn't say that anything about this has changed. I'm not trying to contradict you Torben, but if this is true then it is not documented in th

Re: [PHP] PHP_SELF Undefined

2002-02-18 Thread Erik Price
f the string and concatenate it to the variable, because PHP doesn't let you just use $_* variables in the middle of a string. I also made sure to "jump back into" the string to finish the HTML form tag. If you don't like doing it this way, do something like $PHP_SELF = $

Re: [PHP] NULL Apache environment variables

2002-02-18 Thread Erik Price
ated. So don't change anything. :) 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_SELF Undefined

2002-02-18 Thread Erik Price
version. Ironic, because IIRC it is the answer to one of the first questions I posted on this list. (I was trying to include mysql_fetch_array elements in print statements and didn't want to transfer the value to a scalar beforehand, or something! :) Erik Erik Price Web Developer Te

Re: [PHP] Browser Sniff (Code Review Encouraged)

2002-02-18 Thread Erik Price
Just a quick question -- the outsidemost if/elseif sequence of the function "sniff()" doesn't seem to have an "else" (it ends with "elseif" and then does another "if", before its "return"). Did you mean to include an "else&quo

Re: [PHP] Logging Users In - What is the Best Way

2002-02-18 Thread Erik Price
he page will not display. Ummm... well, there's probably more security-conscious people on this list than me who can come up with more. Just think about the logical HTTP exchange and where data might accidentally leak out, and you'll probably cover most of your bases. Erik PS: I

Re: [PHP] Apache+PHP+DSO: maybe trivial (?): apxs doesn't create libphp4.so under AIX 4.3.3

2002-02-19 Thread Erik Price
i-dist to /usr/local/lib/php.ini HTH, this has worked for many people (and I didn't write em so I don't deserve any credit). Thank you Nathan for helping me when I had this prob. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General M

Re: [PHP] Looking for good tutorial on Sessions

2002-02-19 Thread Erik Price
ou want to use sessions extensively you can have PHP do it automatically by recompiling PHP with --enable-trans-id (I think, check the man for details). 4) Read the session-related functions' man pages It's really very simple! With PHP 4.1, you don't even need to use session_register() to a

Re: [PHP] Weather Scripts

2002-02-20 Thread Erik Price
called XML-RPC. There's a nice O'Reilly introduction to the topic, at xml.com, and I'm sure that after reading this you'll be better-prepared to search for scripts that do this for you. http://www.xml.com/pub/a/1999/08/rpc/ Erik Erik Price Web Developer Tem

Re: [PHP] Removing every thing between ( )

2002-02-20 Thread Erik Price
g_replace("/(\()\d{3,3} Test(\))/", "\1\2", $string); That will leave your string looking like "This is a () and ()". 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] Which Portal System?

2002-02-20 Thread Erik Price
already you can use that). Erik On Wednesday, February 20, 2002, at 11:20 AM, Curtis Strite wrote: > I'm looking for some recommendations on which portal system to use for > my > website. I have sifted through most of what I think will suite my > needs at > hotscripts.com

[PHP] peer code review wanted

2002-04-15 Thread Erik Price
Can anyone see a problem with this, or at least confirm that I'm not crazy? 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] peer code review wanted

2002-04-15 Thread Erik Price
at I didn't even have a return true! Now, back to work. I can stop fuming around the room. 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] evaluate my mailing list attempt?

2002-04-16 Thread Erik Price
i know several of you have expressed concerns > about overloading email servers, but since i have less > > than 20 people on the list, i'm sure it can handle it. > > __ > Do You Yahoo!? > Yahoo! Tax Center - online filing wi

Re: [PHP] Faking a form POST

2002-04-16 Thread Erik Price
// close the "file" } 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] Ereg ()

2002-04-16 Thread Erik Price
0-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 it out, that's untested. Erik Erik Price Web Developer Temp Me

Re: [PHP] Conditions within a function

2002-04-16 Thread Erik Price
)" immediately after the $firstTime = $rowFirstTime["firstTime"] line. It will tell you whether or not there is actually a value there. If there is, then you know why your "if" test is failing. If there is no variable, then you can check to see if your includefi

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
On Tuesday, April 16, 2002, at 11:56 AM, ROBERT MCPEAK wrote: > How do I use PHP to remove certain characters from form input? > Specifically, how to I ensure that form data does not contain any > newline/linebreak or tab characters? you can hack it yourself with str_replace

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

<    1   2   3   4   5   6   7   8   9   >