[PHP] Passing an undetermined amount of arguments by reference

2009-02-04 Thread Jay Moore
Greetings list. Say I have a function that escapes a string before being passed to MySQL like so: function escape($id, $string) { $string = mysql_real_escape_string($string, $id); } I'm passing $string as a reference so I don't have to reassign it like so: $foo = escape($id, $foo);

Re: [PHP] Passing an undetermined amount of arguments by reference

2009-02-04 Thread Jay Moore
Ashley Sheridan wrote: On Wed, 2009-02-04 at 14:02 -0600, Jay Moore wrote: Greetings list. Say I have a function that escapes a string before being passed to MySQL like so: function escape($id, $string) { $string = mysql_real_escape_string($string, $id); } I'm passing $string

Re: [PHP] Passing an undetermined amount of arguments by reference

2009-02-04 Thread Jay Moore
Jim Lucas wrote: Jay Moore wrote: Greetings list. Say I have a function that escapes a string before being passed to MySQL like so: function escape($id, $string) { $string } Use an array as an alternate method of sending/returning data to the second argument. function escape($id

Re: [PHP] Passing an undetermined amount of arguments by reference

2009-02-04 Thread Jay Moore
Shawn McKenzie wrote: Jay Moore wrote: Jim Lucas wrote: Jay Moore wrote: Greetings list. Say I have a function that escapes a string before being passed to MySQL like so: function escape($id, $string) { $string } Use an array as an alternate method of sending/returning data

[PHP] Re: Global Changes With Loop To Allow Nulls In A Table...

2009-01-27 Thread Jay Moore
revDAVE wrote: Hi Folks, Newbie question I have a mysql table with 100 fields, currently all do not allow nulls. Rather than hand typing in phpMyAdmin, I would like a way to loop through all fields and update them to allow nulls First I would DESCRIBE the table so you get a list of

[PHP] MySQL class. Thoughts?

2009-01-21 Thread Jay Moore
This is a MySQL class I use and I wanted to get everyone's thoughts on how/if I can improve it. This is for MySQL only. I don't need to make it compatible with other databases. I'm curious what you all think. Thanks, Jay Class: -- ?php // Standard MySQL class class do_mysql {

Re: [PHP] MySQL class. Thoughts?

2009-01-21 Thread Jay Moore
Good ideas guys. The input is much appreciated. Jochem (and anyone else, I guess), as I am not 100% versed with Exceptions, the php5 version you suggested, are those Exceptions able to be handled outside the class? Do I need my try block to be within the class block, or can I have the try

Re: [PHP] MySQL class. Thoughts?

2009-01-21 Thread Jay Moore
I know it's very OO-y to use exceptions, but I hate them. They're like setjmp/longjmp calls in C, and they're a really headache to deal with. If you don't use default or predone handlers, you have to put all kinds of try/catch blocks around everything. They make for non-linear execution, and I

[PHP] Re: Been staring at the code for too long...

2009-01-09 Thread Jay Moore
Jason Pruim wrote: Okay... So I know this is a stupid question... But I've been staring at my code for far too long and now it's still not working so I thought I would show it to all of you and see if you can tell me where I'm being stupid :) this is dbmysqliconnect.php: ?php

Re: [PHP] Re: hello

2009-01-08 Thread Jay Moore
Ashley Sheridan wrote: On Thu, 2009-01-08 at 16:40 -0500, Robert Cummings wrote: On Thu, 2009-01-08 at 19:46 +, Nathan Rixham wrote: Robert Cummings wrote: On Thu, 2009-01-08 at 19:18 +, Nathan Rixham wrote: Daniel Brown wrote: On Thu, Jan 8, 2009 at 13:34, Robert Cummings

Re: [PHP] Good PHP book?

2008-12-16 Thread Jay Moore
Richard Heyes wrote: I learned from PHP For Dummies. The title of that book isn't doing itself any favours... :-) You'd be surprised. The For Dummies series is one of the best-selling franchises in mainstream publishing history. Still, calling your audience dumb is generally regarded as

Re: [PHP] Good PHP book?

2008-12-16 Thread Jay Moore
Ps. That was a lame attempt at humour... I extract and distill knowledge from the Internet and save myself from having to buy books. I hear they have that on computers now. I should check it out one of these days. Maybe I'll buy a book. -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Good PHP book?

2008-12-16 Thread Jay Moore
Robert Cummings wrote: On Tue, 2008-12-16 at 13:50 -0600, Jay Moore wrote: Ps. That was a lame attempt at humour... I extract and distill knowledge from the Internet and save myself from having to buy books. I hear they have that on computers now. I should check it out one of these days

Re: [PHP] Good PHP book?

2008-12-16 Thread Jay Moore
Daniel Brown wrote: On Tue, Dec 16, 2008 at 17:04, Jay Moore jaymo...@accu-com.com wrote: Floppies hold 1.4 megs now? Mine don't and they're even dual-sided. :( Jay, Throw out your 62K and 5.25 floppies and get with the 1980's, brother. It's all about the 3.5 hard disks now

[PHP] Re: header modify errors

2008-12-15 Thread Jay Moore
Terion Miller wrote: I am working from home today and getting this error with my copy of my project: *Warning*: Cannot modify header information - headers already sent by (output started at C:\Inetpub\Xampp\htdocs\SNLeader\WOSystem\Welcome.php:31) in

Re: [PHP] IE8 and HTML5

2008-12-04 Thread Jay Moore
I am running IE8 beta and its a PoS. Constantly crashing and flaky as shit. Devil's Advocate It's a beta. What do you expect? /Devil's Advocate -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] IE8 and HTML5

2008-12-04 Thread Jay Moore
Bastien Koert wrote: On Thu, Dec 4, 2008 at 11:57 AM, Jay Moore [EMAIL PROTECTED] wrote: I am running IE8 beta and its a PoS. Constantly crashing and flaky as shit. Devil's Advocate It's a beta. What do you expect? /Devil's Advocate -- PHP General Mailing List (http://www.php.net

Re: [PHP] take me off the list

2008-11-03 Thread Jay Moore
Daniel P. Brown wrote: On Mon, Nov 3, 2008 at 11:10 AM, Robert Cummings [EMAIL PROTECTED] wrote: Give a man some fish, he'll be back later for more! Tell a man about your shortbread and he'll stay on your ass until he gets the recipe, too. Funny how it all works out, eh? So, about

[PHP] Re: Remote Developer Wanted

2008-10-27 Thread Jay Moore
Michelle Konzack wrote: Am 2008-10-21 18:21:19, schrieb Jochem Maas: Daniel Brown schreef: On Tue, Oct 21, 2008 at 12:03 PM, Jochem Maas [EMAIL PROTECTED] wrote: and rob myself of the sport? your no fun since your married Shirley ;-) Coincidentally, that's exactly what my wife says.

Re: [PHP] Re: -help

2008-10-22 Thread Jay Moore
Yeti wrote: -help: invalid argument I like the way you handle input errors in your php-general subroutines David. I don't. It says nothing about what a valid argument is. Horrible newsgroup coding, imo. I wouldn't be surprised if he has register_globals on. -- PHP General Mailing List

[PHP] Re: E_STUPID

2008-10-22 Thread Jay Moore
[EMAIL PROTECTED] wrote: I think we need a new error reporting constant E_STUPID. This should catch stupid things I do like trying to embed an array into a string such as: $foo = array('a', 'b', 'c'); $query = select * from foo where foo in ('$foo'); It's been one of those days... Yeah

Re: [PHP] Remote Developer Wanted

2008-10-21 Thread Jay Moore
Daniel Brown wrote: On Tue, Oct 21, 2008 at 4:26 AM, Brennon Bortz [EMAIL PROTECTED] wrote: Actually, speaking as someone now living in the UK, your low end is LESS than minimum wage here. Rather insulting, if you ask me... Simple advice then: delete the message and don't reply.

Re: [PHP] Remote Developer Wanted

2008-10-21 Thread Jay Moore
Daniel Brown wrote: On Tue, Oct 21, 2008 at 11:31 AM, Robert Cummings [EMAIL PROTECTED] wrote: You must be new around here... Shirley! Yes, brand new. This is only my second post --- and only the third email I've ever sent in my life. How do you PHP? ;-P Standing up.

Re: [PHP] Remote Developer Wanted

2008-10-21 Thread Jay Moore
Jay Moore wrote: Daniel Brown wrote: On Tue, Oct 21, 2008 at 11:31 AM, Robert Cummings [EMAIL PROTECTED] wrote: You must be new around here... Shirley! Yes, brand new. This is only my second post --- and only the third email I've ever sent in my life. How do you PHP? ;-P

Re: [PHP] Securing AJAX requests with PHP?

2008-10-18 Thread Jay Moore
Yeti wrote: Ok, but how safe are tokens? Thinking of man in the middle attacks they do not make much sense, do they? That's what I was thinking too. If I'm deleting an entry from a database with AJAX, I don't want someone looking at my Javascript and saying, Hmm, all I need to do is pass

[PHP] Securing AJAX requests with PHP?

2008-10-17 Thread Jay Moore
I realize this isn't really about PHP, but I was hoping maybe someone had a way to make AJAX a little bit more secure using PHP. I was thinking of making my AJAX calls also pass the current session id, and have my PHP script check to make sure it's a valid id, but I'm open to other ideas.

[PHP] Binary file copy

2008-10-16 Thread Jay Moore
Greetings list! Say I want to copy a jpg from a remote server onto mine, using PHP. Right now, my script opens a socket to the remote server, and opens the image file. It copies its contents into a dummy variable, opens a new file on my server, and dumps the contents of the dummy variable

[PHP] Re: Binary file copy

2008-10-16 Thread Jay Moore
in the response you'll be getting the raw http response (including headers); so you're saving them as well thus not a valid image file. can't see why: $image = file_get_contents('http://10.10.10.3/record/current.jpg'); wouldn't work for you.. regardless though if you are using sockets, be sure

Re: [PHP] Microsoft China to Punish private windows users

2008-10-15 Thread Jay Moore
Stut wrote: On 15 Oct 2008, at 14:53, Shelley wrote: It will punish private Windows XP and Office 2003, Office 2007 users. This is extremely off-topic. Please don't abuse this list in an attempt to drive traffic to your blog. -Stut It *is* powered by PHP, Stut. :P -- PHP General

Re: [PHP] Output text status on a long class

2008-10-14 Thread Jay Moore
Stut wrote: On 14 Oct 2008, at 15:56, Chrome wrote: I have a class that takes a while to run and am wanting to push some output to the browser while it's doing its stuff. Is that possible? Here's what I'd like: Connecting to server... Done! Retrieving categories... Done! ... All I can get

[PHP] Re: utf8/quoted printable based mail renders raw html

2008-10-14 Thread Jay Moore
Eric Butera wrote: Has anyone ever had reports of problems with Outlook 2003 using utf-8 and quoted printable? I've recently started getting complains from our clients that some of their subscribers are having problems with the message coming through as raw html. The email client is always

Re: [PHP] Re: SESSION array problems UPDATE

2008-10-02 Thread Jay Moore
tedd wrote: At 11:10 PM +0100 10/1/08, Nathan Rixham wrote: [tested - works] -snip- ? regards! nathan :) I need to re-address this.. tedd your original code works fine over here; as does the code I sent you, and the code jay submitted first.. do us a favour, copy and paste exactly what I

Re: [PHP] Re: SESSION array problems UPDATE

2008-10-02 Thread Jay Moore
Jay Moore wrote: tedd wrote: At 11:10 PM +0100 10/1/08, Nathan Rixham wrote: [tested - works] -snip- ? regards! nathan :) I need to re-address this.. tedd your original code works fine over here; as does the code I sent you, and the code jay submitted first.. do us a favour, copy

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Jay Moore
Now, someone show me where that is documented? http://us3.php.net/register_globals offtopic rant Also, for the love of glaven, people. If you're going to post to the list, you don't have to include the original sender as well. There's a pretty good chance if they originally posted to the

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Jay Moore
Stut wrote: It's also worth noting that since subscriptions is not required to post to these lists there's no guarantee that the OP will get your reply if you don't include their address. IOW you're asking us to deprive a number of developers seeking assistance of our replies because you can't

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Jay Moore
Stut wrote: I see your confusion. This is a *mailing list* with a newsgroup gateway. If you're using it as a newsgroup then you have to accept that you're not using it the way it was meant to be used, and that almost always has side-effects. That being the case, I apologize for my

[PHP] Re: SESSION array problems

2008-10-01 Thread Jay Moore
tedd wrote: Hi gang: Apparently, there's something going on here that I don't understand -- this happens far too often these days. Here's a print_r($_SESSION); of the session arrays I'm using: [user_id] = Array ( [0] = 6156 [1] = 7030 [2] =

Re: [PHP] Mailing List fun

2008-10-01 Thread Jay Moore
Robert Cummings wrote: On Wed, 2008-10-01 at 19:48 +0100, Ashley Sheridan wrote: On Wed, 2008-10-01 at 14:12 -0400, Robert Cummings wrote: I believe jpg is lossless if you choose 100% quality. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP Unless it's

Re: [PHP] Wanted PHP Developers LogicManse

2008-09-30 Thread Jay Moore
looks like spam/scam to me Thanks for quoting the whole message then! :P Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] tedd's back from vacation

2008-09-10 Thread Jay Moore
Probably not totally work safe ;) Ah the perks of controlling the company network. I determine what is NSFW (nothing). Jay PS - If you guys are gonna gripe about top posting, you really need to learn to prune messages better. :P -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] php image and javascript include

2008-09-08 Thread Jay Moore
Dreamweaver? Eclipse? Pah, it's all about using a text editor! Kate (on KDE) is my preference ;) Heathen! Dreamweaver is awesome. Not for their WYSIWYG editor, but for their code-only view and its auto-complete. Never have I typed so little to get so... little. Jay -- PHP General Mailing

[PHP] Sending username/password

2008-09-05 Thread Jay Moore
Greetings list! Is it possible (and if so, how) to send username and password information to a website with PHP? I would like to submit some information to some network devices we have, but they require login credentials to proceed. I would like to bypass the traditional username/password

Re: [PHP] Sending username/password

2008-09-05 Thread Jay Moore
Stut wrote: On 5 Sep 2008, at 21:05, Robert Cummings wrote: On Fri, 2008-09-05 at 15:01 -0500, Jay Moore wrote: Greetings list! Is it possible (and if so, how) to send username and password information to a website with PHP? I would like to submit some information to some network devices we

Re: [PHP] Sending username/password

2008-09-05 Thread Jay Moore
Wolf wrote: Jay Moore wrote: Greetings list! Is it possible (and if so, how) to send username and password information to a website with PHP? In one word... CURL A couple of people have responded (to me; not the list) with that very same response. I've heard of it, but never used

Re: [PHP] Sending username/password

2008-09-05 Thread Jay Moore
Robert Cummings wrote: On Fri, 2008-09-05 at 21:07 +0100, Stut wrote: On 5 Sep 2008, at 21:05, Robert Cummings wrote: On Fri, 2008-09-05 at 15:01 -0500, Jay Moore wrote: Greetings list! Is it possible (and if so, how) to send username and password information to a website with PHP? I would

Re: [PHP] Sending username/password

2008-09-05 Thread Jay Moore
:) Sorry bout that. However, malformed URL bugs that cause your system to crash can't really be attributed to me ;) Cheers, Rob. The prompt that showed before my computer self-destructed referenced you specifically. Expect the invoice for my new quantum computer to come in the mail

Re: [PHP] Sending username/password

2008-09-05 Thread Jay Moore
That'll teach you to use Google Chrome. ;) Pshaw. IE5 4 lyfe, yo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Google Chrome

2008-09-04 Thread Jay Moore
Jochem Maas wrote: Bastien Koert schreef: On Thu, Sep 4, 2008 at 4:31 PM, Dan Shirah [EMAIL PROTECTED] wrote: Yippie, Chrome already exploited for DoS attacks? http://blogs.zdnet.com/security/?p=1847tag=nl.e539 Its not a DoS, its just a browser crash so forcing a browser to crash is not

Re: [PHP] RE: Sale 79% OFF !!!

2008-08-21 Thread Jay Moore
I never cease to be amazed at the continuing stupidity of the human race. Agreed. A person is smart; people are stupid. Besides, 79% off! How could I go wrong? Jay I only pay 21% Moore -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Jay Moore
Jody Cleveland wrote: Hello, I've got a website here: http://beta.menashalibrary.org/about On every page, i've got a search box at the top. This search box searches the library's web catalog. The problem is, when someone searches, it takes them away from the site. What I'd like to do is take

[PHP] PHP's mail(): proper way to send a 'From' header

2008-07-07 Thread Jay Moore
Greetings folks. I seem to be having a problem with PHP's mail() function and sending 'From' headers properly. Here's my setup: I have a site I set up for a client that has a form their clients can fill out to submit some data. When the form is submitted, I have PHP gather the data and create

[PHP] PHP's mail(): proper way to send a 'From' header

2008-07-07 Thread Jay Moore
**Apologies if this posts twice. I got some crazy response from the server after sending this the first time.** I have a site I set up for a client that has a form their clients can fill out to submit some data. When the form is submitted, I have PHP gather the data and create the body of an