RE: [PHP] Make text a submit button?

2001-05-03 Thread Sander Pilon

a href=javascript:document.forms[0].submit()bleh/a

Or something very similar. See the form.submit() function in your
favorite Javacsript manual. 


 -Original Message-
 From: Brandon Orther [mailto:[EMAIL PROTECTED]] 
 Sent: 3 May 2001 18:09
 To: PHP User Group
 Subject: [PHP] Make text a submit button?
 
 
 Hello,
 
 I am currently using image buttons for my submit buttons on a 
 project I am working on.  What I would like to use is regular 
 text like a hyperlink. Does anyone know of how I can use text 
 as the submit button?
 
 Thanks for any help
 Brandon
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
 [EMAIL PROTECTED] To contact the list 
 administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Which is better coding style...

2001-04-19 Thread Sander Pilon

Definitely the second style :)

(If we were talking about C(++) then the first would have even been
forbidden by my companies coding standard as well as several coding
standards of other companies I worked for.)

The reason is this - a function has one entrypoint (duh) and one
exitpoint. Jumping out of a function somewhere in the middle leads to
unmaintainable code, and bugs when extending that function and that
return is overlooked. But, as with the indenting and bracket placing, it
is a matter of religion. They would have to torture me for three weeks
to get me to place the brackets like you did in your example :)


function blah() 
{
$retval = "";

switch( $bob ) 
{
 case 1:
$retval = "this";
break;

case 2:
$retval = "that";
break;

default:
$retval = "other";
break;
}
  
return $retval;
}

 -Original Message-
 From: ..s.c.o.t.t.. [gts] [mailto:[EMAIL PROTECTED]] 
 Sent: 19 April 2001 21:31
 To: Php-General
 Subject: RE: [PHP] Which is better coding style...
 
 
 i say the first style.
 
 unneeded variables and other thingies just
 obscure things and make it harder to maintain.
 
 
  -Original Message-
  From: Boget, Chris [mailto:[EMAIL PROTECTED]]
  Subject: [PHP] Which is better coding style...
  
  Which is better?
  
  function blah() {
switch( $bob ) {
  case 1:
 return "this";
  
  case 2:
return "that";
  
  default:
return "other";
  
}
  }
  
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
 [EMAIL PROTECTED] To contact the list 
 administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] What's XML's Purpose??

2001-04-15 Thread Sander Pilon

XML, IMHO, can best be regarded as a layer between the real data and the
application.

We used to make up new formats for allmost every type of data exchange.
Every type had its own format, its own parser, and because of that the
same mistakes were made over and over again. Some formats weren't
extensible. Parsers contain(ed) bugs. 

XML solves all this. If your data is suitable to be encapsulated in xml
(meaning its not binary data and a little tag-overhead isn't a big deal)
there is no need for these mistakes anymore. You can use a trusted,
standard format, which is extensible and readable, and you can use
standard tools to read and write the data. (no more, or at least less,
bugs in parsers.)

-S


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Forcing htaccess login again

2001-02-26 Thread Sander Pilon

The request for a password is usually generated by a 401 header. Just do
this -

Header("WWW-authenticate: basic realm=\"Some realm\"");
Header("HTTP/1.1 401 Unauthorized");
exit;

That should pop up a box. Just make sure you check the values of
$PHP_AUTH_USER/PW first before presenting those headers.

This is more of an http question then it is a php question, I strongly
advise you to read and understand the HTTP/1.1 rfc - it can be found at
http://www.faqs.org/rfcs/rfc2616.html
(See chapter 10.4.2 for the documentation of the 401 header)

Regards,

Sander

 -Original Message-
 From: Chris Aitken [mailto:[EMAIL PROTECTED]]
 Sent: 27 February 2001 00:12
 To: [EMAIL PROTECTED]
 Subject: [PHP] Forcing htaccess login again


 Now im even getting more confused. Ive been doing some more research into
 the subject, and cant seem to find any answers.

 All of the PHP documentation about headers() talks about auth via
 PHP, but
 doesnt mention anything about htaccess as the auth system.

 On my main.php screen, this is where the cookie gets set once the
 user logs
 in with htaccess. What im trying to do is incorporate a section into
 (possibly) main.php which forces the htaccess to rerequest login again
 using my .htpasswd password file as the criteria.

 Is there some sort of header information which will make the
 webserver turn
 around and say. "Hey, you shouldnt be here anymore, login again and I
 might think about letting you in"

 Because once I can get the user logging in again, it will go to
 the rest of
 main.php and unset/reset the cookie with the new user.


 Scratching my head.



 Chris


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Display progress in browser using flush(); IE versus NS

2001-01-26 Thread Sander Pilon

Netrape supports multipart documents. Read up on your mime types and
encodings, and use that to create a nice progressbar in netscape :)

 -Original Message-
 From: Chris Lee [mailto:[EMAIL PROTECTED]]
 Sent: 26 January 2001 23:53
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Display progress in browser using flush(); IE versus
 NS


 havent tested this but im almost sure that netscape waits until the entire
 page is downloaded until being displayed IF there are tables on the page.
 write a small test script to see if Im right.


 --



 Chris Lee
 Mediawaveonline.com
 [EMAIL PROTECTED]





 ""Spallek, Heiko"" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi,
 
  I have a script which slowly processes several thousand lines of text. I
  want to give users a feeling for that the process is not dead.
 Thus, I am
  using:
 
  ...
  print "processing ";
  print"
  ";
  flush();
 
  for($i=0;$icount($total);$i++) {
  print".
";
  flush();
  // do something time consuming
  }
  ...
 
  Works perfect in IE 5.5: It shows the word "processing" followed every 2
  seconds (denpending on what I am doing) by a new period.
 
  But, in Netscape nothing shows up until the entire process has finished.
  When I push "stop" on the Netspace menu it shows what was transfered so
 far
  and "Transfer interrupted!" But, I would rather have it the way it is in
 IE.
 
  Any idea how to improve the code above?
  Thanks!
 
  Der Heiko
 
  Buchtipp: http://www.aufbruch.com/
  Heiko und Gisela Spallek:
  Aufbruch ins Land der unbegrenzten Moeglichkeiten.
  Studieren, Arbeiten und Leben in den USA: Tips fuer Neuankoemmlinge
  2. erweiterte und ueberarbeitete Auflage: ISBN: 3-934407-01-3
 
 
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Display progress in browser using flush(); IE versus NS

2001-01-26 Thread Sander Pilon

Look here -

http://home.netscape.com/assist/net_sites/mozilla/index.html
(That is not an animated gif)

http://home.netscape.com/assist/net_sites/pushpull.html

It only works in netscape (so far), but hey... you can't forget the two
remaining people on the planet that actually use it, right?


 -Original Message-
 From: Chris Lee [mailto:[EMAIL PROTECTED]]
 Sent: 26 January 2001 23:53
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Display progress in browser using flush(); IE versus
 NS


 havent tested this but im almost sure that netscape waits until the entire
 page is downloaded until being displayed IF there are tables on the page.
 write a small test script to see if Im right.


 --



 Chris Lee
 Mediawaveonline.com
 [EMAIL PROTECTED]





 ""Spallek, Heiko"" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi,
 
  I have a script which slowly processes several thousand lines of text. I
  want to give users a feeling for that the process is not dead.
 Thus, I am
  using:
 
  ...
  print "processing ";
  print"
  ";
  flush();
 
  for($i=0;$icount($total);$i++) {
  print".
";
  flush();
  // do something time consuming
  }
  ...
 
  Works perfect in IE 5.5: It shows the word "processing" followed every 2
  seconds (denpending on what I am doing) by a new period.
 
  But, in Netscape nothing shows up until the entire process has finished.
  When I push "stop" on the Netspace menu it shows what was transfered so
 far
  and "Transfer interrupted!" But, I would rather have it the way it is in
 IE.
 
  Any idea how to improve the code above?
  Thanks!
 
  Der Heiko
 
  Buchtipp: http://www.aufbruch.com/
  Heiko und Gisela Spallek:
  Aufbruch ins Land der unbegrenzten Moeglichkeiten.
  Studieren, Arbeiten und Leben in den USA: Tips fuer Neuankoemmlinge
  2. erweiterte und ueberarbeitete Auflage: ISBN: 3-934407-01-3
 
 
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Zend hit (Encoder price)

2001-01-25 Thread Sander Pilon



 Hello,

 What do you think about Zend position?
 http://php.weblogs.com/
 http://zend.com/phorum/read.php?num=3id=6277loc=0thread=6277


I think that if Zend wants to sell it for $6000, then they have all right
to. These guys have worked hard, and they deserve some cash for it.

If people can't afford it at $6000, then that's their problem. Software is
intellectual property, it shouldn't be free, and authors should be able to
charge any price for it they want to charge for it.

But, I don't think it's a wise decision to sell it at $6000, personally I
think I would sell it between $1000 and $4000, but that's just me. ($6000 is
a bit on the high side, considering what alternatives one haves for that
price, and considering that anyone who paid $1000 a year back (I recall
something about 'sponsoring') gets it all.)

-S


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] RE: url hide

2001-01-23 Thread Sander Pilon


Perhaps not related to php but I was wandering, is it
possible to hide
site's real url and replace it with something else (some
other URL).  ie.
someone clicks on a link on www.blah.co.uk which takes the
 user to an
designated area (ie. /house-search/) on www.foo.co.uk.  I want
the user still to see www.blah.co.uk. This is just for
aesthetic reasons
since ones the user finishes the search for houses (on
www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk.
   
I have tried www.javascripts.com but no success??

 you can use frame for doing this. for advanced people still can
 see the url but not newbie

It just makes me wonder how 'advanced' you need to be to right click and
select 'view properties'.
(Or a similar simple action when using netrape)

A frame also has some drawbacks, most important one being that a user,
wherever he is on your site, always bookmarks the frame. It's something that
would piss me off :) (Making me work, right click to find the real url I
want to bookmakr, etc.)

DHTML can do something like you want, but its complicated and not standard.
(You can load the contents of URL A in a hidden frame, then replace the
contents of the current document with the contents of the hidden frame.)

Just forget about the whole idea already, each individual page should have
an unique url, and that's the way it's supposed to be.

-Sander




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Dynamic 'left menu's' on site: Like a windows explorer system???

2001-01-11 Thread Sander Pilon




 Hi,

 I need to change my static left menu's into more dynamic ones, like when
 you click one title of the menu, it shows it sub menu etc.

 Any body knows if that can be achieved using PHP? Or should i repel on
 other techniques?
 If someone did make similar stuff, could you please send me an example
 or some good ideas?

 Thanks a lot in advance
 Yoeri.

Such dynamic (no-reload) behaviour can only be achieved in a client
side-solution. DHTML, java or flash is what you are looking for.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]