Re: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-25 Thread Marc Guay
>> > I would like to take those values away into my third form, which is what >> > you >> > see with the hidden. If they are not populated, then how come I could >> > see >> > the drop down menus? >> >> So you're expecting the values selected in the first two forms to >> populate the values of the

Re: [PHP] File Downloads

2010-05-28 Thread Marc Guay
> How can I go about restricting the number of downloads of a file on my > server? Something like this could be triggered every time and then you can do whatever you want once it hits 150... maybe have it send you an email notification or something... http://www.stevedawson.com/article0007.php -

Re: [PHP] Creating image on-the-fly

2010-07-07 Thread Marc Guay
> I was wondering if there was any way I can create an image from some text > with php? Something like this? http://sgss.me/obsolete/experiments/phpfontimagegenerator2/usage.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] State and City Database

2010-07-07 Thread Marc Guay
> Does anyone have a source for a US State and City database? This is a monster but seems to contain what you need: http://www.geonames.org/. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Simple XML - problem with errors

2010-07-08 Thread Marc Guay
> libxml_use_internal_errors(true); > $this->xml = new SimpleXMLElement($this->htmlString); Hi Gary, I have code that looks like this: libxml_use_internal_errors(true); $xml = simplexml_load_string($val); $errors = libxml_get_errors(); if ($errors) do this else do that which wo

Re: [PHP] Simple XML - problem with errors

2010-07-08 Thread Marc Guay
> I wonder what the difference is between doing "new > SimpleXMLElement" and calling simplexml_load_string which results in the > libxml_use_internal_errors call being ineffective. Odd. The documentation for "Dealing with XML errors" only mentions simplexml_load_string() and this comment http://c

Re: [PHP] Simple XML - problem with errors

2010-07-08 Thread Marc Guay
> And yes, I'd rather use DOM, but I can't. Could you use this: http://simplehtmldom.sourceforge.net/? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Arrays passed to functions lose their indexing - how to maintain?

2010-07-09 Thread Marc Guay
Hi folks, I have an array that looks a little something like this: Array ( [6] => 43.712608, -79.360092 [7] => 43.674088, -79.388557 [8] => 43.674088, -79.388557 [9] => 43.704666, -79.397873 [10] => 43.674393, -79.372147 ) but after I pass it to a function, it loses it's indexing and becomes: A

Re: [PHP] Arrays passed to functions lose their indexing - how to maintain?

2010-07-09 Thread Marc Guay
My bad, I had some leftover code running array_values() on it before it got passed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP database interface layer

2010-07-22 Thread Marc Guay
Hi everyone, I've built a fairly large normalized database schema for a project. This is fun for me as I like thinking about how everything is interconnected. Foreign keys are all set up, many-to-many tables are go, etc, and so on. But now it's time to create an interface between that database

Re: [PHP] PHP database interface layer

2010-07-22 Thread Marc Guay
> i recommend propel > http://www.propelorm.org/ This looks hopeful. I'd checked it out before but for some reason lumped it in with all of the other half-baked tools that didn't do what I wanted, but even that basic example seems to cover most of what I want. Thanks for the suggestions. Marc

Re: [PHP] PHP database interface layer

2010-07-22 Thread Marc Guay
> i recommend propel > http://www.propelorm.org/ Holy Moses that thing is a monster. It requires installing extra libraries (Phing) in order to create an XML schema reverse-engineered from my existing database. The code looks simple enough but that installation is brutal. Any other suggestions?

Re: [PHP] PHP database interface layer

2010-07-22 Thread Marc Guay
> Let me repeat myself: did you have a look at Doctrine2? Hi Peter, I didn't mean to ignore your suggestion, I just got extremely overwealmed by the Doctrine website and didn't even have a response. I get the impression that, like Zend and others, learning how to install and use that would take l

[PHP] Protecting PHP scripts called via AJAX from evil

2010-08-06 Thread Marc Guay
Hi folks, I'm looking for a straightforward way to protect PHP files which are called via AJAX from being called from outside my application. Currently, someone could forseeably open the console and watch the javascript post variables to a public file (actions/delete_thing.php) and then use this k

Re: [PHP] Protecting PHP scripts called via AJAX from evil

2010-08-06 Thread Marc Guay
Thanks everyone. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Snoopy port using PHP cURL library

2010-08-09 Thread Marc Guay
Does anyone know if the Snoopy class has been ported to use the built-in PHP cURL library and released publicly somewhere? Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Snoopy port using PHP cURL library

2010-08-09 Thread Marc Guay
> Does anyone know if the Snoopy class has been ported to use the > built-in PHP cURL library and released publicly somewhere? I converted it myself. If anyone's interested the class is attached. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

Re: [PHP] Can't read $_POST array

2010-08-18 Thread Marc Guay
> $response = print_r($_REQUEST, true); > echo $response; I'm sorry I don't have any input on your actual question but tohuhgt I'd mention that this can be shortened to: print_r($_REQUEST); ... if I'm not mistaken. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] possible issue with quotes (Magicquotes feature)?

2010-08-19 Thread Marc Guay
I would chalk this up to that fancy, extra-curly, apostrophe that you get when copying and pasting text from Microsoft Word or similar. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] two questions on serverside validation

2010-08-25 Thread Marc Guay
> function html($text) > { >        return htmlentities($text, ENT_QUOTES, 'UTF-8'); > } > > function htmlout($text) > { >        return html($text); > } Possibly irrelevant, and definitely not related to your questions, but is it just me or is htmlout() a useless function? Why not just call html

Re: [PHP] a test (list is too quite)

2010-09-04 Thread Marc Guay
Can I make a facebook site using PHP? If yes, how? Please send me the infos privately. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Show text without converting to html

2010-09-09 Thread Marc Guay
> Which was created by the code, but I apparently can't seem to echo it and > get it to display like above.. It converts it to html no matter what I do. Have you tried the HTML tag? (http://www.w3schools.com/TAGS/tag_pre.asp) Putting inside a might also work for you... --

Re: [PHP] 1984 (Big Brother)

2010-09-13 Thread Marc Guay
> if steve's idea is something doable.. why don't you consider setting > up the mysql data dir on some removable media (thumb/flash drive)? It seems to me that almost no matter what method you choose, you're going to have to ask the client to do something manually - whether that's logging out of t

Re: [PHP] 1984 (Big Brother)

2010-09-15 Thread Marc Guay
> if(file_exists('boss_man_say_okay') ){ // let monkeys work } Is there an acronym for the sound of sad, knowing laughter? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Auto-generating HTML

2010-09-20 Thread Marc Guay
What sort of results do you get with echo " Page Title This is the page body "; or similar? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] if/elseif being treated as if/if

2010-09-24 Thread Marc Guay
if(1 == 1){ echo 'here'; } elseif(1 == 1){ echo 'here"'; } Will only echo "here" once. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHPExcel with large files (27,000+ rows)

2010-10-04 Thread Marc Guay
I use this: http://code.google.com/p/php-csv-parser/ No idea if it's any better than your current solution. I presume you've tried extending PHP's memory limit? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Execute a php page and don't wait for it to finish

2010-10-19 Thread Marc Guay
A simple AJAX script would do the trick, no? Or does the script which was triggered by JS get aborted if that page is unloaded? If javascript is unavailable you could trigger it through the tag like so: Again, not sure if it will keep running if the caller is unloaded. -- PHP General Mailin

Re: [PHP] Reminder On Mailing List Rules

2010-10-21 Thread Marc Guay
Toilet seat. Up or down. Same thing? Sort of. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Character encoding hell

2010-10-26 Thread Marc Guay
Hi folks, I've got a problem with character encoding that's threatening to kill my little brain. Here we go: I have a directory with a bunch of PDFs in it that my webpage displays links to. All of the files have the french character  in them. The operating system is Linux (I did not experience

Re: [PHP] Character encoding hell

2010-10-26 Thread Marc Guay
> Are you using UTF-8? Could you be more specific? Do you mean in the browser/php header or in the filesystem? I created the file on a Windows machine, transferred them to a Linux machine, and the encoding of the page is UTF-8. I just noticed a strange thing which might shed some light. If I j

Re: [PHP] Character encoding hell

2010-10-26 Thread Marc Guay
>  If I am understanding correctly, you are referring to a HTML specific issue > where the HTML and browser configuration is displaying your characters > improperly? No, the browser is displaying the characters of the filename fine (using htmlentities converts the ? unknown character into an Â.

Re: [PHP] Character encoding hell

2010-10-26 Thread Marc Guay
Again, if it helps, a link formatted in the same way to the same file links correctly on a windows machine. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Character encoding hell

2010-10-26 Thread Marc Guay
> A windows server, or windows client to the same Linux server? I believe that > this issue is starting to get a bit over my head, with the different > operating systems involved and such. Windows server. This is over my head, too. I'm guessing that Windows and Linux encode filenames different

Re: [PHP] Character encoding hell

2010-10-26 Thread Marc Guay
> Have you tried using the utf8 meta tag rather than using the htmlentities() > function? That should solve the first issue, as I reckon the problem lies > with the way your encoding the filename. The page is being encoded in UTF-8. Without htmlentities() the special character is displayed as a b

Re: [PHP] Character encoding hell

2010-10-26 Thread Marc Guay
> I think one way to do this is something like this (untested): This is a good idea, but I'm stubborn and believe it can be solved without adding more code. Thanks, though, I'll probably end up using it once I've ruined every other possibility. Marc -- PHP General Mailing List (http://www.php.

Re: [PHP] Character encoding hell

2010-10-26 Thread Marc Guay
> Where is the filename coming from? Is it hard-coded in the script or is your > script reading it from a directory listing? The filename is being read from the file via scandir(). File created on Windows, transferred to *nix. > Have you checked to see if that filename is what you think it is on

Re: [PHP] Character encoding hell

2010-10-26 Thread Marc Guay
> You say that in putty it is converted to a '?'?  so, on linux, the file > name is no longer what you intended it to be, so wouldn't you then need > to call the file EXACTLY as it is on the linux server? I thought this too at first, but if I run htmlentites() on the filename it displays the  cha

Re: [PHP] Character encoding hell

2010-10-27 Thread Marc Guay
> Have you tried using the utf8 meta tag rather than using the htmlentities() > function? That should solve the first issue, as I reckon the problem lies > with the way your encoding the filename. It seems that the filenames are ISO encoded as if I set the meta tag to ISO and remove the htmlentiti

[PHP] Updating a GET variable

2010-11-09 Thread Marc Guay
Hi folks, I'm sure this is an easy one that's standing right in front of me but I'm too blind to see. I have a page with an URL like this: index.php?name=value&this=that. I have a link on the bottom of the page which allows the user to switch languages. I need to hang onto the existing $name and

Re: [PHP] Updating a GET variable

2010-11-09 Thread Marc Guay
> What's wrong with just putting the url parameters in the link that you know > you need, one by one? I have a footer that I include on every page and would like it to adapt to whatever situation it finds itself in. Is your suggestion, to do the following for the existing example: echo "Flip";

Re: [PHP] Updating a GET variable

2010-11-09 Thread Marc Guay
My working solution was to put it in a form with a hidden input with the correct name and value. But I'm still wondering what your advice is regarding best practice. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Updating a GET variable

2010-11-10 Thread Marc Guay
> Session_start(); > $_SESSION['language'] = "en"; > You can set the session variable to the current get or maintain the original > passed. I think you may have misunderstood. The problem is holding onto the existing GET variables in the URL while manipulating or adding one of them... and doing

Re: [PHP] Updating a GET variable

2010-11-10 Thread Marc Guay
> foreach($_GET as $k => $v) $qs[$k] = URLDecode($v); > $qs['lang'] = 'en'; > echo 'Flip'; Hi Tamara, Thanks for the tips. Do you see any advantage of this method over using a small POST form besides the styling problems I'll run into trying to make the submit button look like an achor? Marc -

Re: [PHP] Updating a GET variable

2010-11-11 Thread Marc Guay
> So all you need to do, is take a look at $_SERVER['HTTP_ACCEPT_LANGUAGE'] to > get a users language preferences. Hi Nathan, Yep, I'm using this var to set the default but I think it's nice to allow the user to override it. Maybe someone using their computer is more comfortable in a different l

Re: [PHP] Updating a GET variable

2010-11-17 Thread Marc Guay
> A bit late in the thread.  However, IMO, I don't think session is necessary, > unless you intend to save it for later use, during that same visit from the > user.  If it's just a 1 time request, you can just use (example) > $_GET['lang']=en,de,fr,... > Then just split up individual languages, pro

Re: [PHP] Updating a GET variable

2010-11-17 Thread Marc Guay
> Nathan previously mention what if instead of a language specific request, > you have request for multiple languages. I get it now, multiple _simultaneous_ languages. Cheers, Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP shows nothing

2010-11-30 Thread Marc Guay
>        if(!$db = @pg_connect($connection_string)) { >                return FALSE; >        } >        return $db; > > how can I find the problem and fix it? The @ symbol is telling it to ignore errors. Remove it and you'll see them if that's where the problem is. http://php.net/manual/en/lan

Re: [PHP] $_POST issues

2010-12-01 Thread Marc Guay
>>> >>    var_dump($_POST); >>> ?> Where exactly are you putting this line? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_POST issues

2010-12-01 Thread Marc Guay
The function http_build_query() is turning your $_POST array into a query string ($_GET), so the answer to this really depends where you're trying to dump the array. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_POST issues

2010-12-01 Thread Marc Guay
This thread is a really good example of how difficult it can be to both explain and understand a problem. The original poster might want to restate the question from scratch with a more explicit and complete example. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

Re: [PHP] sms class

2012-04-17 Thread Marc Guay
Woah. Is that good luck or bad luck? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] sms class

2012-04-17 Thread Marc Guay
Suspicion is my religion. Let no thread end without a war. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Email Antispam

2012-04-17 Thread Marc Guay
Is there a reason for you not to build a contact form? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Searching IDE.

2012-06-13 Thread Marc Guay
I've used both Netbeans and Aptana w/ WinXP over the past few years and of the two I would recommend Aptana. Netbeans was crippling slow and Aptana often gets it's workspace corrupted, which makes both of them crappy (yet free!), but for day to day use when they're not failing entirely, Aptana is

Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Marc Guay
Everyone switched to PCP? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What's happened to our newsgroup?

2012-06-29 Thread Marc Guay
> You mean everyone finally RTFM? There's a manual? GoDaddy told me to just ask all of my questions here! (No insult meant, in case it's not obvious.) Happy Fridays Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Unexpected Notice message

2012-07-04 Thread Marc Guay
> Notice: Use of undefined constant QUERY_STRING - assumed 'QUERY_STRING' in I would guess that it's asking you to add quotes around QUERY_STRING...? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Find match of string if only at end of string

2012-07-11 Thread Marc Guay
Hi folks, I'm trying to compare two strings in order to determine whether or not the site is just switching languages on the same page or whether the link is pointing to an entirely different page. Things were fine until I realized I was getting false positives for subpages, where the URLs matche

[PHP] Re: Find match of string if only at end of string

2012-07-11 Thread Marc Guay
Answered it myself (funny how writing out a problem as descriptively as possible makes the brain work better). $end_of_url = substr("http://domain.com/about/page/subpage/";, strlen("/about/page/") * -1); $same_post = ($end_of_url == "/about/page/"); -- PHP General Mailing List (http://www.php.ne

Re: [PHP] Programmers and developers needed

2012-09-13 Thread Marc Guay
I'll do it, but only if it's on "paid on delivery" and/or subsidized by African royalty. Are our comments still welcome? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Recommendation request: Use Magento or build my own eCommerce?

2012-10-22 Thread Marc Guay
Use Magento. It will take you more than 6 months to build what you're talking about all by yourself. Magento is a pain to learn at first but once you get into it things start to make sense and development speeds up. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Boolean type forced on string assignment inside if statement

2013-01-03 Thread Marc Guay
> First, did the original poster realize that he was assigning a value to the > variable $a in the 'if' statement? Hello, Yes, I did, and if you read my responses you can see that I came to the realisations you describe. I don't think that anyone suggested there was a bug. > $a is true (ie it

Re: [PHP] Boolean type forced on string assignment inside if statement

2013-01-03 Thread Marc Guay
Hi Tedd, A little searching enlightened me to the fact that in other languages, a single | or & operator will cancel the short-circuiting so all of the evaluations are done before proceeding. However, they don't seem to exist in PHP so in your example it behaves the same as ||...? http://php.net

Fwd: [PHP] Boolean type forced on string assignment inside if statement

2013-01-03 Thread Marc Guay
/language.operators.bitwise.php -- Forwarded message -- From: Volmar Machado Date: 3 January 2013 12:42 Subject: Re: [PHP] Boolean type forced on string assignment inside if statement To: Marc Guay My results in a simple test: '); //1 echo ('($a || $b))' . ($a || $b) . '

[PHP] Re: Stripping accents from characters as they pass through a stream and then written to file

2013-01-14 Thread Marc Guay
And the answer is that it's a locale issue... http://stackoverflow.com/questions/7931853/why-does-phps-iconv-need-setlocale -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Testing

2013-03-08 Thread Marc Guay
> This is my first time using a list. Can anyone confirm I'm doing this > correctly? N! You broke it! Happy Friday, Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: FW: [PHP] Accessing Files Outside the Web Root

2013-03-13 Thread Marc Guay
> Have you tried keeping all of your documents in one directory and blocking > that directory via a robots.txt file? These don't sound like robots that would respect a txt file to me. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Accessing Files Outside the Web Root

2013-03-14 Thread Marc Guay
> correlate various types of information, which is very hard. For a human, > this is very simple. It's simple, and very friendly to your guests. Assuming humans will continue to behave as I've seen them behave so far, even this "simple" system will guarantee you angry emails from people who'll wan

Re: [PHP] REQUEST

2013-05-29 Thread Marc Guay
Does anyone else find it strange that the movie Troll only has 2 stars on IMDB? I think it's worth at least CAPSLOCK. On 29 May 2013 11:45, Tommy Pham wrote: > On Wed, May 29, 2013 at 9:30 AM, Stuart Dallas wrote: > >> On 29 May 2013, at 17:26, Last Hacker Always onpoint < >> lasthack...@gmail

Re: [PHP] include() Error

2013-05-29 Thread Marc Guay
Is the "echo $mySQL_user;" inside of a function? I believe you'll need to say "global $mySQL_user;" to gain access to it if so. On 29 May 2013 12:39, Ron Piggott wrote: > > Good morning all: > > I have recently purchased a computer and am using it as a dedicated server. > A friend helped me i

Re: [PHP] Detect and Redirect Mobile Users

2013-06-14 Thread Marc Guay
http://www.answershat.com/questions/352/How-to-get-rid-of-spam-mail-in-my-mailbox On 14 June 2013 09:28, Chirag Vekariya wrote: > Hi, > Post your question to http://answershat.com > > On Thu, Jun 13, 2013 at 4:49 AM, dealTek wrote: > >> Hi all, >> >> I'm curious of a simple, common, universal wa

Re: [PHP] LightBox click detection

2013-06-14 Thread Marc Guay
$('.lightbox-image-class').click(function(){ $.post('ajax.php', {click: true}); }); and do your DB work in ajax.php http://api.jquery.com/jQuery.post/ On 14 June 2013 09:52, Tedd Sperling wrote: > Hi gang: > > It's Friday so I am allowed to ask odd questions. > > Here's the problem -- I ne

Re: [PHP] LightBox click detection

2013-06-14 Thread Marc Guay
Also, the docs and functionality for that particular plugin seem a bit weak. Maybe there's another one that has a "doneLoadingLightbox" event that you could hook into and call your ajax script inside of... On 14 June 2013 10:02, Marc Guay wrote: > $('.lightbox-image

Re: [PHP] A Strange Problem

2013-06-20 Thread Marc Guay
Never used it but searching turned up http://php.net/manual/en/function.chdir.php Marc On 20 June 2013 12:57, Tedd Sperling wrote: > On Jun 20, 2013, at 1:44 PM, Bastien wrote: >> >> It sounds like a current working directory issue. Try running a getcwd() in >> both places to see how they are

Re: [PHP] Finally....

2013-08-16 Thread Marc Guay
Those Belgacom emails were the only thing keeping me from a crushing loneliness - undo! On 16 August 2013 11:51, Matijn Woudt wrote: > On Fri, Aug 16, 2013 at 5:23 PM, Daniel Brown wrote: > >> # ezmlm-list ~ezmlm/php-general | grep skynet >> supp...@skynet.be >> >> # ezmlm-unsub ~ezmlm/php-gene

Re: [PHP] PHP vs JAVA

2013-08-20 Thread Marc Guay
Here are two references from the Wikipedia article on Java in case you haven't looked at them already. http://www.langpop.com/ http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html On 20 August 2013 10:43, Tedd Sperling wrote: > On Aug 20, 2013, at 10:36 AM, "Liam" wrote: >> You do r

Re: [PHP] PHP Dependency Injector

2013-09-05 Thread Marc Guay
> Thanks Sorin, I will do that and I will have more care the next time. You have no reason to apologize. You shared a project you made by yourself, way to go. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Algorithm Help

2013-10-02 Thread Marc Guay
If you have the technology handy, it could also just be easier to wipe the children's memories after each stay. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] framework or not

2013-10-24 Thread Marc Guay
> I'm looking forward to the day that I'll know everything and can stop all > this learning nonsense. Sounds like the attitude most people take when they sit down to a keyboard. (Ref: http://xkcd.com/386/) Off-topic is the new on-topic Marc -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] query strings and other delights

2011-01-13 Thread Marc Guay
Give parse_str() a go. http://ca.php.net/manual/en/function.parse-str.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] which php file is sending emails?

2011-01-16 Thread Marc Guay
> There can be nothing more simpler than this!!! I thought that this quote needed some revisiting. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] switch case madness

2011-01-19 Thread Marc Guay
> Imagine when there'll be the day when you do not have to code at > all...just copy 'n paste snippets together in the order that you wish > them to work in and Voila'! - instant web app. I have a Wordpress plugin that will do all of that for you. -- PHP General Mailing List (http://www.php.net/

Re: [PHP] Re: email address syntax checker

2011-01-21 Thread Marc Guay
> In fact I'm wondering why the OP doesn't just do what every other site > seems to do - accept the registering user's input as valid, and ask them > to validate it by sending them an email address to that address. It still makes sense to validate the format of the address as soon as possible. Th

Re: [PHP] String Encodings - loose guidelines

2011-01-25 Thread Marc Guay
> 1.) Saving strings to a database One thing I always forget to remember is to send tge "SET NAMES utf8" command to MySQL after making a connection. This will save you 1000 headaches if you're working with non-latin characters. I can't count the number of times I've thrown htmlentities, htmlspec

Re: [PHP] Counting Online users, but not using a Session Table in MySQL

2011-01-28 Thread Marc Guay
> I'm looking for a faster way to count online users. COUNT(*) is time > consuming under MySQL. If COUNTing is the heavy part, why not create a 'users_logged_in' field somewhere and increment it when someone logs in and decrement it when someone logs out? Then your query is just a straight SELEC

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Marc Guay
It's an interesting idea (a different take on coding best practices) but I find the PHP example to be laborious and time consuming with little benefit. If I'm typing an IF statement, I hope to god I know what the condition is before I start typing it. Creating the if/else structure first and then

[PHP] Does requesting $_SERVER variables need to query the server

2011-02-23 Thread Marc Guay
This question will probably reveal my lacking knowledge of the fundamentals, but I'm a go for it anyway: When you use a $_SERVER variable, is a query made to the server to get the information or is it just sitting in a variable all ready to go? Reworded, is there any efficiency gained by storing t

Re: [PHP] Does requesting $_SERVER variables need to query the server

2011-02-23 Thread Marc Guay
>    $_SERVER is just a prepopulated superglobal array that is created at > runtime. Thanks for the clear answer. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Does requesting $_SERVER variables need to query the server

2011-02-23 Thread Marc Guay
> so when > you're using $_SERVER variables there's no call back to the server, as the > code is still being run on the server at that point. This is something I actually do understand. I was wondering if the code running on the server had to query the server for the information every time a $_S

Re: [PHP] Overriding session length in existing session?

2011-03-04 Thread Marc Guay
> This is called globally in *all* my scripts. In another script I'd > really like to set the session to expire after the browser closes if a > uses clicks "public terminal" or something. Howdy. Don't sessions expire when the browser closes as a rule? Do you mean the session cookie? Why not sto

Re: [PHP] Overriding session length in existing session?

2011-03-04 Thread Marc Guay
I think that my suggestion is still a valid solution, someone correct me if I'm wrong. Let's say your code went like this: session_start(); // Check to see if the session variable has already been set, if not if (!isset($_SESSION['var'])){ // Check to see if it's been stored in a cooki

Re: [PHP] Overriding session length in existing session?

2011-03-05 Thread Marc Guay
> The statement should be at the start of every php file that has php code in > it. Hi Tedd, Normally I'd agree with this but having never used the function session_set_cookie_params() before, I looked it up, and the manual says to put it before session_start(). "Set cookie parameters defined i

[PHP] Help translating PHP5 code to PHP4.

2011-03-07 Thread Marc Guay
Hi folks, I've stumbled into a project involving a server running PHP4 without cURL. The script fetches data from an XML webservice and deals with it. Is http://ca2.php.net/xml_parser_create the place to start? Any tips (besides updating PHP)? Here's an example of the PHP5 code: $url = "http:

Re: [PHP] Help translating PHP5 code to PHP4.

2011-03-07 Thread Marc Guay
Hi Richard, It's not a SOAP service, and I've actually decided to have ask the client to upgrade their server software before continuing. But for the sake of study: > Depending upon your requirement, you could use simplexml_load_string() to > convert an XML string into a native PHP object rath

Re: [PHP] Overriding session length in existing session?

2011-03-08 Thread Marc Guay
Hi Scott, I'm glad you resolved your problem. I'm curious about your method though, as it seems to be an entirely different approach to my own. How do you refer to your session data throughout the rest of the site? Do you always reference the $_COOKIE variables or do you utilise $_SESSION's at s

Re: [PHP] Help translating PHP5 code to PHP4.

2011-03-09 Thread Marc Guay
> The ease I had in running multiple versions of PHP on Windows would > suggest it should be pretty easy to do for non-windows. Funny and true. Thanks for the tips Richard, I've suggested that they upgrade their hosting package. Marc -- PHP General Mailing List (http://www.php.net/) To unsubsc

Re: [PHP] Deleting elements from the middle of an array

2011-03-14 Thread Marc Guay
> Here's what I need to do: I have an indexed array, from which I need to > delete elements in the middle. Once completed, the indexes should be > numerically in sequence, as they were when I first encountered the > array. I believe that array_values() will do the trick. Marc -- PHP General Mai

Re: [PHP] Deleting elements from the middle of an array

2011-03-14 Thread Marc Guay
> I've given a simplified example. The actual target array is > multi-dimensional. Your questioni sn't entirely clear but there's lot of chatter about multidimensional arrays on the array_values() page that might provide a solution. -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] Closing tab in Firefox

2011-03-15 Thread Marc Guay
Quick googling came up with this: http://www.yournewdesigner.com/css-experiments/javascript-window-close-firefox.html Maybe try the JS mailing list if that doesn't take you down the right road. PHP can't manipulate the browser. Marc -- PHP General Mailing List (http://www.php.net/) To unsubsc

  1   2   >