Re: [PHP] Re: Open form in new window

2013-03-04 Thread Terry Ally (Gmail)
You could echo HTML code e.g.


Number: 
*Submit*


or include it as one of your form attributes:

**
  First name: 
  Last name: 
  



On 4 March 2013 07:16, Maciek Sokolewicz wrote:

> On 4-3-2013 6:44, John Taylor-Johnston wrote:
>
>> I have many different submit button.
>> 
>> 
>>
>> When php processes value="Enter Data", I would like to open a new
>> window, but only if I click this one.
>>
>> Possible? I knw ther is an HTML target="" thingy. Can PHP do anything
>> magic?
>>
>>  No, it can't. PHP is a *serverside* language, while opening a new window
> is fully *clientside*. You could, after recieving the form submission, send
> back a redirect which opens in a new window; but far easier would be to use
> javascript which would open a new window on submission instead.
>
> PHP is definitly the wrong choice for things like opening browser windows.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?


Re: [PHP] Re: Open form in new window

2013-03-04 Thread Maciek Sokolewicz
On 4 March 2013 09:32, Terry Ally (Gmail)  wrote:
> You could echo HTML code e.g.
Which is still purely HTML and has nothing whatsoever to do with PHP.

>
> 
> Number: 
> Submit
> 
>
> or include it as one of your form attributes:
>
> 
>   First name: 
>   Last name: 
>   
> 
Again, pure HTML, and no PHP involved. Specifically, the (asp??) page
called in the form action handler will never even be aware of the fact
that the page was opened in a new window, or at least was supposed to.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Open form in new window

2013-03-04 Thread Terry Ally (Gmail)
I was using an example and NOT intended to show ASP.



On 4 March 2013 08:35, Maciek Sokolewicz wrote:

> On 4 March 2013 09:32, Terry Ally (Gmail)  wrote:
> > You could echo HTML code e.g.
> Which is still purely HTML and has nothing whatsoever to do with PHP.
>
> >
> > 
> > Number: 
> > Submit
> > 
> >
> > or include it as one of your form attributes:
> >
> > 
> >   First name: 
> >   Last name: 
> >   
> > 
> Again, pure HTML, and no PHP involved. Specifically, the (asp??) page
> called in the form action handler will never even be aware of the fact
> that the page was opened in a new window, or at least was supposed to.
>



-- 
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?


Re: [PHP] Very Large File Splatter

2013-03-04 Thread Richard Quadling
On 22 February 2013 21:04, Brian Smither  wrote:
> PHP 5.4.4-TS-VC9 on Windows XP SP3 NTFS non-system drive with 18GB free.
>
> I dare not try to replicate this. As such, I cannot firmly place the blame on 
> PHP.
>
> I have peppered a PHP application with a call to a function which 
> appends-only to a logfile the parameters passed to it. Each pass of the 
> application creates many MB of content.
>
> It is conceivable that I ran out of hard drive space.
>
> When that which what I was working on seemed to be acting very weird, I 
> rebooted the computer only to see thousands of lines scroll by from Windows 
> repairing the file system.
>
> I discovered logfile contents in many dozens of files. The timestamp and 
> filesize of the damaged files were not changed. Only the contents replaced 
> with slices of the logfile.
>
> Again, I'm not going to try to 'intentionally' replicate this, so I ask:
>
> Has PHP's interface with the NTFS file sub-system ever been reported to 
> splatter a file across the contents of a drive?

At this stage, the safest option is a restore from your backups.

Cross linked files often mean the tail end of one of the cross linked
files is now orphaned.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Open form in new window

2013-03-04 Thread John Taylor-Johnston

> You could echo HTML code e.g.

Which is still purely HTML and has nothing whatsoever to do with PHP.

>
> 
> Number: 
> Submit
> 
>
> or include it as one of your form attributes:
>
> 
>   First name: 
>   Last name: 
>   
> 
Again, pure HTML, and no PHP involved. Specifically, the (asp??) page
called in the form action handler will never even be aware of the fact
that the page was opened in a new window, or at least was supposed to.


I was using an example and NOT intended to show ASP.
target="_blank" will open a new window every time. That will defeat the 
purpose.


I have many different submit buttons, for different purposes. Depending 
on the $_POST value of each submit button, I tell PHP to do different 
things,


 


I want to open a different window when I press: value="Enter Data" type="submit">


I guess the best I can hope for is to try

onclick="OpenWindow()">


Submit will not 
submit the form contents.


Thanks,


[PHP] Re: Open form in new window

2013-03-04 Thread Tim Streater
On 04 Mar 2013 at 17:10, John Taylor-Johnston 
 wrote: 

> Submit will not
> submit the form contents.

Nothing to stop your OpenWindow() function doing a submit as in:

Submit


function OpenWindow (formPtr)
 {

 // Some actions

 formPtr.submit ();

 }


Personally I never submit forms. I use ajax to communicate with PHP scripts and 
do something with the data that is returned by the script. You can see a simple 
example at http://www.clothears.org.uk

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Not counting my own page visits

2013-03-04 Thread Angela Barone
Hello,

I have a script that counts hits to all the pages in my site and emails 
me a report nightly.  However, it also counts my visits to my site, and when 
I'm coding, I'm hitting a lot of my pages, repeatedly.  I'd like to find a way 
to not count my page visits.

At first, I thought about adding a parameter to each URL and parsing 
that in the script, but that would get old real fast, and also, I may forget to 
add it each time.  Is there a way to tell the script to ignore my visits?

Thank you,
Angela
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Not counting my own page visits

2013-03-04 Thread Tommy Pham
On Mon, Mar 4, 2013 at 9:47 AM, Angela Barone
 wrote:
> Hello,
>
> I have a script that counts hits to all the pages in my site and 
> emails me a report nightly.  However, it also counts my visits to my site, 
> and when I'm coding, I'm hitting a lot of my pages, repeatedly.  I'd like to 
> find a way to not count my page visits.
>
> At first, I thought about adding a parameter to each URL and parsing 
> that in the script, but that would get old real fast, and also, I may forget 
> to add it each time.  Is there a way to tell the script to ignore my visits?
>
> Thank you,
> Angela

What about ignoring $_SERVER['REMOTE_ADDR'] or $_SERVER['REMOTE_HOST']
where that matches your public IP or FQDN?

http://php.net/manual/en/reserved.variables.server.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Open form in new window

2013-03-04 Thread John Taylor-Johnston



If you want to open a new page in response to a submit button press 
(using PHP) you may be out of luck. I don't know of a way to do it 
without involving another language. Opening a different page in the 
*same* window, yes. Otherwise, no. But watch the other replies. Maybe 
someone knows something I don't. Paul 

Nope. Out of luck.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Not counting my own page visits

2013-03-04 Thread Ashley Sheridan


Angela Barone  wrote:

>Hello,
>
>   I have a script that counts hits to all the pages in my site and
>emails me a report nightly.  However, it also counts my visits to my
>site, and when I'm coding, I'm hitting a lot of my pages, repeatedly. 
>I'd like to find a way to not count my page visits.
>
>   At first, I thought about adding a parameter to each URL and parsing
>that in the script, but that would get old real fast, and also, I may
>forget to add it each time.  Is there a way to tell the script to
>ignore my visits?
>
>Thank you,
>Angela
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

You could do it by checking for your ip address if you have a fixed one, or set 
a cookie with a long life and check for that, discounting visits when either 
are true 
Thanks,
Ash
http://www.ashleysheridan.co.uk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Open form in new window

2013-03-04 Thread Matijn Woudt
On Mon, Mar 4, 2013 at 6:10 PM, John Taylor-Johnston <
john.taylor-johns...@cegepsherbrooke.qc.ca> wrote:

> > You could echo HTML code e.g.
>>
>> Which is still purely HTML and has nothing whatsoever to do with PHP.
>>
>> >
>> > 
>> > Number: 
>> > Submit<**/button>
>> > 
>> >
>> > or include it as one of your form attributes:
>> >
>> > 
>> >   First name: 
>> >   Last name: 
>> >   
>> > 
>> Again, pure HTML, and no PHP involved. Specifically, the (asp??) page
>> called in the form action handler will never even be aware of the fact
>> that the page was opened in a new window, or at least was supposed to.
>>
>>
>> I was using an example and NOT intended to show ASP.
>>
> target="_blank" will open a new window every time. That will defeat the
> purpose.
>
> I have many different submit buttons, for different purposes. Depending on
> the $_POST value of each submit button, I tell PHP to do different things,
>
>
I don't wanna interrupt this thread, but are you sure you want multiple
submit buttons, especially more than two?
There are probably better solutions for what you want, for example, radio
button to select which action to take?

- Matijn


Re: [PHP] Not counting my own page visits

2013-03-04 Thread Angela Barone
On Mar 4, 2013, at 9:52 AM, Tommy Pham wrote:
> What about ignoring $_SERVER['REMOTE_ADDR'] or $_SERVER['REMOTE_HOST']
> where that matches your public IP or FQDN?

Hi Tommy,

I am checking for $_SERVER['REMOTE_ADDR'] but how would I check that 
against mine?  I don't have a static IP.

Thanks,
Angela
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Not counting my own page visits

2013-03-04 Thread Angela Barone
On Mar 4, 2013, at 9:56 AM, Ashley Sheridan wrote:
> set a cookie with a long life and check for that, discounting visits when 
> either are true

Hi Ash,

I don't know anything about cookies.  It sounds complicated to me.  Is 
there a simple way to set one?

Thanks,
Angela
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Not counting my own page visits

2013-03-04 Thread Ashley Sheridan
On Mon, 2013-03-04 at 10:15 -0800, Angela Barone wrote:

> On Mar 4, 2013, at 9:56 AM, Ashley Sheridan wrote:
> > set a cookie with a long life and check for that, discounting visits when 
> > either are true
> 
> Hi Ash,
> 
>   I don't know anything about cookies.  It sounds complicated to me.  Is 
> there a simple way to set one?
> 
> Thanks,
> Angela


You can manually write a cookie on your machine, or use a special script
that only you visit that contains a setcookie() call (it only need be
set once). From there on, you can check the $_COOKIES super global for
the presence of your cookie. To test, visit the site with a different
browser (browsers won't share the cookies) and you'll see the visit
logged.

Thanks,
Ash
http://www.ashleysheridan.co.uk




[PHP] PHP Web Developer Opportunity

2013-03-04 Thread Allison Garcia
*SMALL WORLD LABS is looking for a PHP WEB DEVELOPER *

Small World Labs is looking for a PHP Web Developer to be a part of our
team. The position is focused on managing, supporting and expanding the
Small World Labs social collaboration and online community platform. This
role will interface with the product, support, professional services and
client teams to provide technical guidance and drive future platform
expansion. You will be responsible for both front & back-end development
for the Small World Labs platform.

We are looking for an intelligent, fast learner who can thrive in a high
energy environment. Strong knowledge of PHP and the ability to work in a
dynamic team are required.

*Technical Background:*
- PHP (the primary development language)
- CSS, MYSQL, DHTML, Javascript, JQuery, AJAX
- Web Services using SOAP or RESTful API
- Mobile development
- Understanding of version control systems
- Familiarity with Linux or another UNIX OS is preferred

*Required Experience:*
- At least 3 years successful technical development experience
- Proven ability to manage multiple projects in a fast paced environment
- Ability to take ownership over development projects
- Knowledge of online social and professional networks and developer
interfaces
- Strong communication skills, both written and verbal
- Experience with requirements gathering

*Education:*
- Bachelors or graduate degree

*Location:*
- Austin, Texas

Interested parties, please email your resume with the subject line "PHP Web
Developer" to j...@smallworldlabs.com.

*About Small World Labs*
Small World Labs is an experienced provider of an online community and
social collaboration platform that enables organizations to connect with
their constituents in new ways. We help non-profit organizations understand
how to engage with their members to drive loyalty, create opportunities,
ignite conversations, distribute knowledge, and share experiences.


Re: [PHP] Re: Open form in new window

2013-03-04 Thread Paul M Foster
On Mon, Mar 04, 2013 at 05:39:00PM +, Tim Streater wrote:

> On 04 Mar 2013 at 17:10, John Taylor-Johnston 
>  wrote: 
> 
> > Submit will not
> > submit the form contents.
> 
> Nothing to stop your OpenWindow() function doing a submit as in:
> 
> Submit
> 
> 
> function OpenWindow (formPtr)
>  {
> 
>  // Some actions
> 
>  formPtr.submit ();
> 
>  }
> 
> 

> Personally I never submit forms. I use ajax to communicate with PHP
> scripts and do something with the data that is returned by the script.
> You can see a simple example at http://www.clothears.org.uk
 
 --
> Cheers  --  Tim
> 

I'm trying to figure out where the net gain in that is. The PHP file
being called via AJAX is doing its processing on the server either way.
So it appears the only difference is an asynchronous Javascript/AJAX
call or a synchronous PHP call (on a standard PHP form submission). What
am I missing?

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Open form in new window

2013-03-04 Thread Paul M Foster
On Mon, Mar 04, 2013 at 06:58:41PM +0100, Matijn Woudt wrote:

> On Mon, Mar 4, 2013 at 6:10 PM, John Taylor-Johnston <
> john.taylor-johns...@cegepsherbrooke.qc.ca> wrote:
> 
> > > You could echo HTML code e.g.
> >>
> >> Which is still purely HTML and has nothing whatsoever to do with PHP.
> >>
> >> >
> >> > 
> >> > Number: 
> >> > Submit<**/button>
> >> > 
> >> >
> >> > or include it as one of your form attributes:
> >> >
> >> > 
> >> >   First name: 
> >> >   Last name: 
> >> >   
> >> > 
> >> Again, pure HTML, and no PHP involved. Specifically, the (asp??) page
> >> called in the form action handler will never even be aware of the fact
> >> that the page was opened in a new window, or at least was supposed to.
> >>
> >>
> >> I was using an example and NOT intended to show ASP.
> >>
> > target="_blank" will open a new window every time. That will defeat the
> > purpose.
> >
> > I have many different submit buttons, for different purposes. Depending on
> > the $_POST value of each submit button, I tell PHP to do different things,
> >
> >
> I don't wanna interrupt this thread, but are you sure you want multiple
> submit buttons, especially more than two?
> There are probably better solutions for what you want, for example, radio
> button to select which action to take?
> 
> - Matijn

I have to agree with Matijn for this reason: If the user hits the
[Enter] button at the end of their form data entry, it will trigger the
*first* submit button on the page, which may or may not be what you
want. Perhaps better to have the user indicate the action they wish via
radio button (as Matijn suggested) and then a single submit button.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Open form in new window

2013-03-04 Thread Ashley Sheridan
On Mon, 2013-03-04 at 15:22 -0500, Paul M Foster wrote:

> On Mon, Mar 04, 2013 at 06:58:41PM +0100, Matijn Woudt wrote:
> 
> > On Mon, Mar 4, 2013 at 6:10 PM, John Taylor-Johnston <
> > john.taylor-johns...@cegepsherbrooke.qc.ca> wrote:
> > 
> > > > You could echo HTML code e.g.
> > >>
> > >> Which is still purely HTML and has nothing whatsoever to do with PHP.
> > >>
> > >> >
> > >> > 
> > >> > Number: 
> > >> > Submit<**/button>
> > >> > 
> > >> >
> > >> > or include it as one of your form attributes:
> > >> >
> > >> > 
> > >> >   First name: 
> > >> >   Last name: 
> > >> >   
> > >> > 
> > >> Again, pure HTML, and no PHP involved. Specifically, the (asp??) page
> > >> called in the form action handler will never even be aware of the 
> > >> fact
> > >> that the page was opened in a new window, or at least was supposed 
> > >> to.
> > >>
> > >>
> > >> I was using an example and NOT intended to show ASP.
> > >>
> > > target="_blank" will open a new window every time. That will defeat the
> > > purpose.
> > >
> > > I have many different submit buttons, for different purposes. Depending on
> > > the $_POST value of each submit button, I tell PHP to do different things,
> > >
> > >
> > I don't wanna interrupt this thread, but are you sure you want multiple
> > submit buttons, especially more than two?
> > There are probably better solutions for what you want, for example, radio
> > button to select which action to take?
> > 
> > - Matijn
> 
> I have to agree with Matijn for this reason: If the user hits the
> [Enter] button at the end of their form data entry, it will trigger the
> *first* submit button on the page, which may or may not be what you
> want. Perhaps better to have the user indicate the action they wish via
> radio button (as Matijn suggested) and then a single submit button.
> 
> Paul
> 
> -- 
> Paul M. Foster
> http://noferblatz.com
> http://quillandmouse.com
> 


I don't know if that would hold true for forms that contain multiple
submit buttons.

There are plenty of good reasons though for multiple submit buttons in a
form, such as a shopping cart where each button is tied to a product and
allows it to be removed.

Thanks,
Ash
http://www.ashleysheridan.co.uk




[PHP] Re: Open form in new window

2013-03-04 Thread Tim Streater
On 04 Mar 2013 at 20:17, Paul M Foster  wrote: 

> On Mon, Mar 04, 2013 at 05:39:00PM +, Tim Streater wrote:

>> Personally I never submit forms. I use ajax to communicate with PHP
>> scripts and do something with the data that is returned by the script.
>> You can see a simple example at http://www.clothears.org.uk

> I'm trying to figure out where the net gain in that is. The PHP file
> being called via AJAX is doing its processing on the server either way.
> So it appears the only difference is an asynchronous Javascript/AJAX
> call or a synchronous PHP call (on a standard PHP form submission). What
> am I missing?

ISTM it's better for the user if, rather than reloading a whole page, you can 
get some bits of data from the server and use them to just alter the parts of 
the page that need updating.

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Open form in new window

2013-03-04 Thread Jim Giner

On 3/4/2013 12:44 AM, John Taylor-Johnston wrote:

I have many different submit button.



When php processes value="Enter Data", I would like to open a new
window, but only if I click this one.

Possible? I knw ther is an HTML target="" thingy. Can PHP do anything
magic?



Just put the DPRmode button in a separate form where that form's target 
attribute specifies another window name.  Check your html reference for 
reserved names you can use or just make one up. If you need some of the 
input values that duplicated in this "new" form, use an onclick js 
function to populate some hidden html fields contained within the form 
from the original inputs outside the form.  A bit of work, but very easy 
to do.  OR - you could use that same js function to alter the target 
parm of the single form that you have.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Not counting my own page visits

2013-03-04 Thread Angela Barone
On Mar 4, 2013, at 11:33 AM, Ashley Sheridan wrote:
> You can manually write a cookie on your machine, or use a special script that 
> only you visit that contains a setcookie() call (it only need be set once). 
> From there on, you can check the $_COOKIES super global for the presence of 
> your cookie.

I don't know why, but I can't get cookies to work.  Here's a script I'm 
calling from my browser:







Test Page


"; ?>
"; ?>



The domain is being displayed but the cookie is not.  There's no cookie 
in the browser prefs, either.  What am I doing wrong?

Angela
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Not counting my own page visits

2013-03-04 Thread David Robley
Angela Barone wrote:

> On Mar 4, 2013, at 11:33 AM, Ashley Sheridan wrote:
>> You can manually write a cookie on your machine, or use a special script
>> that only you visit that contains a setcookie() call (it only need be set
>> once). From there on, you can check the $_COOKIES super global for the
>> presence of your cookie.
> 
> I don't know why, but I can't get cookies to work.  Here's a script I'm
> calling from my browser:
> 
>  $domain = ($_SERVER['HTTP_HOST'] != 'localhost') ?
> $_SERVER['HTTP_HOST'] : false;
> $cookie = setcookie('test2', '123' , time()+60*60*24*30, '/', $domain);
> ?>
> 
> 
> 
> 
> 
> Test Page
> 
> 
> "; ?>
> "; ?>
> 
> 
> 
> The domain is being displayed but the cookie is not.  There's no cookie in
> the browser prefs, either.  What am I doing wrong?
> 
> Angela

Misunderstanding what $cookie contains? It is a boolean, i.e. it will be 
true or false depending on whether the cookie was set or not. To echo the 
contents of a cookie, you need to use the cookie name, viz

"; ?>

-- 
Cheers
David Robley

Oxymoron: Sisterly Love.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Not counting my own page visits

2013-03-04 Thread Ashley Sheridan
On Tue, 2013-03-05 at 10:19 +1030, David Robley wrote:

> Angela Barone wrote:
> 
> > On Mar 4, 2013, at 11:33 AM, Ashley Sheridan wrote:
> >> You can manually write a cookie on your machine, or use a special script
> >> that only you visit that contains a setcookie() call (it only need be set
> >> once). From there on, you can check the $_COOKIES super global for the
> >> presence of your cookie.
> > 
> > I don't know why, but I can't get cookies to work.  Here's a script I'm
> > calling from my browser:
> > 
> >  > $domain = ($_SERVER['HTTP_HOST'] != 'localhost') ?
> > $_SERVER['HTTP_HOST'] : false;
> > $cookie = setcookie('test2', '123' , time()+60*60*24*30, '/', $domain);
> > ?>
> > 
> > 
> > 
> > 
> > 
> > Test Page
> > 
> > 
> > "; ?>
> > "; ?>
> > 
> > 
> > 
> > The domain is being displayed but the cookie is not.  There's no cookie in
> > the browser prefs, either.  What am I doing wrong?
> > 
> > Angela
> 
> Misunderstanding what $cookie contains? It is a boolean, i.e. it will be 
> true or false depending on whether the cookie was set or not. To echo the 
> contents of a cookie, you need to use the cookie name, viz
> 
> "; ?>
> 
> -- 
> Cheers
> David Robley
> 
> Oxymoron: Sisterly Love.
> 
> 


Not just that, but if you set a cookie, you won't be able to retrieve it
in the same script I believe. It's only available in the $_COOKIES array
once you refresh the page, as that's when the super global is populated
from the cookie data that the browser sends.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] [ad] [free+opensource] htmlMicroscope (nested array viewer/dumper) upgraded - now allows for even larger arrays

2013-03-04 Thread Ravi Gehlot
I like PHPUnit for that matter. It does a good job of debugging.

Ravi.


On Sat, Dec 22, 2012 at 8:41 AM, rene7705  wrote:

> Hi Folks.
>
> URL: http://fancywebapps.com/products/htmlMicroscope
>
> Just wanted to let you all know that I've completed a long overdue
> upgrade to my free htmlMicroscope web component.
> It is basically a fancy replacement for var_dump() which can show you
> the full depth of an array regardless of how large or deep your PHP
> array or javascript object is.
>
> I won't repeat the entire homepage content here, but I think this
> version could be useful for at least some of the programmers on this
> list.
>
> I'll only repeat this message for significant updates.
>
> This is a significant update because I've finally cracked the barrier
> of displaying an object with more than a few hundred key-value pairs
> on a single level. That used to crash all browsers, not anymore.
>
> i'll continue work on this, want to build in (in order of priority):
> - auto navigation options (auto smooth scroll to links within the data)
> - middle mouse button click -> smooth offset scrolling
> - html source view
> - auto indented and colorcoded syntax-checked view for html + json
>
> Merry Christmas and a productive New Year to ya'll :D
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] Not counting my own page visits

2013-03-04 Thread tamouse mailing lists
On Mon, Mar 4, 2013 at 5:58 PM, Ashley Sheridan
 wrote:
> On Tue, 2013-03-05 at 10:19 +1030, David Robley wrote:
>
>> Angela Barone wrote:
>>
>> > On Mar 4, 2013, at 11:33 AM, Ashley Sheridan wrote:
>> >> You can manually write a cookie on your machine, or use a special script
>> >> that only you visit that contains a setcookie() call (it only need be set
>> >> once). From there on, you can check the $_COOKIES super global for the
>> >> presence of your cookie.
>> >
>> > I don't know why, but I can't get cookies to work.  Here's a script I'm
>> > calling from my browser:
>> >
>> > > > $domain = ($_SERVER['HTTP_HOST'] != 'localhost') ?
>> > $_SERVER['HTTP_HOST'] : false;
>> > $cookie = setcookie('test2', '123' , time()+60*60*24*30, '/', $domain);
>> > ?>
>> >
>> > 
>> > 
>> > 
>> > 
>> > Test Page
>> > 
>> > 
>> > "; ?>
>> > "; ?>
>> > 
>> > 
>> >
>> > The domain is being displayed but the cookie is not.  There's no cookie in
>> > the browser prefs, either.  What am I doing wrong?
>> >
>> > Angela
>>
>> Misunderstanding what $cookie contains? It is a boolean, i.e. it will be
>> true or false depending on whether the cookie was set or not. To echo the
>> contents of a cookie, you need to use the cookie name, viz
>>
>> "; ?>
>>
>> --
>> Cheers
>> David Robley
>>
>> Oxymoron: Sisterly Love.
>>
>>
>
>
> Not just that, but if you set a cookie, you won't be able to retrieve it
> in the same script I believe. It's only available in the $_COOKIES array
> once you refresh the page, as that's when the super global is populated
> from the cookie data that the browser sends.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>

Same script *invocation*. The cookie gets set when the response is
sent back to the client. If the client calls the same script again,
that cookie then uploaded. :)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Open form in new window

2013-03-04 Thread tamouse mailing lists
I would like to just take a step back and ponder what the user
experience of this will be. Click a submit button, one of *many* as
the OP says, and a new browser window opens? I don't think that is how
most people experience the web these days. Technicalities of how one
does this notwithstanding, I am urging the OP to consider their users.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php