Re: [PHP] HTML & plain text in Outlook 2007

2010-02-05 Thread Richard Quadling
On 4 February 2010 16:44, Skip Evans  wrote:
> Hey all,
>
> First, let me say thanks for all the advice on Magento, and especially to
> Ryan who has used the beast and gave some great advice on skinning, links to
> some good docs and a book just for my designer. We'll be using and I'm
> looking forward to learning it.
>
> But anyway...
>
> I'm doing some maintenance work on a system that sends an email message
> using the multi-part boundaries to include both a plain text version and an
> HTML version of an email.
>
> I've read up on this before, but never actually done it. So implementing the
> code was not a big issue, and in fact it works perfectly when tested on my
> Ubuntu machine using Thunderbird to test the HTML and Evolution to test the
> plain text version. In fact, I can switch formats on both of these and all
> looks great.
>
> Enter Microsoft (Insert opening of Bach's Toccata and Fugue in D minor to
> send chills up my readers' spines.)
>
> On Outlook 2007 in HTML mode it renders, how can I put this... half-assedly.
> In text mode the whole things a bust. There is the HTML code all stuffed up
> at the top, boundary codes are visible, just plain awful.
>
> Googling around I see articles from 2007 when that version of Outlook came
> out lamenting the fact that MS pulled the IE rendering engine from it and
> replaced it with MS Word's renderer to plug security holes expoitable via
> email.
>
> Does anyone have any experience with HTML & plain text multi-part messages
> and Outlook 2007, or any tips how I can get this working? Still Googling,
> but any tips would be greatly appreciated.
>
> Skip
> --
> 
> Skip Evans
> PenguinSites.com, LLC
> 503 S Baldwin St, #1
> Madison WI 53703
> 608.250.2720
> http://penguinsites.com
> 
> Those of you who believe in
> telekinesis, raise my hand.
>  -- Kurt Vonnegut
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

I create HTML.Mime based emails in PHP with a plain text part which is
basically a cop out saying that they should upgrade.

The HTML part is a fax form. They print it out, add some stickers
relating to work carried out and then fax it back (or email it as a
TIFF or PDF if they have the skills/tech to do that).

I use Outlook 2003 (work) and GMail via Chrome (personal).

The form includes embedded images (essentially their logo as the forms
are passed to their clients) and have a PDF attached ( a report from
our systems about the email they are receiving).

All fairly simple.

1 - Plain Text - (Please upgrade)
2 - Alternative HTML
3 -  Embedded images
4 - Attachment

For this, I use RMail from phpguru.org (previously known as
html_mime_mail5) http://www.phpguru.org/static/Rmail

The HTML I used contains limited CSS and is table based.

I initially did it "properly", or so I thought.

I'd used IE7/FireFox/Safari/Opera as a test of a proper HTML page with
CSS to produce a nice looking form. Scaled nicely, limited shrink,
etc.

Looked OK in Outlook 2003 too!

But when I sent them for approval to the line manager, who uses
Outlook 2007, well, let's just say he didn't understand the form at
all!

Even when I redid it with tables, I'd used , , 
(proper HTML at least). In O2K7? It renders in order - header, footer,
body. Great!

So, the HTML I ended up with REALLY looks like something from when I
was first learning HTML (I just worked it out as being 13 years ago!).

So, yes. The code is horribly old fashioned. But it works.


-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



Re: [PHP] Facebook PHP compiler

2010-02-05 Thread German Geek
Yes. Totally agree. Would like to try asap.
++Tim Hinnerk Heuer++

http://www.ihostnz.com


On 3 February 2010 10:15, Adam Richardson  wrote:

> Looks very promising !!!
>
> On Tue, Feb 2, 2010 at 1:12 PM, Robert Cummings  >wrote:
>
> > Cesar D. Rodas wrote:
> >
> >> Hello,
> >>
> >> Have you guys checked this PHP to C++ converter from the Facebook
> People?
> >>
> >> http://developers.facebook.com/news.php?blog=1&story=358
> >>
> >
> > Very interesting... I heard about this a few days ago on Slashdot. Most
> > people figured it would be a compiler of some sort, though it's
> interesting
> > they chose C++ instead of C as Roadsend has done. I also wonder why they
> > didn't just jump on board with Roadsend, but perhaps they wanted full
> > control (which makes sense from the perspective of their needs).
> >
> > Either way, it's another tool that can only be good for PHP.
> >
> > Cheers,
> > Rob.
> > --
> > http://www.interjinn.com
> > Application and Templating Framework for PHP
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> Nephtali:  PHP web framework that functions beautifully
> http://nephtaliproject.com
>


Re: [PHP] HTML & plain text in Outlook 2007

2010-02-05 Thread Phpster
Ire ently needed to do this for a client as well. I took their word  
doc and converted it to HTML with open office. This created a template  
that I just do some search and replace to fill in the criteria.


This has worked very well with outlook and hotmail and gmail.

Not sure if it will fit your needs, but it could be worth a try.

Bastien

Sent from my iPod

On Feb 5, 2010, at 5:32 AM, Richard Quadling  
 wrote:



On 4 February 2010 16:44, Skip Evans  wrote:

Hey all,

First, let me say thanks for all the advice on Magento, and  
especially to
Ryan who has used the beast and gave some great advice on skinning,  
links to
some good docs and a book just for my designer. We'll be using and  
I'm

looking forward to learning it.

But anyway...

I'm doing some maintenance work on a system that sends an email  
message
using the multi-part boundaries to include both a plain text  
version and an

HTML version of an email.

I've read up on this before, but never actually done it. So  
implementing the
code was not a big issue, and in fact it works perfectly when  
tested on my
Ubuntu machine using Thunderbird to test the HTML and Evolution to  
test the
plain text version. In fact, I can switch formats on both of these  
and all

looks great.

Enter Microsoft (Insert opening of Bach's Toccata and Fugue in D  
minor to

send chills up my readers' spines.)

On Outlook 2007 in HTML mode it renders, how can I put this... half- 
assedly.
In text mode the whole things a bust. There is the HTML code all  
stuffed up

at the top, boundary codes are visible, just plain awful.

Googling around I see articles from 2007 when that version of  
Outlook came
out lamenting the fact that MS pulled the IE rendering engine from  
it and
replaced it with MS Word's renderer to plug security holes  
expoitable via

email.

Does anyone have any experience with HTML & plain text multi-part  
messages
and Outlook 2007, or any tips how I can get this working? Still  
Googling,

but any tips would be greatly appreciated.

Skip
--

Skip Evans
PenguinSites.com, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://penguinsites.com

Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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




I create HTML.Mime based emails in PHP with a plain text part which is
basically a cop out saying that they should upgrade.

The HTML part is a fax form. They print it out, add some stickers
relating to work carried out and then fax it back (or email it as a
TIFF or PDF if they have the skills/tech to do that).

I use Outlook 2003 (work) and GMail via Chrome (personal).

The form includes embedded images (essentially their logo as the forms
are passed to their clients) and have a PDF attached ( a report from
our systems about the email they are receiving).

All fairly simple.

1 - Plain Text - (Please upgrade)
2 - Alternative HTML
3 -  Embedded images
4 - Attachment

For this, I use RMail from phpguru.org (previously known as
html_mime_mail5) http://www.phpguru.org/static/Rmail

The HTML I used contains limited CSS and is table based.

I initially did it "properly", or so I thought.

I'd used IE7/FireFox/Safari/Opera as a test of a proper HTML page with
CSS to produce a nice looking form. Scaled nicely, limited shrink,
etc.

Looked OK in Outlook 2003 too!

But when I sent them for approval to the line manager, who uses
Outlook 2007, well, let's just say he didn't understand the form at
all!

Even when I redid it with tables, I'd used , , 
(proper HTML at least). In O2K7? It renders in order - header, footer,
body. Great!

So, the HTML I ended up with REALLY looks like something from when I
was first learning HTML (I just worked it out as being 13 years ago!).

So, yes. The code is horribly old fashioned. But it works.


--
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



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



Re: [PHP] HTML & plain text in Outlook 2007

2010-02-05 Thread Ashley Sheridan
On Fri, 2010-02-05 at 08:03 -0500, Phpster wrote:

> Ire ently needed to do this for a client as well. I took their word  
> doc and converted it to HTML with open office. This created a template  
> that I just do some search and replace to fill in the criteria.
> 
> This has worked very well with outlook and hotmail and gmail.
> 
> Not sure if it will fit your needs, but it could be worth a try.
> 
> Bastien
> 
> Sent from my iPod
> 
> On Feb 5, 2010, at 5:32 AM, Richard Quadling  
>  wrote:
> 
> > On 4 February 2010 16:44, Skip Evans  wrote:
> >> Hey all,
> >>
> >> First, let me say thanks for all the advice on Magento, and  
> >> especially to
> >> Ryan who has used the beast and gave some great advice on skinning,  
> >> links to
> >> some good docs and a book just for my designer. We'll be using and  
> >> I'm
> >> looking forward to learning it.
> >>
> >> But anyway...
> >>
> >> I'm doing some maintenance work on a system that sends an email  
> >> message
> >> using the multi-part boundaries to include both a plain text  
> >> version and an
> >> HTML version of an email.
> >>
> >> I've read up on this before, but never actually done it. So  
> >> implementing the
> >> code was not a big issue, and in fact it works perfectly when  
> >> tested on my
> >> Ubuntu machine using Thunderbird to test the HTML and Evolution to  
> >> test the
> >> plain text version. In fact, I can switch formats on both of these  
> >> and all
> >> looks great.
> >>
> >> Enter Microsoft (Insert opening of Bach's Toccata and Fugue in D  
> >> minor to
> >> send chills up my readers' spines.)
> >>
> >> On Outlook 2007 in HTML mode it renders, how can I put this... half- 
> >> assedly.
> >> In text mode the whole things a bust. There is the HTML code all  
> >> stuffed up
> >> at the top, boundary codes are visible, just plain awful.
> >>
> >> Googling around I see articles from 2007 when that version of  
> >> Outlook came
> >> out lamenting the fact that MS pulled the IE rendering engine from  
> >> it and
> >> replaced it with MS Word's renderer to plug security holes  
> >> expoitable via
> >> email.
> >>
> >> Does anyone have any experience with HTML & plain text multi-part  
> >> messages
> >> and Outlook 2007, or any tips how I can get this working? Still  
> >> Googling,
> >> but any tips would be greatly appreciated.
> >>
> >> Skip
> >> --
> >> 
> >> Skip Evans
> >> PenguinSites.com, LLC
> >> 503 S Baldwin St, #1
> >> Madison WI 53703
> >> 608.250.2720
> >> http://penguinsites.com
> >> 
> >> Those of you who believe in
> >> telekinesis, raise my hand.
> >>  -- Kurt Vonnegut
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
> > I create HTML.Mime based emails in PHP with a plain text part which is
> > basically a cop out saying that they should upgrade.
> >
> > The HTML part is a fax form. They print it out, add some stickers
> > relating to work carried out and then fax it back (or email it as a
> > TIFF or PDF if they have the skills/tech to do that).
> >
> > I use Outlook 2003 (work) and GMail via Chrome (personal).
> >
> > The form includes embedded images (essentially their logo as the forms
> > are passed to their clients) and have a PDF attached ( a report from
> > our systems about the email they are receiving).
> >
> > All fairly simple.
> >
> > 1 - Plain Text - (Please upgrade)
> > 2 - Alternative HTML
> > 3 -  Embedded images
> > 4 - Attachment
> >
> > For this, I use RMail from phpguru.org (previously known as
> > html_mime_mail5) http://www.phpguru.org/static/Rmail
> >
> > The HTML I used contains limited CSS and is table based.
> >
> > I initially did it "properly", or so I thought.
> >
> > I'd used IE7/FireFox/Safari/Opera as a test of a proper HTML page with
> > CSS to produce a nice looking form. Scaled nicely, limited shrink,
> > etc.
> >
> > Looked OK in Outlook 2003 too!
> >
> > But when I sent them for approval to the line manager, who uses
> > Outlook 2007, well, let's just say he didn't understand the form at
> > all!
> >
> > Even when I redid it with tables, I'd used , , 
> > (proper HTML at least). In O2K7? It renders in order - header, footer,
> > body. Great!
> >
> > So, the HTML I ended up with REALLY looks like something from when I
> > was first learning HTML (I just worked it out as being 13 years ago!).
> >
> > So, yes. The code is horribly old fashioned. But it works.
> >
> >
> > -- 
> > -
> > Richard Quadling
> > "Standing on the shoulders of some very clever giants!"
> > EE : http://www.experts-exchange.com/M_248814.html
> > EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
> > Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
> > ZOPA : http://uk.zopa.com/member/RQuadling
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/

RE: [PHP] How to change a filename for download (e.g. jpeg, pdf etc.)

2010-02-05 Thread SED
Hi,

I finally got the time to test your solutions, the following is the best
solution and causes a minimum stress on the server and a decent security.

header('Content-type: application/pdf');
header('Content-Disposition: attachment;
filename="downloaded.pdf"');
readfile('original.pdf');
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the
past

(Script from php.net based on your hints.)

I have tested this in many ways, but before I did not know how this was
simple.

SED


-Original Message-
From: richard.he...@gmail.com [mailto:richard.he...@gmail.com] On Behalf Of
Richard
Sent: 25. janúar 2010 10:16
To: SED
Cc: php-general@lists.php.net
Subject: Re: [PHP] How to change a filename for download (e.g. jpeg, pdf
etc.)

Hi,

> Can anyone point me to tutorials on how to change a filename for each
> download? My goal is to give the downloader a random name for a picture or
a
> document, so he will never know what the original filename is.

Try adding a Content-Disposition header:



-- 
Richard Heyes
HTML5 canvas graphing: RGraph - http://www.rgraph.net (updated 16th January)
Follow me on Twitter: http://twitter.com/_rgraph
Lots of PHP and Javascript code - http://www.phpguru.org




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



Re: [PHP] Facebook PHP compiler

2010-02-05 Thread ebhakt
Thanks for th einfo man!!

On Fri, Feb 5, 2010 at 3:35 AM, German Geek  wrote:

> Yes. Totally agree. Would like to try asap.
> ++Tim Hinnerk Heuer++
>
> http://www.ihostnz.com
>
>
> On 3 February 2010 10:15, Adam Richardson  wrote:
>
> > Looks very promising !!!
> >
> > On Tue, Feb 2, 2010 at 1:12 PM, Robert Cummings  > >wrote:
> >
> > > Cesar D. Rodas wrote:
> > >
> > >> Hello,
> > >>
> > >> Have you guys checked this PHP to C++ converter from the Facebook
> > People?
> > >>
> > >> http://developers.facebook.com/news.php?blog=1&story=358
> > >>
> > >
> > > Very interesting... I heard about this a few days ago on Slashdot. Most
> > > people figured it would be a compiler of some sort, though it's
> > interesting
> > > they chose C++ instead of C as Roadsend has done. I also wonder why
> they
> > > didn't just jump on board with Roadsend, but perhaps they wanted full
> > > control (which makes sense from the perspective of their needs).
> > >
> > > Either way, it's another tool that can only be good for PHP.
> > >
> > > Cheers,
> > > Rob.
> > > --
> > > http://www.interjinn.com
> > > Application and Templating Framework for PHP
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> > --
> > Nephtali:  PHP web framework that functions beautifully
> > http://nephtaliproject.com
> >
>



-- 
Bhaskar Tiwari
GTSE Generalist
Directory Services
Microsoft

\
All we have to decide is what to do with the time that has been given to us

bhaskartiw...@officeliveusers.com

http://www.ebhakt.com/
http://fytclub.net/

http://bhaskartiwari.web.officelive.com/
http://ebhakt.spaces.live.com/


Re: [PHP] HTML & plain text in Outlook 2007

2010-02-05 Thread Robert Cummings

Ashley Sheridan wrote:

On Thu, 2010-02-04 at 13:44 -0500, Robert Cummings wrote:


What about signing yourself up to some newsletters to see how they do
it?

Looking at the ones I get from Facebook as an example, they use the
boundary codes you mentioned, and I can't see anything particularly
special that's been added. What order are you sending the two message
parts by the way? I think the traditional way is to send the plain/text
part first, so that UA's that don't understand or support multipart
messages only use the first one. As you mentioned that you're seeing
HTML code at the top, I'd hazard a guess that you're sending the HTML
first?
The problem is most likely NOT his email structure, but the fact that 
Microsoft in all their lock-in, make things difficult, non standard, 
monopolistic philosophy chose to switch out the IE HTML renderer (which 
was getting pretty decent with IE7 and IE8) with the Office HTML 
renderer... so now basic things like CSS padding of something as simple 
as a  tag is not possible. You now need to use margins instead. The 
full list of supported attributes / CSS can be found here:


 http://msdn.microsoft.com/en-us/library/aa338201.aspx

Obviously creating HTML emails was getting too easy (like it is with 
Thunderbird). Of course... I guess it could be as bad as Google 
stripping out the stylesheets entirely when viewing HTML content which 
forces you to put the styles on the tags themselves.


... actually I'm not sure what's worse... at least you can use standard 
styles with Google's gmail. Either way... making nice looking HTML 
emails that work across Outlook, Thunderbird, Gmail, Yahoo, and Hotmail 
is a pain in the ass.


Cheers,
Rob.



If he's getting HTML output at the top of the email, I would think that
did suggest that MS Word didn't like the structure. Making HTML emails
is now such a difficult job, as the email clients rendering engines tend
to not get updated as often as browsers, and there doesn't seem to be
any effort in bringing the rendering of the email clients together.

Whenever I create these emails I try to make sure I try no to get too
creative in the design, and use not only CSS styles, but properties of
the HTML tags themselves. It means I end up writing the CSS essentially
twice and backing it up with old deprecated HTML attributes, but it
usually does the trick.

Is there any effort by some standards group that email clients could
benefit from?


I think I skipped over some relevant information in the original post :)

Still... as you've said... email HTML sucks... and MS made it worse.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

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



[PHP] PHP generated HTML has submit button which picks up the wrong url.

2010-02-05 Thread Mary Anderson

Hi,
  I am writing code in PHP which generates HTML script.  My app is 
fairly complex.  Twice in the development of the application I have run 
into a problem with submit buttons which pick up the wrong url.  Instead 
of call the url for that submit button, it appears to call the url for 
the first submit button on the page.  The problem may be intermittent, 
which seems to suggest that something funny is happening with the 
cache.  Clearing the cache did not help in the last go around.
I am including the generated html code.  Hitting the button 'Retrieve 
all ...' should call up the url get_query_forms.php.  Instead it calls 
up the url query_form_display_data.php, which is the url for the first 
submit button on the page.


  Any clues to clear up this mystery would be greatly appreciated!

Mary Anderson







http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>



Display Data

 
 action=./query_form_display_data.php?perm_batch_file=perm&pg_query_form_id=518&data_table_id=255&data_batch_id=&query_form_schema=permanent_queries&batch_input_file_id=&create_tmp_data_tables=0">



72 rows have been returned by this query





















http://unproto.demog.berkeley.edu/memdemo/query_form_display_data.php?worksheet_join_element_initialize=1&perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries'"
 >
http://unproto.demog.berkeley.edu/memdemo/query_form_display_data.php?worksheet_join_element_initialize=1&perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries'"
 >
http://unproto.demog.berkeley.edu/memdemo/query_form_display_data.php?worksheet_join_element_initialize=1&perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries'"
 >


http://unproto.demog.berkeley.edu/memdemo/edit_query_form.php?perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries'"
 >
http://unproto.demog.berkeley.edu/memdemo/get_query_forms.php?perm_batch_file='perm'&query_form_schema=permanent_queries&user_name=&data_table_type_id='"
 >
http://unproto.demog.berkeley.edu/memdemo/get_query_forms.php?perm_batch_file='perm'&query_form_schema=temporary_queries&user_name=&data_table_type_id='"
 >
http://unproto.demog.berkeley.edu/memdemo/get_query_forms.php?perm_batch_file=perm&user_name='"
 >



http://unproto.demog.berkeley.edu/memdemo'" >






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



Re: [PHP] PHP generated HTML has submit button which picks up the wrong url.

2010-02-05 Thread Joseph Thayne
This is actually a javascript issue rather than a PHP issue.  What is 
happening is that the action of the form is what is being submitted.  
The action never changes.  What you need to do is have the javascript 
change the action as well as submit the form (which means you will need 
to move it to a function).  It would also help to empty out the form 
action as well.


Example JS function:
function retrieveAllPerm()
{
document.display_data.action='http://unproto.demog.berkeley.edu/memdemo/edit_query_form.php?perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries';
document.display_data.submit();
}

Example submit button:
onClick="javascript:retrieveAllPerm();" >Revise query


Joseph

Mary Anderson wrote:

Hi,
  I am writing code in PHP which generates HTML script.  My app is 
fairly complex.  Twice in the development of the application I have 
run into a problem with submit buttons which pick up the wrong url.  
Instead of call the url for that submit button, it appears to call the 
url for the first submit button on the page.  The problem may be 
intermittent, which seems to suggest that something funny is happening 
with the cache.  Clearing the cache did not help in the last go around.
I am including the generated html code.  Hitting the button 'Retrieve 
all ...' should call up the url get_query_forms.php.  Instead it calls 
up the url query_form_display_data.php, which is the url for the first 
submit button on the page.


  Any clues to clear up this mystery would be greatly appreciated!

Mary Anderson







"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

http://www.w3.org/1999/xhtml";>



Display Data

 action=./query_form_display_data.php?perm_batch_file=perm&pg_query_form_id=518&data_table_id=255&data_batch_id=&query_form_schema=permanent_queries&batch_input_file_id=&create_tmp_data_tables=0"> 




72 rows have been returned by this query





















value='Change worksheet : Change max row count' 
onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/query_form_display_data.php?worksheet_join_element_initialize=1&perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries'" 
>
onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/query_form_display_data.php?worksheet_join_element_initialize=1&perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries'" 
>
onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/query_form_display_data.php?worksheet_join_element_initialize=1&perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries'" 
>



onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/edit_query_form.php?perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries'" 
>
value='Retrieve all permanent query forms for this table type' 
onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/get_query_forms.php?perm_batch_file='perm'&query_form_schema=permanent_queries&user_name=&data_table_type_id='" 
>
value='Retrieve all temporary query forms for this table type' 
onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/get_query_forms.php?perm_batch_file='perm'&query_form_schema=temporary_queries&user_name=&data_table_type_id='" 
>
onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/get_query_forms.php?perm_batch_file=perm&user_name='" 
>




onClick="form.action='http://unproto.demog.berkeley.edu/memdemo'" 
>


value='perm'>name='tmp_data_values_table' 
value='display.perm_tmp_data_values_518'>id='pg_query_form_id' name='pg_query_form_id' value='518'>type='hidden' id='query_form_schema' name='query_form_schema' 
value='permanent_queries'>name='data_table_id' value='255'>id='data_batch_id' name='data_batch_id' value='218'>type='hidden' id='batch_input_file_id' name='batch_input_file_id' 
value=''>value=''>value=''>name='data_table_type_id' value=''>name='user_name' value=''>







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



Re: [PHP] Appalling Dreamweaver performance

2010-02-05 Thread Lenin
Try the NetBeans then


Re: [PHP] PHP generated HTML has submit button which picks up the wrong url.

2010-02-05 Thread Ashley Sheridan
On Fri, 2010-02-05 at 14:33 -0600, Joseph Thayne wrote:

> This is actually a javascript issue rather than a PHP issue.  What is 
> happening is that the action of the form is what is being submitted.  
> The action never changes.  What you need to do is have the javascript 
> change the action as well as submit the form (which means you will need 
> to move it to a function).  It would also help to empty out the form 
> action as well.
> 
> Example JS function:
> function retrieveAllPerm()
> {
> document.display_data.action='http://unproto.demog.berkeley.edu/memdemo/edit_query_form.php?perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries';
> document.display_data.submit();
> }
> 
> Example submit button:
>  onClick="javascript:retrieveAllPerm();" >Revise query
> 
> Joseph
> 
> Mary Anderson wrote:
> > Hi,
> >   I am writing code in PHP which generates HTML script.  My app is 
> > fairly complex.  Twice in the development of the application I have 
> > run into a problem with submit buttons which pick up the wrong url.  
> > Instead of call the url for that submit button, it appears to call the 
> > url for the first submit button on the page.  The problem may be 
> > intermittent, which seems to suggest that something funny is happening 
> > with the cache.  Clearing the cache did not help in the last go around.
> > I am including the generated html code.  Hitting the button 'Retrieve 
> > all ...' should call up the url get_query_forms.php.  Instead it calls 
> > up the url query_form_display_data.php, which is the url for the first 
> > submit button on the page.
> >
> >   Any clues to clear up this mystery would be greatly appreciated!
> >
> > Mary Anderson
> >
> > 
> >
> >
> >
> >
> >
> >  > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> > http://www.w3.org/1999/xhtml";>
> > 
> > 
> > 
> > Display Data
> > 
> >   > action=./query_form_display_data.php?perm_batch_file=perm&pg_query_form_id=518&data_table_id=255&data_batch_id=&query_form_schema=permanent_queries&batch_input_file_id=&create_tmp_data_tables=0">
> >  
> >
> >
> > 
> > 72 rows have been returned by this query
> > 
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> > 
> >
> > 
> >
> > 
> >
> > 
> > 
> > 
> >  > value='Change worksheet : Change max row count' 
> > onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/query_form_display_data.php?worksheet_join_element_initialize=1&perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries'"
> >  
> > >
> >  > onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/query_form_display_data.php?worksheet_join_element_initialize=1&perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries'"
> >  
> > >
> >  > onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/query_form_display_data.php?worksheet_join_element_initialize=1&perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries'"
> >  
> > >
> >
> > 
> >  > onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/edit_query_form.php?perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries'"
> >  
> > >
> >  > value='Retrieve all permanent query forms for this table type' 
> > onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/get_query_forms.php?perm_batch_file='perm'&query_form_schema=permanent_queries&user_name=&data_table_type_id='"
> >  
> > >
> >  > value='Retrieve all temporary query forms for this table type' 
> > onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/get_query_forms.php?perm_batch_file='perm'&query_form_schema=temporary_queries&user_name=&data_table_type_id='"
> >  
> > >
> >  > onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/get_query_forms.php?perm_batch_file=perm&user_name='"
> >  
> > >
> >
> > 
> > 
> >  > onClick="form.action='http://unproto.demog.berkeley.edu/memdemo'" 
> > >
> >
> >  > value='perm'> > name='tmp_data_values_table' 
> > value='display.perm_tmp_data_values_518'> > id='pg_query_form_id' name='pg_query_form_id' value='518'> > type='hidden' id='query_form_schema' name='query_form_schema' 
> > value='permanent_queries'> > name='data_table_id' value='255'> > id='data_batch_id' name='data_batch_id' value='218'> > type='hidden' id='batch_input_file_id' name='batch_input_file_id' 
> > value=''> > value=''> > value=''> > name='data_table_type_id' value=''> > name='user_name' value=''>
> > 
> > 
> >
> >
> 


Bit of advice though, don't use Javascript to submit a form. Firstly,
Javascript isn't available on all browsers, and on those it is available
on, not everyone has it turned on. The W3C has the stats for Javascript
being unavailable in a browser at about 5%. Imagine that your site is
only aimed at the population of the UK, 5% of 61 million is still over 3
million people. Obviously that doesn't take into consideration the ages
of people who'd b

Re: [PHP] PHP generated HTML has submit button which picks up the wrong url.

2010-02-05 Thread Joseph Thayne
"What you maybe ought to consider is using several submit buttons, and 
give each a name and a value. That way, your PHP script can check for a 
specifically named variable sent from the form. That way, you keep many 
people happy, and your site still works perfectly."


The problem with doing it that way is that IE is not happy with multiple 
submit buttons in a single form.  To get around that, you can use image 
input types or buttons.  Also, a return key does not send values the 
same way as a mouse click.  I can't remember which browser does what, 
but the three possible submitted values are (providing the name of the 
button is submit):


submit
submit_x and submit_y
submit_x, submit_y, and submit

Just something to be aware of if you are looking for the value of the 
submit button -- not 100% reliable.  It would be better to use a hidden 
form value or just check to see if submit or submit_x is set.


Joseph

Ashley Sheridan wrote:

On Fri, 2010-02-05 at 14:33 -0600, Joseph Thayne wrote:
This is actually a javascript issue rather than a PHP issue.  What is 
happening is that the action of the form is what is being submitted.  
The action never changes.  What you need to do is have the javascript 
change the action as well as submit the form (which means you will need 
to move it to a function).  It would also help to empty out the form 
action as well.


Example JS function:
function retrieveAllPerm()
{
document.display_data.action='http://unproto.demog.berkeley.edu/memdemo/edit_query_form.php?perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries'
 
;
document.display_data.submit();
}

Example submit button:
onClick="javascript:retrieveAllPerm();" >Revise query


Joseph

Mary Anderson wrote:
> Hi,
>   I am writing code in PHP which generates HTML script.  My app is 
> fairly complex.  Twice in the development of the application I have 
> run into a problem with submit buttons which pick up the wrong url.  
> Instead of call the url for that submit button, it appears to call the 
> url for the first submit button on the page.  The problem may be 
> intermittent, which seems to suggest that something funny is happening 
> with the cache.  Clearing the cache did not help in the last go around.
> I am including the generated html code.  Hitting the button 'Retrieve 
> all ...' should call up the url get_query_forms.php.  Instead it calls 
> up the url query_form_display_data.php, which is the url for the first 
> submit button on the page.

>
>   Any clues to clear up this mystery would be greatly appreciated!
>
> Mary Anderson
>
> 
>
>
>
>
>
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

> http://www.w3.org/1999/xhtml";>
> 
> 
> 
> Display Data
> 
>  > action=./query_form_display_data.php?perm_batch_file=perm&pg_query_form_id=518&data_table_id=255&data_batch_id=&query_form_schema=permanent_queries&batch_input_file_id=&create_tmp_data_tables=0"> 
>

>
> 
> 72 rows have been returned by this query
> 
> 
>
> 
>
> 
>
> 
>
> 
>
> 
> 
>
> 
>
> 
>
> 
> 
> 
> > value='Change worksheet : Change max row count' 
> onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/query_form_display_data.php?worksheet_join_element_initialize=1&perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries' " 
> >
> > onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/query_form_display_data.php?worksheet_join_element_initialize=1&perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries' " 
> >
> > onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/query_form_display_data.php?worksheet_join_element_initialize=1&perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries' " 
> >

>
> 
> > onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/edit_query_form.php?perm_batch_file=perm&pg_query_form_id=518&query_form_schema=permanent_queries' " 
> >
> > value='Retrieve all permanent query forms for this table type' 
> onClick="form.action='http://unproto.demog.berkeley.edu/memdemo/get_qu

Re: [PHP] Appalling Dreamweaver performance

2010-02-05 Thread haliphax
On Fri, Feb 5, 2010 at 3:59 PM, Lenin  wrote:

> Try the NetBeans then
>

Personally, I've found that Programmer's Notepad 2 is a pretty capable
editor, and has some nice features such as auto-closing elements when
working with markup languages (HTML, XML, XSL, XHTML, etc.).

http://www.pnotepad.org


// Todd


Re: [PHP] OpenID

2010-02-05 Thread haliphax
On Mon, Feb 1, 2010 at 9:54 PM, Michael A. Peters  wrote:

> Daevid Vincent wrote:
>
>>
>>
>>> -Original Message-
>>> From: Al [mailto:n...@ridersite.org] Sent: Monday, February 01, 2010
>>> 12:09 PM
>>> To: php-general@lists.php.net
>>> Subject: [PHP] OpenID
>>>
>>> This is a bit off subject, but
>>>
>>> What is your opinion on OpenID?
>>>
>>
>> Failed gimick. Tried to resurface again about a year ago. Still seems like
>> failure.
>>
>
> ++
>
> Session ID hijacking is bad enough, it gives the malicious user access to
> one resource.
>
> OpenID hijacking gives the malicious user access to a ton of resources.
> And what does a user do when their OpenID provider disappears?
>
>
I think Michael hit the nail on the head as far as my concerns are.. well..
concerned. :) Google's OpenID provider seems like it would be around forever
and whatnot, but if you're going to rely on one of the "big" OpenID
providers, then it would appear that OpenID itself is useless. Facebook's
OpenID, etc., are on shaky ground at best.

I use a few sites that leverage OpenID as their login process, and I've got
to say--it's very convenient. However, I only use my Google account for
OpenID logins, so to me, it's really just a Google connector.

I commend everyone involved for their effort, but I think the underlying
principles need to be re-examined. It feels like they rushed the whole
concept into production before too many of the fundamental issues had been
discussed and dealt with.

My 2c.


// Todd


Re: [PHP] OpenID

2010-02-05 Thread Nate Benes
There is a openID mailing list set up if anyone has any technical questions,

gene...@openid.net

-Nate


On Fri, Feb 5, 2010 at 4:57 PM, haliphax  wrote:

> On Mon, Feb 1, 2010 at 9:54 PM, Michael A. Peters  wrote:
>
> > Daevid Vincent wrote:
> >
> >>
> >>
> >>> -Original Message-
> >>> From: Al [mailto:n...@ridersite.org] Sent: Monday, February 01, 2010
> >>> 12:09 PM
> >>> To: php-general@lists.php.net
> >>> Subject: [PHP] OpenID
> >>>
> >>> This is a bit off subject, but
> >>>
> >>> What is your opinion on OpenID?
> >>>
> >>
> >> Failed gimick. Tried to resurface again about a year ago. Still seems
> like
> >> failure.
> >>
> >
> > ++
> >
> > Session ID hijacking is bad enough, it gives the malicious user access to
> > one resource.
> >
> > OpenID hijacking gives the malicious user access to a ton of resources.
> > And what does a user do when their OpenID provider disappears?
> >
> >
> I think Michael hit the nail on the head as far as my concerns are.. well..
> concerned. :) Google's OpenID provider seems like it would be around
> forever
> and whatnot, but if you're going to rely on one of the "big" OpenID
> providers, then it would appear that OpenID itself is useless. Facebook's
> OpenID, etc., are on shaky ground at best.
>
> I use a few sites that leverage OpenID as their login process, and I've got
> to say--it's very convenient. However, I only use my Google account for
> OpenID logins, so to me, it's really just a Google connector.
>
> I commend everyone involved for their effort, but I think the underlying
> principles need to be re-examined. It feels like they rushed the whole
> concept into production before too many of the fundamental issues had been
> discussed and dealt with.
>
> My 2c.
>
>
> // Todd
>


Re: [PHP] PHP generated HTML has submit button which picks up the wrong url.

2010-02-05 Thread Robert Cummings

Joseph Thayne wrote:
"What you maybe ought to consider is using several submit buttons, and 
give each a name and a value. That way, your PHP script can check for a 
specifically named variable sent from the form. That way, you keep many 
people happy, and your site still works perfectly."


The problem with doing it that way is that IE is not happy with multiple 
submit buttons in a single form.


I've never seen IE have a problem with multiple submit buttons. I'm 
guessing you're doing something wrong. I often have multiple submit buttons.


Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

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