|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Wed Mar 14 2001 - 19:57:16 CST
php-general Digest 15 Mar 2001 01:57:16 -0000 Issue 567
Topics (messages 43830 through 43945):
Tutorial for RegExpressions
43830 by: Martin Thoma
43833 by: Fredrik Wahlberg
43860 by: Nathan Cassano
Re: Day of Week??
43831 by: Tim McGuire
43832 by: Tim McGuire
43876 by: Christian Reiniger
Re: Getting name of the main file from external included sc ript..
43834 by: Aviv Revach
Script returns an image?
43835 by: Paul Warner
43840 by: Yasuo Ohgaki
43843 by: pablo
43848 by: Paul Warner
43878 by: Christian Reiniger
43882 by: Paul Warner
Re: CGI Question?
43836 by: John Huggins
Re: Linux/Apache/PHP & Windows/IIS/ColdFusion
43837 by: Michael Kimsal
43844 by: Joe Sheble (Wizaerd)
43857 by: Michael Kimsal
43904 by: John McCreesh
TAB = ENTER ????
43838 by: Marcel Henrique Scandolara - Wide
43839 by: Tim McGuire
43846 by: Yasuo Ohgaki
xml parsing
43841 by: Jon A
43858 by: Pavel Jartsev
variable on 2 forms
43842 by: Miguel Loureiro
43847 by: pablo
43851 by: Rudolf Visagie
simple I'm sure
43845 by: Keith
43850 by: Jack Dempsey
43853 by: Keith
Re: switch with multiple case
43849 by: Yasuo Ohgaki
Re: I want this magic directory
43852 by: Joe Stump
43877 by: Tim Ward
shared memory questions
43854 by: Monte Ohrt
bug or feature?
43855 by: indrek siitan
43859 by: Pavel Jartsev
Function, array - problem (probably easy to solve)
43856 by: Tobias Talltorp
Re: Problems with mail function
43861 by: Colin May
43866 by: stas
Re: [PHP-WIN] Print variables coming from a form not controled by me...
43862 by: Dream
sort in mysql
43863 by: McShen
43870 by: Jeff Oien
stopping readfile dumping file contents to apache's error_log on error?
43864 by: Seth Ladd
Re: foreach() faster than while()?
43865 by: Dennis Gearon
43869 by: Rick St Jean
values for extensive
43867 by: Marcel Henrique Scandolara - Wide
Re: Good Free PHP Editor?
43868 by: Dennis Gearon
43918 by: chris
43925 by: Mark Maggelet
image counter?
43871 by: Fai
43874 by: Jack Dempsey
43879 by: Jeff Oien
cannot use post
43872 by: Fabian Fabela
email a file from server
43873 by: Jerry Lake
43889 by: Jason Stechschulte
Re: Mysql Show SQL
43875 by: Christian Reiniger
Value
43880 by: Marcel Henrique Scandolara - Wide
Multiple rows returned ?. . .
43881 by: Mrvball008
43896 by: Chris Lee
basket logo replacement
43883 by: Mark Lo \(3\)
43887 by: Chris Lee
Have any body built the SWF & snmp extensions for Redhat 7.0?
43884 by: Mohammed Mahmoud Abdel'al
SSL Submission
43885 by: Toby Miller
Re: update two frames at once?
43886 by: Jeanne Pelletier
Re: update two frames at once?-Revised
43888 by: Jeanne Pelletier
[?] How to make many one line forms in a loop?
43890 by: John Voth
43895 by: Chris Lee
43915 by: John Voth
seminer
43891 by: ugur coskun
Using php to get javascript varibles
43892 by: Morten Hansen
43894 by: Johnson, Kirk
Getting string's content between two tags..
43893 by: Aviv Revach
Re: IMAP sort help.
43897 by: Chris Lee
prompts
43898 by: Gary
43903 by: Leavell Digital Design
software localization with PHP
43899 by: Tao
43900 by: Tao
43902 by: Leavell Digital Design
43916 by: Maciek Uhlig
Re: tutorials on good database design
43901 by: Angerer, Chad
get content type from fopening url?
43905 by: Noah Spitzer-Williams
select * from nmensagem m, nusuario...
43906 by: Augusto Cesar Castoldi
adding to functionality of mysql_fetch_field
43907 by: Dennis Gearon
43909 by: Mark Maggelet
Re: PHP and Oracle Zombie processes
43908 by: Rouvas Stathis
apache authentication
43910 by: Michael A. Peters
Re: [Q] session variables wouldn't keep contents.
43911 by: Johnson, Kirk
header type for flash
43912 by: Pierre-Yves Lemaire
PHP saving forms on client side
43913 by: mat t
43921 by: Andrew Halliday
e-mail varification problems.
43914 by: Kenneth R Zink II
my page is in the error log
43917 by: Aaron Tuller
exist?
43919 by: Kenneth R Zink II
43920 by: Simon Garner
43922 by: Keith Vance
Header Help!
43923 by: Chris
Executing a string with both html and php inside it..
43924 by: Aviv Revach
43927 by: Andrew Hill
How upload files to protected directories?
43926 by: Mig
43935 by: Keith Vance
Help! Cookies...
43928 by: Jack Sasportas
Parse all .htm files?
43929 by: Jorge Alvarez
Sessions, no cookies, enable-trans-sids, no success
43930 by: Eric Nielsen
43940 by: Johnson, Kirk
XML compile with PHP
43931 by: Herman Tolentino
Array help
43932 by: Chris
43943 by: David Robley
43944 by: James Atkinson
Help please
43933 by: Peter Houchin
43938 by: David Robley
Anyone running their own Servers & DNS versus renting space/services from an ISP or Hosting??
43934 by: Andre Bajew
43937 by: Jason Murray
43942 by: Andre Bajew
How do you keep your scripts secure?
43936 by: Murph
43941 by: Jack Dempsey
NEWBEE - How do I preload 25< gifs?
43939 by: Lars Falsig
JavaDoc?
43945 by: Jonathan Sharp
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Hi !
Does someone know a good tutorial für regula-expression, like they are
used in ereg and preg ?
Martin
attached mail follows:
I must recommend the book ”Mastering Regular Expressions” from O'Reilly.
It is one of the best programming books I have ever read.
/Fredrik
>>>>>>>>>>>>>>>>>> Ursprungligt meddelande <<<<<<<<<<<<<<<<<<
Martin Thoma <martin
radiok2r.de> skrev 2001-03-14, kl. 15:12:05 angående
ämnet [PHP] Tutorial for RegExpressions:
> Hi !
> Does someone know a good tutorial für regula-expression, like they are
> used in ereg and preg ?
> Martin
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Learning to Use Regular Expressions by Example
http://www.phpbuilder.com/columns/dario19990616.php3
-----Original Message-----
From: Martin Thoma [mailto:martin
radiok2r.de]
Sent: Wednesday, March 14, 2001 6:12 AM
To: php-general
lists.php.net
Subject: [PHP] Tutorial for RegExpressions
Hi !
Does someone know a good tutorial für regula-expression, like they are
used in ereg and preg ?
Martin
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
from manual at www.php.net:
$today = getdate(); $weekday = $today[weekday]; echo $weekday;
if it is another date
$thedate = getdate(mktime (0,0,0,(0,0,0,1,1,1998)); $weekday = $thedate[weekday]; echo $weekday;
Tim
>>> Bruno Freire <bruno
fujinor.com.br> 03/14/01 07:53AM >>>
Hi It's me again!
Bruno.......From Brazil.......
Hi wanna know How can i take the day of week of aany date...
Example:
How to know that 14 of march of 2001 is a Wednesday??
Thanks... Bruno.
attached mail follows:
Sorry There was a typo in last post: SHOULD BE: from manual at www.php.net:
$today = getdate(); $weekday = $today[weekday]; echo $weekday;
if it is another date
$thedate = getdate(mktime (0,0,0,1,1,1998)); $weekday = $thedate[weekday]; echo $weekday;
Tim
>>> "Tim McGuire" <tim.mcguire
dnr.state.mn.us> 03/14/01 08:10AM >>>
from manual at www.php.net:
$today = getdate(); $weekday = $today[weekday]; echo $weekday;
if it is another date
$thedate = getdate(mktime (0,0,0,(0,0,0,1,1,1998)); $weekday = $thedate[weekday]; echo $weekday;
Tim
>>> Bruno Freire <bruno
fujinor.com.br> 03/14/01 07:53AM >>>
Hi It's me again!
Bruno.......From Brazil.......
Hi wanna know How can i take the day of week of aany date...
Example:
How to know that 14 of march of 2001 is a Wednesday??
Thanks... Bruno.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On Wednesday 14 March 2001 14:53, you wrote: > Hi It's me again! > Bruno.......From Brazil....... > > Hi wanna know How can i take the day of week of aany date...
Have you tried reading the manual?
-- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/)CPU not found. retry, abort, ignore?
attached mail follows:
Hey!
I already tried many ways. I also tried using $PHP_SELF. It returned the included script and not the main script (I echo'ed it to screen in order to be sure). The main file(main.php3) has an inclusion similar to the next one: <?php include("http://$SERVER_NAME/scripts/ext.php3?LayoutDir=/layout/&LayoutNum=1"); ?>
What do you offer me to do?
Thank you in advance -
Aviv Revach
At 16:53 13/03/01 -0700, Johnson, Kirk wrote:
>Aviv, I'm not quite sure what you are asking. If you are just doing an
>include() or a require() on a chunk of code, then I think the usual server
>variables will give you the path of the main file, e.g. $PHP_SELF. If you
>are doing a *redirect* to a *different page*, then you could look at
>$HTTP_REFERER, or pass the main page name as a GET attached to the URL.
>
>Hope this helps.
>
>Kirk
>
>-----Original Message-----
>From: Aviv Revach [mailto:aviv_r
brillianet.com]
>Sent: Monday, March 12, 2001 4:15 PM
>To: php-general
lists.php.net
>Subject: [PHP] Getting name of the main file from external included
>script..
>
>
>Hey!
>
>I already asked this once before, but nobody seems to answer. That's why
>I'm re-writing
>my question.
>
> I have a main file named: "main.php3"
> It includes an external php3 script named: "ext.php3"
>
>Inside of the 'ext.php3' script - I need to know the full path
>of the file which included it (in this case -
>'http://www......./dir1/dir2/main.php3').
>How could I do that?
>
>
>Thank you in advance -
>
> Aviv Revach
>
> BRILLIANeT Website -
> http://www.brillianet.com/
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
XOR-Coders Mega Programming Resource Site! - http://members.xoom.com/xorcoders/
attached mail follows:
I am trying to make a call from one page (pure HTML) that would include a tag as follows:
<img src=http://mydomain.com/returnimage.php?var1=value1&var2=value2 width="100" height="50" alt="Description">
My question is how to get the php script to return the proper headers as well as the image to the client. This will be used for tracking when certain copyrighted images (actually blueprints) are accessed, and by whom by making some db entries when called, then returning the image. The image is static and is not dynamically generated based on any of the values in the uri. So far all I get are broken images. I'm guessing that it has to do with the headers...
-- P
attached mail follows:
Did you read this page? http://www.php.net/manual/en/features.images.php
What is your php code looks like? if you read this page already.
Yasuo Ohgaki ========================= My favorite links [RFC] http://www.faqs.org/rfcs/ [W3C] http://www.w3.org/ [PHP Manual] http://www.php.net/manual/en/
----- Original Message -----
From: "Paul Warner" <pwarner
winners-circle.com>
To: <php-general
lists.php.net>
Sent: Wednesday, March 14, 2001 11:24 PM
Subject: [PHP] Script returns an image?
> I am trying to make a call from one page (pure HTML) that would include a
> tag as follows:
>
> <img src=http://mydomain.com/returnimage.php?var1=value1&var2=value2
> width="100" height="50" alt="Description">
>
> My question is how to get the php script to return the proper headers as
> well as the image to the client. This will be used for tracking when
> certain copyrighted images (actually blueprints) are accessed, and by whom
> by making some db entries when called, then returning the image. The image
> is static and is not dynamically generated based on any of the values in the
> uri. So far all I get are broken images. I'm guessing that it has to do
> with the headers...
>
> -- P
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Return document , other than HTML is very simple. The type of the document is contained in the http content-type header. You can easly set it by the header function. header("Content-type: application/x-www-urlform-encoded");
Pablo
pablo
e-nov.com
> Yasuo Ohgaki
> =========================
> My favorite links
> [RFC] http://www.faqs.org/rfcs/ [W3C] http://www.w3.org/
> [PHP Manual] http://www.php.net/manual/en/
>
>
> ----- Original Message -----
> From: "Paul Warner" <pwarner
winners-circle.com>
> To: <php-general
lists.php.net>
> Sent: Wednesday, March 14, 2001 11:24 PM
> Subject: [PHP] Script returns an image?
>
>
> > I am trying to make a call from one page (pure HTML) that would include
a
> > tag as follows:
> >
> > <img src=http://mydomain.com/returnimage.php?var1=value1&var2=value2
> > width="100" height="50" alt="Description">
> >
> > My question is how to get the php script to return the proper headers as
> > well as the image to the client. This will be used for tracking when
> > certain copyrighted images (actually blueprints) are accessed, and by
whom
> > by making some db entries when called, then returning the image. The
image
> > is static and is not dynamically generated based on any of the values in
the
> > uri. So far all I get are broken images. I'm guessing that it has to
do
> > with the headers...
> >
> > -- P
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
I have been over that page, but did not know that it applied since I do not want to modify an image, simply pass it on to the requestor. Here;s my relevant code:
<?php
...database stuff...
Header("Content-type: image/jpg"); ?> <img src="image.jpg" width="100" height="50" alt="Description">
Do I need to use something more like:
<?php
...database stuff...
Header("Content-type: image/jpg"); $im = imageCreateFromJpg("image.jpg"); ImageJpg($im); ImageDestroy($im); ?>
----- Original Message -----
From: "Yasuo Ohgaki" <yohgaki
hotmail.com>
Subject: Re: [PHP] Script returns an image?
> Did you read this page?
> http://www.php.net/manual/en/features.images.php
>
> What is your php code looks like? if you read this page already.
>
> Yasuo Ohgaki
>
> ----- Original Message -----
> From: "Paul Warner" <pwarner
winners-circle.com>
> Subject: [PHP] Script returns an image?
>
>
> > I am trying to make a call from one page (pure HTML) that would include
a
> > tag as follows:
> >
> > <img src=http://mydomain.com/returnimage.php?var1=value1&var2=value2
> > width="100" height="50" alt="Description">
> >
> > My question is how to get the php script to return the proper headers as
> > well as the image to the client. This will be used for tracking when
> > certain copyrighted images (actually blueprints) are accessed, and by
whom
> > by making some db entries when called, then returning the image. The
image
> > is static and is not dynamically generated based on any of the values in
the
> > uri. So far all I get are broken images. I'm guessing that it has to
do
> > with the headers...
> >
> > -- P
attached mail follows:
On Wednesday 14 March 2001 16:04, you wrote: > I have been over that page, but did not know that it applied since I do > not want to modify an image, simply pass it on to the requestor. > Here;s my relevant code: > > <?php > > ...database stuff... > > Header("Content-type: image/jpg");
You tell the browser that you send an image...
> ?> > <img src="image.jpg" width="100" height="50" alt="Description">
and then send HTML code instead.
do a <?php readfile ("image.jpg"); ?> instead of the <img> tag
-- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/)CPU not found. retry, abort, ignore?
attached mail follows:
Thanks, I knew I didn't want to create or modify an image, so the html seemed the only way to retrieve it...I guess I didn't know I could retrieve a binary file in this manner.
-- P
----- Original Message -----
From: "Christian Reiniger" <creinig
mayn.de>
Subject: Re: [PHP] Script returns an image?
> On Wednesday 14 March 2001 16:04, you wrote: > > I have been over that page, but did not know that it applied since I do > > not want to modify an image, simply pass it on to the requestor. > > Here;s my relevant code: > > > > <?php > > > > ...database stuff... > > > > Header("Content-type: image/jpg"); > > You tell the browser that you send an image... > > > ?> > > <img src="image.jpg" width="100" height="50" alt="Description"> > > and then send HTML code instead. > > do a <?php readfile ("image.jpg"); ?> instead of the <img> tag > > > -- > Christian Reiniger > LGDC Webmaster (http://sunsite.dk/lgdc/)
attached mail follows:
This has been true since CGI began in the NSCA days. Any program that can take input from STDIN and output to STDOUT works as a CGI program. Languages I have actually used in the CGI bin include, C, C++, AWK, Sh, PHP and of course Perl.
The C program simply has to deal with the CGI variables coming in on STDIN. There are probably many C libraries available to help parse this out into an array or something.
This is actually a very good method if you want the fastest speed possible form a web application. Compile the C program statically for the best speed.
John
> -----Original Message-----
> From: Dan Pupek [mailto:megabyte
sunnet.net]
> Sent: Wednesday, March 14, 2001 7:40 AM
> To: php-general
lists.php.net
> Subject: [PHP] CGI Question?
>
>
> On the latest version of Apache I have heard you can run Compiled
> C binaries
> from the CGI bin. Is this true? If so how does it work?
>
> --
> Dan Pupek
>
> On the Web:
> http://www.sunnet.net/dnkp/dan
>
> Email:
> megabyte
sunnet.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
What they've got now is completely fine - why necessarily change it?
OK OK - I know many of the reasons why, but moving to another platform, you will most likely 'lose' that 'advanced authentication'. Oooooohhhh.
To gain the flexibility and stability of PHP on Linux/Apache, everyone in the company will have to learn to remember their name and password. If management thinks that's too difficult for people (a distinct possibilty, especially if you have thousands of people) you'll be better off staying where you are. You could go CGI PHP on NT, which might be a compromise, but you lose the raw speed advantage PHP as an Apache module has.
What about security on a machine? Last intranet I was at in a large company, just because we were logged into the network on a machine didn't give us automatic access to the intranet - people moved around too much. You still needed to present your name and password for the intranet - and everything there was NT/IIS/ASP and ColdFusion.
"Joe Sheble (Wizaerd)" wrote:
> Currently in-house our intranet is made up of Windows NT, IIS, and > ColdFusion. We've also settled on MS IE as our standard browser, and use > advanced authentication for logging into the intranet. This provides > employees with one click access to the intranet without having to manually > and physically login. > > We've been tossing around the idea of switching our Intranet to Linux, > Apache and PHP but we would then lose that Advanced Atuthentication > process, no? And to even complicate it even a bit more, if accessing the > intranet internally through the network (a combination of Novell and NT) > nobody should be forced to login (it being an automatic process) but if > they access the intranet externally though the internet they have to be > prompted for their normal network login information. > > Are my managers smoking crack, or do the advanced developers here think > this is do-able? And if so, where could I find more information on setting > this all up?
attached mail follows:
At 09:36 AM 3/14/01 -0500, Michael Kimsal wrote: >What they've got now is completely fine - why necessarily change it?
As you've stated, there are many reasons why changing would be a good thing, but mostly it's a manager (a higher up executive level mucky-muck) throwing out 'Hey what about this linux thingie..." and our IT Director (whom I often refer to as FDH for f*ckin d*ck head) saying we'll get right on it...
>OK OK - I know many of the reasons why, but moving to another platform, >you will most likely 'lose' that 'advanced authentication'. Oooooohhhh. > >To gain the flexibility and stability of PHP on Linux/Apache, everyone in >the company will have to learn to remember their name and password. >If management thinks that's too difficult for people (a distinct possibilty, >especially if you have thousands of people) you'll be better off staying where >you >are. You could go CGI PHP on NT, which might be a compromise, >but you lose the raw speed advantage PHP as an Apache module has.
Yes, the company has deemed this to be too difficult for our employees to remember.
>What about security on a machine? Last intranet I was at in a large company, >just because we were logged into the network on a machine didn't give us >automatic access to the intranet - people moved around too much. You still >needed to present your name and password for the intranet - and everything >there >was NT/IIS/ASP and ColdFusion.
Nope, there is no other security other than the Advanced Authentication. The security is not tied to any specific machine but a network login. So as soon as they login to any machine, their username and password is automatically passed to the browser and the advanced authentication takes place. Now this if they access the intranet internally through our network. There is also a basic authentication piece to access the intranet externally through the internet but requires a domain name, username and password. The management feels this is acceptable because there are very few (VERY few) people accessing the intranet this way.
>"Joe Sheble (Wizaerd)" wrote: > > > Currently in-house our intranet is made up of Windows NT, IIS, and > > ColdFusion. We've also settled on MS IE as our standard browser, and use > > advanced authentication for logging into the intranet. This provides > > employees with one click access to the intranet without having to manually > > and physically login. > > > > We've been tossing around the idea of switching our Intranet to Linux, > > Apache and PHP but we would then lose that Advanced Atuthentication > > process, no? And to even complicate it even a bit more, if accessing the > > intranet internally through the network (a combination of Novell and NT) > > nobody should be forced to login (it being an automatic process) but if > > they access the intranet externally though the internet they have to be > > prompted for their normal network login information. > > > > Are my managers smoking crack, or do the advanced developers here think > > this is do-able? And if so, where could I find more information on setting > > this all up?
attached mail follows:
"Joe Sheble (Wizaerd)" wrote:
> At 09:36 AM 3/14/01 -0500, Michael Kimsal wrote: > >What they've got now is completely fine - why necessarily change it? > > As you've stated, there are many reasons why changing would be a good > thing, but mostly it's a manager (a higher up executive level mucky-muck) > throwing out 'Hey what about this linux thingie..." and our IT Director > (whom I often refer to as FDH for f*ckin d*ck head) saying we'll get right > on it... >
You might want be careful about posting some of that stuff on a public board, unless you're using an alias.
> > >are. You could go CGI PHP on NT, which might be a compromise, > >but you lose the raw speed advantage PHP as an Apache module has. > > Yes, the company has deemed this to be too difficult for our employees to > remember. > > >What about security on a machine? Last intranet I was at in a large company, > >just because we were logged into the network on a machine didn't give us > >automatic access to the intranet - people moved around too much. You still > >needed to present your name and password for the intranet - and everything > >there > >was NT/IIS/ASP and ColdFusion. > > Nope, there is no other security other than the Advanced > Authentication. The security is not tied to any specific machine but a > network login. So as soon as they login to any machine, their username and > password is automatically passed to the browser and the advanced > authentication takes place. Now this if they access the intranet > internally through our network. There is also a basic authentication piece > to access the intranet externally through the internet but requires a > domain name, username and password. The management feels this is > acceptable because there are very few (VERY few) people accessing the > intranet this way.
I'd be one of those very few if I had to remember by domain as well to log in - I'd think this is more of a security risk from prying eyes. Not only might someone
get my name/password by watching me, but they have a chance at learning just a bit more about the internal organization of our network (a domain name). Sheesh!
"You are too stupid to be expected to remember a name and password in the building,
but you need that PLUS the domain to connect from outside". That seems a DISCOURAGEMENT from using the bloody tool, rather than an encouragement!
I'd still point out that the advanced authentication thing is a security risk if people walk away from their machines, unless everyone ALWAYS logs off, even just to pop to the kitchen for 5 minutes. If they can't expect people to remember a separate name/password (or to type it twice) they surely can't expect people to log off everytime they're not physically at a machine.
Anyway, that's a bit off topic.
You're asking if this can be done with Linux? Probably not, unless you got into some strange Samba stuff, which I don't think is capable of doing all that stuff (someone more familiar with samba please jump in at this point and correct me!)
attached mail follows:
In article <3AAF9019.7400132C
tapinternet.com>, "Michael Kimsal"
<michael
tapinternet.com> wrote:
[snip] > You're asking if this can be done with Linux? Probably not, unless you > got into some > strange Samba stuff, which I don't think is capable of doing all that > stuff (someone > more familiar with samba please jump in at this point and correct me!) [snip]
There was a mod_ntlm under development for Apache which would be the first step in solving your security problem - I think it relied on SAMBA - but last time I looked (on SourceForge?) it was at a very early stage of development and didn't seem to be getting anywhere.
John
attached mail follows:
Please,
As I make to make keyboard key <ENTER> to function equal keyboard key <TAB>
Thanks
Marcel Henrique from Brazil
attached mail follows:
Check out http://developer.irt.org/script/471.htm
it is a document titled "How can I simulate the tab key when the enter key is pressed?"
>>> Marcel Henrique Scandolara - Wide <marcelsc
wide.com.br> 03/14/01 08:38AM >>>
Please,
As I make to make keyboard key <ENTER> to function equal keyboard key <TAB>
Thanks
Marcel Henrique from Brazil
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> Please, > > As I make to make keyboard key <ENTER> to function equal keyboard key > <TAB> > > Thanks >
Assuming you are talking about page that is displayed on user's browser. You cannot use PHP to do that, PHP simple does not have control. However, you can catch key pressed event (onkeydown) using JavaScript. For example, if you can submit form when tab is pressed, you can write JavaScript to do that.
Regards,
Yasuo Ohgaki
attached mail follows:
please help me...
I'm working with some simple xml parsing.
in my xml document i have a tag like this: <billede img="theme/bg.gif"></billede> which holds the path of a picture.
in the xml parser i'm trying to output it as an <img src=""> tag, but nothing seems to work.
some of the things i have tried:
case "BILLEDE": print "<img src=\"$element_attrs['IMG']\">"; break;
- this will output an error message: warning, expecting T_STRING, T_VARIABLE ETC...
case "BILLEDE": print "<img src=\"{$element_attrs['IMG']}\">"; break;
- this will let it parse, but it won't do anything with the html.
can somebody help me??
attached mail follows:
Jon A wrote: > > ... > > print "<img src=\"$element_attrs['IMG']\">"; > break; > > ... > print "<img src=\"{$element_attrs['IMG']}\">"; > break; > > - this will let it parse, but it won't do anything with the html. > > can somebody help me?? >
Try this: print '<img src="'.$element_attrs['IMG'].'">';
-- Pavel a.k.a. Papi
attached mail follows:
Hello all,
I have a normal form (form1) with a variable (var1) and a form inside a layer (form2) with a variable (var2).
After submit (form1), how can I have access to var2 ? (if I must use javascript should use: document.layer.var2 or document.form2.var2 or document.layer.form2.var2 .......???).I try to read directly $var2, but without result....
T.Y all
Best Regards
Miguel Loureiro <m.loureiro
distrim2.pt >
attached mail follows:
I think you'll need to use javascript. put a input with the type "hidden" in the first form with no value. Call a javascript function on the submit button or image action. This javascript must set the hidden input in form1 with the var2 value before submiting the form to the script. the object structure for the forms in javascript is : document.forms[].elements[].value
Good luck.
Pablo
pablo
e-nov.com
----- Original Message -----
From: Miguel Loureiro <m.loureiro
distrim2.pt>
To: php-gen <php-general
lists.php.net>
Sent: Wednesday, March 14, 2001 3:58 PM
Subject: [PHP] variable on 2 forms
Hello all,
I have a normal form (form1) with a variable (var1) and a form inside a
layer (form2) with a variable (var2).
After submit (form1), how can I have access to var2 ? (if I must use
javascript should use: document.layer.var2 or document.form2.var2 or
document.layer.form2.var2 .......???).I try to read directly $var2, but
without result....
T.Y all
Best Regards
Miguel Loureiro <m.loureiro
distrim2.pt >
attached mail follows:
I don't know if this fixes your problem but this worked for me. Define a Javascript function:
function PassRequest(what) { document.fields_frm.p_request.value=what }
and then in the form you could perhaps have:
<td valign="top"> <input type="hidden" name="p_request"> <input type="image" src="images/insert.jpg" width="53" border=0 alt="Insert" onClick="PassRequest('Insert')"> </td>
When the user clicks on the insert button it passes 'Insert' in $p_request.
Rudolf Visagie
rudolf
qedi.co.za
-----Original Message-----
From: pablo [mailto:pablo
e-nov.com]
Sent: 14 March 2001 04:58
To: Miguel Loureiro; php-gen
Subject: Re: [PHP] variable on 2 forms
I think you'll need to use javascript. put a input with the type "hidden" in the first form with no value. Call a javascript function on the submit button or image action. This javascript must set the hidden input in form1 with the var2 value before submiting the form to the script. the object structure for the forms in javascript is : document.forms[].elements[].value
Good luck.
Pablo
pablo
e-nov.com
----- Original Message -----
From: Miguel Loureiro <m.loureiro
distrim2.pt>
To: php-gen <php-general
lists.php.net>
Sent: Wednesday, March 14, 2001 3:58 PM
Subject: [PHP] variable on 2 forms
Hello all,
I have a normal form (form1) with a variable (var1) and a form inside a
layer (form2) with a variable (var2).
After submit (form1), how can I have access to var2 ? (if I must use
javascript should use: document.layer.var2 or document.form2.var2 or
document.layer.form2.var2 .......???).I try to read directly $var2, but
without result....
T.Y all
Best Regards
Miguel Loureiro <m.loureiro
distrim2.pt >
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Following loop works fine ! but I don't want $art_nr_1 (which is 4564) I want to have $art_nr_$i but if you use it you just get 1,2,3,4
for ($i=1; $i<50; $i++) : $varid = "quant".$i ; if ($$varid != "") { echo " <input type=hidden name=\"art_nr\" value=\"$art_nr_1\"> <input type=hidden name=\"quantity\" value=\"$quant1\"> ";
} endfor;
attached mail follows:
try this...didn't test it, but i think it'll do the trick:
for($i=1;$i<50;$i++){ $varid = "quant".$i; if($$varid != ""){ echo '<input type=hidden name="art_nr" value="'; echo $art_nr . $i; echo '">'; echo '<input type=hidden name="quantity" value="'; echo $quant . $i; echo '">'; } }
jack
Keith wrote:
>
> Following loop works fine !
> but I don't want $art_nr_1 (which is 4564)
> I want to have $art_nr_$i
> but if you use it you just get 1,2,3,4
>
> for ($i=1; $i<50; $i++) :
> $varid = "quant".$i ;
> if ($$varid != "") {
> echo
> "
> <input type=hidden name=\"art_nr\" value=\"$art_nr_1\">
> <input type=hidden name=\"quantity\" value=\"$quant1\"> ";
>
> }
> endfor;
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
It's bizarre it should work but I get back just 1, 2 or 3 Although with this just to test <input type=\"hidden\" name=\"test\" value=\"$art_nr_1\"> it works fine and i get back <input type="hidden" name="test" value="124478">
And really weird it this version for ($i=1; $i<50; $i++) : $quantid = "quant".$i ; if ($$quantid != "") { $artid = "art_nr_".$i; echo " <input type=\"hidden\" name=\"artnr_$i\" value=\"$$artid\"> <input type=\"hidden\" name=\"quant_$i\" value=\"$$quantid\"> <input type=\"hidden\" name=\"test\" value=\"$art_nr_1\"> "; } endfor; which gives me back <input type="hidden" name="artnr_1" value="$art_nr_1"> <input type="hidden" name="quant_1" value="$quant1">
I can't spot the problem at all ?
At 10:19 14/03/01 -0500, Jack Dempsey wrote:
>try this...didn't test it, but i think it'll do the trick:
>
>for($i=1;$i<50;$i++){
> $varid = "quant".$i;
> if($$varid != ""){
> echo '<input type=hidden name="art_nr" value="';
> echo $art_nr_ . $i;
> echo '">';
> echo '<input type=hidden name="quantity" value="';
> echo $quant . $i;
> echo '">';
> }
>}
>
>jack
>
>Keith wrote:
> >
> > Following loop works fine !
> > but I don't want $art_nr_1 (which is 4564)
> > I want to have $art_nr_$i
> > but if you use it you just get 1,2,3,4
> >
> > for ($i=1; $i<50; $i++) :
> > $varid = "quant".$i ;
> > if ($$varid != "") {
> > echo
> > "
> > <input type=hidden name=\"art_nr\" value=\"$art_nr_1\">
> > <input type=hidden name=\"quantity\" value=\"$quant1\"> ";
> >
> > }
> > endfor;
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> In ASP, you can have something like: > > <snip> > <% > select case something > case "this" do that > case "those","them" do other > case "crap","doesn't matter","whatever" do nothing > case else print error > end select > %> > </snip> > > IN PHP you can't do cases like that, because like in C, u must have a > constant, not a list of them. > Is there anyway to get pass this? Doing a case for each thing even tough it > does the exact same thing as 10 others is going to get a little stupid code. > ____________________________
Is this what you want?
<?php switch ($val) { case 'this': // do that break; case 'those': case 'them': // do that break; case 'crap': case 'doesnt matter': case 'whatever': break; // do nothing default: print('error'); break; } ?>
BTW, this works C/C++.
Regards,
Yasuo Ohgaki
attached mail follows:
Read up on forcetype'ing on phpbuilder.com - it will do just what you want it to do.
--Joe
On Wed, Mar 14, 2001 at 06:08:18PM +0800, Alex wrote:
> I just want every customer on my site get his own unique id as his directory
> name but the pages requested are all processed by the root.
> Such as: customer1's url is http://www.mysite.com/2000123/
> customer2's url is http://www.mysite.com/2000124/
> ^^^^^^^UID
> and the pages requested are actually processed by http://www.mysite.com/
>
> I want it to implement security and personalization. I don't want to use
> .php?uid=XXX because of lazy. :)
> thanks.
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
--------------------------------------------------------------------------------- Joe Stump, PHP Hacker, joestump98
yahoo.com -o) http://www.geekshare.com http://www.care2.com http://www.miester.org /\\ "Those who can, create. Those who can't, complain." _\_V -------------------------------------------------------------------------------
attached mail follows:
You'll need to do your log in on the root and then redirect depending on what username they are are logged on as. You can use cookies to set the initial user name value in your log in screen but that's as far as you can go if you want any level of security.
once you have a validated username (which you can hold in a session) you can build urls, etc. using it e.g. echo("<a href=$username/nextpage.php>Next Page</a>").
Tim Ward Senior Systems Engineer
Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html
> -----Original Message-----
> From: Alex [mailto:internalthinking
yahoo.com]
> Sent: 14 March 2001 10:08
> To: php-general
lists.php.net
> Subject: I want this magic directory
>
>
> I just want every customer on my site get his own unique id
> as his directory
> name but the pages requested are all processed by the root.
> Such as: customer1's url is http://www.mysite.com/2000123/
> customer2's url is http://www.mysite.com/2000124/
> ^^^^^^^UID
> and the pages requested are actually processed by
> http://www.mysite.com/
>
> I want it to implement security and personalization. I don't
> want to use
> .php?uid=XXX because of lazy. :)
> thanks.
>
>
>
>
>
>
>
attached mail follows:
Hi,
I have a situation where I'd like to store some data in shared memory as opposed to repetitive database requests. Basically, I'd read in a (small) database table and serialize the results into shared mem. I've read through the semaphore and shared memory documentation, but some things are left unclear.
1) which is better to use, the shm_* sem_*, or the shmop functions? It looks like shmop may be easier to use and more efficient.
2) How do I test if a shared memory segment exists, and create one if it doesn't? Here's a bit of psuedo code I'd like to emulate:
if ( shared mem exists ) { open shared mem read data from shared mem close shared mem unserialize data } else { do sql query serialize data open new shared mem (size of serialized data?) write data close shared mem }
3) What size should the opened shared mem size be? shm_* mentions that the values are serialized implicitly. Does shmop do this, or does this need to be serialized first in the PHP code?
4) How do I know what to use for the system id for the memory segment? What is a "safe" value to use? Is there a valid range? Are there some ranges I should stay away from?
5) Is there a way to tell the age of a shared memory segment, or must I do this within the data that is stored?
6) Are there any good examples of usage out there? The one that comes with shmop doesn't show a way to test if the shared memory segment exists before trying to create a new one (and how do I open an existing shared mem segment, not necessarily knowing its size?)
I'm using Sparc Solaris 2.8, if that makes a difference.
Thanks!
-- Monte Ohrt <monteispi.net> http://www.ispi.net/
attached mail follows:
Hi,
<? $value=0; if ($value=="NULL") echo "Value is NULL!"; else echo "Value is not null."; ?>
output: Value is NULL!
is it a bug or expected behaviour? tested it on 4.0.4pl1. i got around it by using strcasecmp(), but just wondering. :)
Rgds, Tfr
--==< tfr
cafe.ee >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==--
attached mail follows:
indrek siitan wrote: > > Hi, > > <? > $value=0; > if ($value=="NULL") > echo "Value is NULL!"; > else > echo "Value is not null."; > ?> > > output: Value is NULL! > > is it a bug or expected behaviour? tested it on 4.0.4pl1. > i got around it by using strcasecmp(), but just wondering. :) >
It's expected behaviour, i think. 'cause $value is integer, "NULL" is string and compare will convert "NULL" into integer. If condition is ($value==="NULL"), then output will be "Value is not null.".
RTFM ;-)
-- Pavel a.k.a. Papi
attached mail follows:
I am constructing a function for retrieving records from a mysql database and putting them into an array called $print_field[name][number].
My problem is that I only seem to get the first two records and I think I know where the problem is, but I can´t seem to be able to solve it.
Any ideas anyone?
<? function print_query_array($query, $fields) { global $print_field; global $linkid;
// Determine what fields are selected $field = explode("|",$fields);
$mysql_res = mysql_query($query,$linkid);
while ($strow = mysql_fetch_array($mysql_res))
$print_field[$field[0]][] = $strow[$field[0]]; // Problem $print_field[$field[1]][] = $strow[$field[1]]; // Problem } }
print_query_array("SELECT field1, field2 FROM table LIMIT 10", "field1|field2");
for ($i=0; $i<sizeof($print_field); $i++)
echo $print_field["field1"][$i]."<br>"; echo $print_field["field2"][$i]."<br>"; } ?>
Thanks, // Tobias
attached mail follows:
Quoting Kike (Wed, Mar 14, 2001 at 11:59:32AM -0000) > Hi, > I have a seious problem with the mail function. It does not send the emails. > It returns 1 but does not send them. I think it may be a problem with > sendmail permissions. Can you help me? Please.
What do the sendmail mail logs say? if you havent got access to them, ask someone who has?
--Colin May | "its an illusion, its a game, a reflection of mailto:rael
wibble.org.uk | someone elses name" - abacab, genesis http://www.wibble.org.uk | http://www.abacab.org.uk
attached mail follows:
I have the same problem. Mail function works fine on my NT development box, but when I transfer files over to Unix, it doesn't, as if mail goes into the void. The only setting you need on Unix is the sendmail path, no? SMTP and sendmail_from are not required and are ignored, is that correct?
stas
----- Original Message -----
From: "Colin May" <rael
wibble.org.uk>
To: "Kike" <kike
bytenet.es>
Cc: <php-general
lists.php.net>
Sent: Wednesday, March 14, 2001 11:01 AM
Subject: Re: [PHP] Problems with mail function
> > Quoting Kike (Wed, Mar 14, 2001 at 11:59:32AM -0000) > > Hi, > > I have a seious problem with the mail function. It does not send the emails. > > It returns 1 but does not send them. I think it may be a problem with > > sendmail permissions. Can you help me? Please. > > What do the sendmail mail logs say? if you havent got access to them, ask > someone who has?
attached mail follows:
Hi Michael,
Alos, when I run the page, it give me a parse error in line 22, that is:
while ( list ( $key, $val ) = each ( $HTTP_GET_VARS ) )
Any idea?
Here's the complete page
<html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head>
<body bgcolor="#FFFFFF" text="#000000"> <? function DumpHttpGetVars() { global $HTTP_GET_VARS;
if( $HTTP_GET_VARS ) { reset ( $HTTP_GET_VARS ); while ( list ( $key, $val ) = each ( $HTTP_GET_VARS ) ) { echo "$key => $val<br>\n"; if ( "array" == GetType( $val ) ) { while ( list ( $key_child, $val_child ) = each $HTTP_GET_VARS ) ) { echo "|--> $key => $val<br>\n"; } } } } }
?> <p> <? echo $SERVER_ADDR; ?> </p> <p> <? echo $REMOTE_ADDR; ?> </p> <p> <? echo $HTTP_USER_AGENT; ?> </p> </body> </html>
""Michael Rudel"" <mru
suchtreffer.de> escribió en el mensaje news:002001c0aba9$4fc50ab0$2c00a8c0
suchtreffer.de...
> // Dumps out all HTTP_GET_VARS:
> function DumpHttpGetVars()
> {
> global $HTTP_GET_VARS;
>
> if( $HTTP_GET_VARS )
> {
> reset ( $HTTP_GET_VARS );
> while ( list ( $key, $val ) = each ( $HTTP_GET_VARS ) )
> {
> echo "$key => $val<br>\n";
> if ( "array" == GetType( $val ) )
> {
> while ( list ( $key_child, $val_child ) = each
> $HTTP_GET_VARS ) )
> {
> echo "|--> $key => $val<br>\n";
> }
> }
> }
> }
> }
>
> So you just call the function 'DumpHttpGetVars()'
> and all of them will be printed out.
>
> Greetinx,
> Mike
>
> Michael Rudel
> - Web-Development, Systemadministration -
> _______________________________________________________________
>
> Suchtreffer AG
> Bleicherstraße 20
> D-78467 Konstanz
> Germany
> fon: +49-(0)7531-89207-17
> fax: +49-(0)7531-89207-13
> e-mail: mailto:mru
suchtreffer.de
> internet: http://www.suchtreffer.de
> _______________________________________________________________
>
>
>
> -----Original Message-----
> From: Tom Mathews [mailto:Tom.MATHEWS
st.com]
> Sent: Tuesday, March 13, 2001 10:38 AM
> Cc: PHP Windows lista
> Subject: Re: [PHP-WIN] Print variables coming from a form not controled
> by me...
>
>
> Anything in the querystring can be translated as a php variable.
>
> Say you have the string coming in as
> ...?result=1&age=23...
> then in the called page/script, the querystring are already variables.
> eg $result will have the value 1, $age will have the value 23...
>
> Hope this is what you're after
>
> Tom
> Dream wrote:
>
> > Any idea of how to get information from a form (not a form controlled by
> me,
> > through GET method, i.e. info coming with the URL, like this
> > http://www.xxx.com/xxx.cgi?result=1&age=23&name=john) and print it
> through
> > php v.3?
> >
> > I don't know how to get the info (coming from an outside form) and pass it
> > throught the php3 variables......
> >
> > Thanks,
> >
> > marc
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-windows-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-windows-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe
lists.php.net
> For additional commands, e-mail: php-windows-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
hi
I have a database with some urls and numbers. There are currently 2 records in the database. I wanna sort them by the numbers. How should i do it? my table is like
name hits john 343 scott 3423
any suggestions would be greatly appreciated!
attached mail follows:
ORDER BY hits
default is ascending (ASC). Otherwise
ORDER BY hits DESC
Jeff Oien
> hi
>
> I have a database with some urls and numbers. There are currently 2 records
> in the database. I wanna sort them by the numbers. How should i do it?
> my table is like
>
> name hits
> john 343
> scott 3423
>
> any suggestions would be greatly appreciated!
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hi,
I'm experiencing an odd situation. I am returning a large file back to a client w/ readfile(). If I cancel the stream before it is done, it will cause the PHP script to write the rest of the file's contents to Apache's error_log (creating quite a huge log file).
I'm afraid I don't understand how to control PHP's logging and error
reporting functions. I did place a
infront of the readfile() call, but
that didn't help. It also looks that it's not only readfile() that places
the contents of its stream into error_log. Other PHP scripts that generate
huge amounts of data, if canceled, also log their streams (text or binary)
to error_log.
How can I control this? I checked my php.ini file, but it didn't seem to give me any leads. Any hints or pointers would be greatly appreciated.
Thanks very much, Seth
Seth Ladd | Software Engineer, Product Development
Brivo Systems, Inc.
seth
brivo.com
Confidential and Proprietary, Brivo Systems, Inc.
attached mail follows:
I meant to write about this last week!
I see a LOT of examples on the PHP website, both by contributions and by the staff responsible for the manual, of using functions inside of loops to get a value that doesn't change, i.e. the end or beginning of an array.
A lot of code out there would speed up tremendously if the necessary value was stored in a temporary variable, which would then be used in the loop. Probably, using echo() or print() in a loop also slows things down, buffering into a variable first is much faster, I bet.
One thing I've taken to doing that is related to this, is any object method() that would normally have a printed output, I make two output functions, 'getValue()' and 'printValue()'. the getValue() buffers to a variable in the object and this can be used inline in another place thats buffering output. If I want it printed right away, the printValue() calls getValue().
And because I like readable web page HTML, I also have begun to start including an 'indention' argument to those functions, or sometimes an 'indention' attribute. At the beginning of the buffering and also following a '\n' in the HTML being buffered, I place the number of spaces to cause proper indention in the HTML output to make tables etc line up. It does make the files a little bigger, but it's lot's easier to see what's going on in the code. I suppose if I wanted to, I could make a global variable that said, 'INDENTION_ON/OFF' for production.
attached mail follows:
the print() stuff is minimal. You are just copying stuff to the buffer. If you were outputting to a file when your way is faster.
It has to do with the fact that in the while you keep leaving the array. and check the while, in the php layer.
In the foreach do the same thing just on the c layer. You save that bit of time because you do not have to go out to the php engine and parse again.
Rick
At 08:20 AM 3/14/01 -0800, Dennis Gearon wrote:
>I meant to write about this last week!
>
>I see a LOT of examples on the PHP website, both by contributions and by
>the staff responsible for the manual, of using functions inside of loops
>to get a value that doesn't change, i.e. the end or beginning of an
>array.
>
>A lot of code out there would speed up tremendously if the necessary
>value was stored in a temporary variable, which would then be used in
>the loop. Probably, using echo() or print() in a loop also slows things
>down, buffering into a variable first is much faster, I bet.
>
>One thing I've taken to doing that is related to this, is any object
>method() that would normally have a printed output, I make two output
>functions, 'getValue()' and 'printValue()'. the getValue() buffers to a
>variable in the object and this can be used inline in another place
>thats buffering output. If I want it printed right away, the
>printValue() calls getValue().
>
>And because I like readable web page HTML, I also have begun to start
>including an 'indention' argument to those functions, or sometimes an
>'indention' attribute. At the beginning of the buffering and also
>following a '\n' in the HTML being buffered, I place the number of
>spaces to cause proper indention in the HTML output to make tables etc
>line up. It does make the files a little bigger, but it's lot's easier
>to see what's going on in the code. I suppose if I wanted to, I could
>make a global variable that said, 'INDENTION_ON/OFF' for production.
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
##########################################################
# Rick St Jean,
# rstjean
internet.look.ca
# President of Design Shark,
# http://www.designshark.com/
# Quick Contact: http://www.designshark.com/messaging.ihtml
# Tel: 905-684-2952
##########################################################
attached mail follows:
As I could make a function to write values for extensive, example: It types 10 soon below appears (Ten)
Obliged for the attention
Marcel Henrique
attached mail follows:
>UltraEdit-32 does show the whole filename. I wonder what version u have...
The most recent download trial version, you'd think they'd make it LOOK as nice as the final one.
attached mail follows:
Do any of these editors support server mappings allowing one to auomatically preview files through a server? I find this invaluable in HomeSite (which is also VERY stable for me using Win2K) and I think HTMLKit does it too-- but do anyof the leaner text editors?
By server mappings I mean that I can map d:\inetpub\wwwroot\ to http://127.0.0.1/
so that when I hit the preview in browser button it automatically pulls the poages up through the server. A small thing, but I need it SO often...
c
attached mail follows:
editplus can do this.
On Wed, 14 Mar 2001 13:49:04 -0900 (AKST), chris
(chris
intranet.dist-ed.uaf.edu) wrote:
>Do any of these editors support server mappings allowing one to
>auomatically preview files through a server? I find this invaluable
>in
>HomeSite (which is also VERY stable for me using Win2K) and I think
>HTMLKit does it too-- but do anyof the leaner text editors?
>
>By server mappings I mean that I can map
>d:\inetpub\wwwroot\
>to
>http://127.0.0.1/
>
>so that when I hit the preview in browser button it automatically
>pulls
>the poages up through the server. A small thing, but I need it SO
>often...
>
>c
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-
>admin
lists.php.net
attached mail follows:
We always use 0-9 images to generate the image counter but this image counter contains more than one image. Does any body know how to combine these images as one? That is the final output of image counter is one image.
Thank you very much!
attached mail follows:
Fai wrote:
>
> We always use 0-9 images to generate the image counter but this image
> counter contains more than one image. Does any body know how to combine
> these images as one? That is the final output of image counter is one image.
>
> Thank you very much!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
if i understand you correctly, you want to combine a string of images into one? you should be able to do this with gd and PHP's image functions...check out www.php.net for info on the functions...
jack
attached mail follows:
I'm curious as to why you need to combine them. Wouldn't
it be easier just to display the images side by side?
Jeff Oien
> We always use 0-9 images to generate the image counter but this image
> counter contains more than one image. Does any body know how to combine
> these images as one? That is the final output of image counter is one image.
>
> Thank you very much!
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hello,
I think that this is off topic but may be you can help me.
I have just installed linux, apache, and php.
I have some programs (in php) running in a server when I try to run them in this new server I get the following error.
Method Not Allowed The requested method POST is not allowed for the URL /inicia.php
I think that this is because apache and not because php. Please help me what can I do?
Thank you
Fabian Fabela
fabian
vacagorda.com
www.vacagorda.com
attached mail follows:
Is there an easy way to email a file that resides on the server to a given email address ?
Jerry Lake - jerryl
europa.com
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com
attached mail follows:
On Wed, Mar 14, 2001 at 09:03:00AM -0800, Jerry Lake wrote: > Is there an easy way to email a file > that resides on the server to a given > email address ?
RTFM: http://www.php.net/manual/en/function.mail.php
-- Jason Stechschulte jpstechunoh.edu -- Of course, this being Perl, we could always take both approaches. :-) -- Larry Wall in <199709021744.KAA12428
wall.org>
attached mail follows:
On Wednesday 14 March 2001 14:41, you wrote:
> > $result= mysql_query($query); > > while ($row = mysql_fetch_row($result)); > > { > > for ($i =1;$i<mysql_num_fields($result);$i++) > > {echo $row[$i]; > > }} > > ?> > > 2 problems. > > 1. Delete the ';' after the while loop. With that there the for loop > will never run.
It will. Once. First it fetches all matching rows from the database (each time overwriting previous results):
> > while ($row = mysql_fetch_row($result));
Then it executes the code after the while:
> > { > > for ($i =1;$i<mysql_num_fields($result);$i++) > > {echo $row[$i]; > > }}
-- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/)CPU not found. retry, abort, ignore?
attached mail follows:
How could make a function to write values in extense, example: Write 10 soon below appears (Ten)
How ?
Thanks
Marcel Henrique
attached mail follows:
Hi I have little tiny script like so..
>--------- <? >$dbName = "somedb"; >$dbPass = "somepass"; >$dbUserName = "someuser"; >$host = "localhost"; >$db = mysql_connect($host, $dbUserName, $dbPass) or die ("Could not connect to database"); >mysql_select_db($dbName,$db); $sql = "SELECT * FROM downloads"; $result = mysql_query($sql, $db); $row = mysql_fetch_array($result); $row1 = mysql_fetch_array($result); ?> -----------
no I know there has to be a more efficient way of returning the $row and $row1 without writing it down like so..
anyone one can throw me a clue? :)
Thank
Andre
attached mail follows:
while loop
while($row = mysql_fetch_array($result)) { //do something. }
--Chris Lee Mediawaveonline.com
ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120
lee
mediawaveonline.com
""Mrvball008"" <mrvball008
hotmail.com> wrote in message news:OE45B6gVs1tIzmQVuRW000055aa
hotmail.com... Hi I have little tiny script like so..
>--------- <? >$dbName = "somedb"; >$dbPass = "somepass"; >$dbUserName = "someuser"; >$host = "localhost"; >$db = mysql_connect($host, $dbUserName, $dbPass) or die ("Could not connect to database"); >mysql_select_db($dbName,$db); $sql = "SELECT * FROM downloads"; $result = mysql_query($sql, $db); $row = mysql_fetch_array($result); $row1 = mysql_fetch_array($result); ?> -----------
no I know there has to be a more efficient way of returning the $row and $row1 without writing it down like so..
anyone one can throw me a clue? :)
Thank
Andre
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi,
What is the best method to replace a logo after the user add that specific item into their basket.
eg. Add to basket ---> In basket
Assume I am using cookie and database....
In addition, would you prefer your inquiry basket system to running under session or cookie and database !!! Which method is the best ??
Thank you
Mark Lo
attached mail follows:
use sessions, there is no reason why cookies would be better then sessions, I dont know of any at least.
time.egn <?php
function mtime() { $mtime = microtime(); $mtime = str_replace('.', '', $mtime); $mtime = explode(' ', $mtime); $mtime = $mtime[1] . $mtime[0];
return($mtime); }
?>
session.egn <?php
include_once('time.egn');
if ( isset($PHPSESSID) ) session_id($PHPSESSID);
session_start();
if (!isset($HTTP_SESSION_VARS['SessionID'])) { $SessionID = mtime(); session_register('SessionID'); }
$PHPSESSID = session_id(); $SID = "PHPSESSID=$PHPSESSID";
?>
cart_class.egn <?php
include_once('session.egn');
class cart { function reset() { $all_vars = get_object_vars($this); foreach($all_vars as $pos => $val) if ($pos != 'error') unset($this->$pos); }
function add($product_id, $product_quan = 1) { if ($product_quan < 1) $product_quan = 1;
$this->cart_product_id[$product_id] = $product_id; $this->cart_product_quan[$product_id] = $product_quan; }
function delete($product_id) { unset($this->cart_product_id[$product_id]); unset($this->cart_product_quan[$product_id]);
if ( !count($this->cart_product_id) ) { unset($this->cart_product_id); unset($this->cart_product_quan); } }
function update($product_id, $product_quan) { if ($product_quan < 1) $product_quan = 1;
$this->cart_product_id[$product_id] = $product_id; $this->cart_product_quan[$product_id] = $product_quan; } }
$cart = new cart;
if (!isset($HTTP_SESSION_VARS['cart'])) { $cart = new cart(); session_register('cart'); } ?>
<?php
if (isset($cart->cart_product_id[$product_id])) echo "item in cart"; else echo "item NOT in cart";
?>
check if the stockno is in the cart, if it is display a differnet icon
--Chris Lee Mediawaveonline.com
ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120
lee
mediawaveonline.com
""Mark Lo (3)"" <mark
3dsources.com> wrote in message news:00ac01c0acad$bf7c7be0$2e53fea9
Mark... Hi,
What is the best method to replace a logo after the user add that specific item into their basket.
eg. Add to basket ---> In basket
Assume I am using cookie and database....
In addition, would you prefer your inquiry basket system to running under session or cookie and database !!! Which method is the best ??
Thank you
Mark Lo
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi all; I am using PHP4.0.4pl1 build 3 of rpms Redhat 7.0
I need the swf & snmp extensions very badly rpmfind.net seems went offline
so do any one there have those 2 extensions as rpms?
if not could any body help me build those extensions from the source = code as external extension?
thnx alot
attached mail follows:
Hey all,
I'm currently using Perl for one of my applications to make secure (SSL) form submissions to an outside server. Based on the response I get back from the server my application does different things. Unfortunately, this app is all in Perl and has outgrown it's original code and continues to grow. So I really want to re-write the application but I want to do it in PHP. Now for my problem. What functions or libraries or classes exist in PHP that are equivalent to the secure posts that I'm doing up above in Perl? I've heard that CURL will allow this but I haven't seen any evidence leading me to believe that it supports secure form submissions, just secure file requests. Can anyone point me in the right direction? Is this even feasible?
Thanks, Toby
attached mail follows:
Here's what works for me-- You might adapt this to work on your frames.
on the frameset page--index.php ---I put the following: <?php
function build_querystring() { global $HTTP_GET_VARS; $vars=array(); //I use a list of the variables I want to be parsed here so as to avoid some mischief $varlist=array("var1","var2","var3"); while (list($key,$value)=each($HTTP_GET_VARS)){ reset($varlist); if (in_array($key,$varlist)){ $key=trim($key); $value=trim($value); $vars[]="$key=$value"; } }
$dir="directoryname"; $thesevars=build_querystring(); $page=(isset($page) && $page !="")?"$page":"defaultpage"; $gopage=(!$thesevars=="")?"$page.php?":"$page.php"; $framepage="$dir$gopage$thesevars"; ?>
Then in the frameset I make the url of mainFrame the value of $framepage
<frameset rows="100,561*" frameborder="NO" border="0" framespacing="0" cols="*"> <frame name="topNav" scrolling="NO" noresize src="topnav.php>"> <frame name="mainFrame" src="<?php echo($framepage);?>"> </frameset>
Then your links are coded like so: <a href="/index.php?page=whatever&var1=foo&var2=bar">
Maybe not the most elegant solution, but it works for me. Jeanne
----- Original Message -----
From: "Jens Nedal" <jnedal
ostry.com>
To: <php-general
lists.php.net>
Sent: Wednesday, March 14, 2001 5:05 AM
Subject: Re: [PHP] update two frames at once?
> Yes you can and there is even a neater script that does it.
> with thise you can update any amount of frames a t the same time.
> Just well i got to find it. msg back in a few.....
>
> Jens Nedal
>
> on 12.03.2001 22:15 Uhr, Angerer, Chad at cangerer
ibsys.com wrote:
>
> > Yes you can.. use Javascript
> >
> > Look here.. http://www.virtualgeoff.com/junkyard/frames/multiple/
> >
> > Chad
> >
> > -----Original Message-----
> > From: Michael George [mailto:george
mintcity.com]
> > Sent: Monday, March 12, 2001 3:06 PM
> > To: php-general
lists.php.net
> > Subject: [PHP] update two frames at once?
> >
> >
> > Hello al!
> >
> > Is it possible to have two frames updated when cliking on one link? I
have
> > a
> > page that is broken into 4 parts:
> > master title
> > section title
> > d section screen
> > i
> > r
> > .
> >
> > what I want is that when a link is clicked on in the directory (the left
> > column), I'd like to update the section title *and* the section
screen...
> >
> > It seemed a cool layout at the time, but I'm thinking this isn't easily
> > possible and I might just have to incorporate a section title on the
section
> > screen... But before I rewrite it, I thought I'd ask here.
> >
> > Thanks!
> >
> > -Michael
> >
> > P.S. I'd like to commend the regular posters to this list on being SOOO
> > informative and patient! Every small question to this list always
> > gets several useful answers, even when I've seen questions asked over
> > and again.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Whoops I forgot to include the whole buildquerystring function in my last post Sorry about that
function build_querystring() { global $HTTP_GET_VARS; $vars=array(); $varlist=array("cID","dID","editreturn","return","action","editpers"); while (list($key,$value)=each($HTTP_GET_VARS)){ reset($varlist); if (in_array($key,$varlist)){ $key=trim($key); $value=trim($value); $vars[]="$key=$value"; } } while (list($junk,$val)=each($vars)) { } $queryvars=implode($vars,"&"); return $queryvars; }
----- Original Message -----
From: "Jeanne Pelletier" <jpellet
mediaone.net>
To: "Jens Nedal" <jnedal
ostry.com>; <php-general
lists.php.net>
Sent: Wednesday, March 14, 2001 12:58 PM
Subject: Re: [PHP] update two frames at once?
> Here's what works for me-- You might adapt this to work on your frames.
>
>
> on the frameset page--index.php ---I put the following:
> <?php
>
> function build_querystring() {
> global $HTTP_GET_VARS;
> $vars=array();
> //I use a list of the variables I want to be parsed here so as to avoid
some
> mischief
> $varlist=array("var1","var2","var3");
> while (list($key,$value)=each($HTTP_GET_VARS)){
> reset($varlist);
> if (in_array($key,$varlist)){
> $key=trim($key);
> $value=trim($value);
> $vars[]="$key=$value";
> }
> }
>
> $dir="directoryname";
> $thesevars=build_querystring();
> $page=(isset($page) && $page !="")?"$page":"defaultpage";
> $gopage=(!$thesevars=="")?"$page.php?":"$page.php";
> $framepage="$dir$gopage$thesevars";
> ?>
>
> Then in the frameset I make the url of mainFrame the value of $framepage
>
> <frameset rows="100,561*" frameborder="NO" border="0" framespacing="0"
> cols="*">
> <frame name="topNav" scrolling="NO" noresize src="topnav.php>">
> <frame name="mainFrame" src="<?php echo($framepage);?>">
> </frameset>
>
>
> Then your links are coded like so:
> <a href="/index.php?page=whatever&var1=foo&var2=bar">
>
> Maybe not the most elegant solution, but it works for me.
> Jeanne
>
> ----- Original Message -----
> From: "Jens Nedal" <jnedal
ostry.com>
> To: <php-general
lists.php.net>
> Sent: Wednesday, March 14, 2001 5:05 AM
> Subject: Re: [PHP] update two frames at once?
>
>
> > Yes you can and there is even a neater script that does it.
> > with thise you can update any amount of frames a t the same time.
> > Just well i got to find it. msg back in a few.....
> >
> > Jens Nedal
> >
> > on 12.03.2001 22:15 Uhr, Angerer, Chad at cangerer
ibsys.com wrote:
> >
> > > Yes you can.. use Javascript
> > >
> > > Look here.. http://www.virtualgeoff.com/junkyard/frames/multiple/
> > >
> > > Chad
> > >
> > > -----Original Message-----
> > > From: Michael George [mailto:george
mintcity.com]
> > > Sent: Monday, March 12, 2001 3:06 PM
> > > To: php-general
lists.php.net
> > > Subject: [PHP] update two frames at once?
> > >
> > >
> > > Hello al!
> > >
> > > Is it possible to have two frames updated when cliking on one link? I
> have
> > > a
> > > page that is broken into 4 parts:
> > > master title
> > > section title
> > > d section screen
> > > i
> > > r
> > > .
> > >
> > > what I want is that when a link is clicked on in the directory (the
left
> > > column), I'd like to update the section title *and* the section
> screen...
> > >
> > > It seemed a cool layout at the time, but I'm thinking this isn't
easily
> > > possible and I might just have to incorporate a section title on the
> section
> > > screen... But before I rewrite it, I thought I'd ask here.
> > >
> > > Thanks!
> > >
> > > -Michael
> > >
> > > P.S. I'd like to commend the regular posters to this list on being
SOOO
> > > informative and patient! Every small question to this list always
> > > gets several useful answers, even when I've seen questions asked over
> > > and again.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
attached mail follows:
Howdy Folks!
I am wondering how to make a giant list of forms in a loop.
My goal is to search the database for the data in the cell clicked.
This is step by step process that I would like to achieve: 1. Dump the contents of the website_log db to the browser in a table format. 2. User clicks on any cell in the table. 3. A new sql query is submitted to mysql based on the data in that cell. 4. The sql results are redisplayed in table format in the browser.
Presently, here's what I have:
I have a mysql db filled with access logs - things like HTTP_REFERER, etc. Presently, I dump them out to the browser like this:
<?php
error_reporting(E_ALL); include("/home/httpd/php/open_db.inc");
// default setting for $sort_term if ($sort_term == null) $sort_term = "lid";
$sql = "SELECT lid, remote_addr, php_self, uid, event_time FROM website_log ORDER BY $sort_term ASC";
$result = mysql_query($sql, $db); $rows = mysql_num_rows($result);
echo "<center><b><u>Log File Dump</u></b><br><Br>";
echo "<table bgcolor=#000000> <tr> <td bgcolor=#000000><table cellpadding=4 cellspacing=0 bgcolor=#ffffff>"; echo "<tr> <th><a href='$PHP_SELF?sort_term=lid'>Log ID#</a></th> <th><a href='$PHP_SELF?sort_term=remote_addr'>Remote Address</a></th> <th><a href='$PHP_SELF?sort_term=php_self'>File Accessed</a></th> <th><a href='$PHP_SELF?sort_term=uid'>Accessed By</a></th> <th><a href='$PHP_SELF?sort_term=event_time'>On this Date</a></th> </tr>";
while ($row = mysql_fetch_array($result)) { $log_id = $row["lid"]; $remote_address = $row["remote_addr"]; $file_id = $row["php_self"]; $user_id = $row["uid"]; $time_of_event = $row["event_time"];
echo "<tr> <td>$log_id</td> <td>$remote_address</td> <td>$file_id</td> <td>$user_id</td> <td>$time_of_event</td> </tr>"; } echo "</table></td></tr></table>"; echo "</center>";
mysql_free_result($result); mysql_close($db);
?>
What I would like to do is convert the echo statement in the while loop into something like this:
echo "<tr> <td> <FORM NAME="log_id_search" ACTION="$PHP_SELF" METHOD=POST> <INPUT TYPE=HIDDEN NAME="sql_search_type" VALUE="log_id"> <INPUT TYPE=HIDDEN NAME="search_key" VALUE="$log_id"> <INPUT TYPE=SUBMIT NAME="search_this" VALUE="$log_id"> </FORM> </td> <td>$remote_address</td> <td>$file_id</td> <td>$user_id</td> <td>$time_of_event</td> </tr>";
I've tried the above modification but PHP silently barfs on it.
Would anyone have any insights or suggestions?
Thanks in advance!
John
--/====================================================================\ | John Voth Mobiltex Data Ltd.Calgary, Alberta,Canada, T1Y-4T7 | | jvoth
mobiltex.com 403-291-2770, 403-259-6795 (fax) | \====================================================================/
attached mail follows:
more lilly then not its the " ' problems.
echo " <tr> <td> <FORM NAME='log_id_search' ACTION='$PHP_SELF' METHOD=POST> <INPUT TYPE=HIDDEN NAME='sql_search_type' VALUE='log_id'> <INPUT TYPE=HIDDEN NAME='search_key' VALUE='$log_id'> <INPUT TYPE=SUBMIT NAME='search_this' VALUE='$log_id'> </FORM> </td> <td>$remote_address</td> <td>$file_id</td> <td>$user_id</td> <td>$time_of_event</td> </tr> ";
is better
--Chris Lee Mediawaveonline.com
ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120
lee
mediawaveonline.com
"John Voth" <jvoth
mobiltex.com> wrote in message news:3AAFB707.3D126E0A
mobiltex.com... Howdy Folks!
I am wondering how to make a giant list of forms in a loop.
My goal is to search the database for the data in the cell clicked.
This is step by step process that I would like to achieve: 1. Dump the contents of the website_log db to the browser in a table format. 2. User clicks on any cell in the table. 3. A new sql query is submitted to mysql based on the data in that cell. 4. The sql results are redisplayed in table format in the browser.
Presently, here's what I have:
I have a mysql db filled with access logs - things like HTTP_REFERER, etc. Presently, I dump them out to the browser like this:
<?php
error_reporting(E_ALL); include("/home/httpd/php/open_db.inc");
// default setting for $sort_term if ($sort_term == null) $sort_term = "lid";
$sql = "SELECT lid, remote_addr, php_self, uid, event_time FROM website_log ORDER BY $sort_term ASC";
$result = mysql_query($sql, $db); $rows = mysql_num_rows($result);
echo "<center><b><u>Log File Dump</u></b><br><Br>";
echo "<table bgcolor=#000000> <tr> <td bgcolor=#000000><table cellpadding=4 cellspacing=0 bgcolor=#ffffff>"; echo "<tr> <th><a href='$PHP_SELF?sort_term=lid'>Log ID#</a></th> <th><a href='$PHP_SELF?sort_term=remote_addr'>Remote Address</a></th> <th><a href='$PHP_SELF?sort_term=php_self'>File Accessed</a></th> <th><a href='$PHP_SELF?sort_term=uid'>Accessed By</a></th> <th><a href='$PHP_SELF?sort_term=event_time'>On this Date</a></th> </tr>";
while ($row = mysql_fetch_array($result)) { $log_id = $row["lid"]; $remote_address = $row["remote_addr"]; $file_id = $row["php_self"]; $user_id = $row["uid"]; $time_of_event = $row["event_time"];
echo "<tr> <td>$log_id</td> <td>$remote_address</td> <td>$file_id</td> <td>$user_id</td> <td>$time_of_event</td> </tr>"; } echo "</table></td></tr></table>"; echo "</center>";
mysql_free_result($result); mysql_close($db);
?>
What I would like to do is convert the echo statement in the while loop into something like this:
echo "<tr> <td> <FORM NAME="log_id_search" ACTION="$PHP_SELF" METHOD=POST> <INPUT TYPE=HIDDEN NAME="sql_search_type" VALUE="log_id"> <INPUT TYPE=HIDDEN NAME="search_key" VALUE="$log_id"> <INPUT TYPE=SUBMIT NAME="search_this" VALUE="$log_id"> </FORM> </td> <td>$remote_address</td> <td>$file_id</td> <td>$user_id</td> <td>$time_of_event</td> </tr>";
I've tried the above modification but PHP silently barfs on it.
Would anyone have any insights or suggestions?
Thanks in advance!
John --
/====================================================================\ | John Voth Mobiltex Data Ltd.Calgary, Alberta,Canada, T1Y-4T7 | | jvoth
mobiltex.com 403-291-2770, 403-259-6795 (fax) | \====================================================================/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi Chris,
THANKS! Really BIG THANKS!!
That was the problem.
John
Chris Lee wrote:
>
> more lilly then not its the " ' problems.
>
> echo "
> <tr>
> <td>
> <FORM NAME='log_id_search' ACTION='$PHP_SELF' METHOD=POST>
> <INPUT TYPE=HIDDEN NAME='sql_search_type' VALUE='log_id'>
> <INPUT TYPE=HIDDEN NAME='search_key' VALUE='$log_id'>
> <INPUT TYPE=SUBMIT NAME='search_this' VALUE='$log_id'>
> </FORM>
> </td>
> <td>$remote_address</td>
> <td>$file_id</td>
> <td>$user_id</td>
> <td>$time_of_event</td>
> </tr>
> ";
>
> is better
>
> --
>
> Chris Lee
> Mediawaveonline.com
>
> ph. 250.377.1095
> ph. 250.376.2690
> fx. 250.554.1120
>
> lee
mediawaveonline.com
>
--/====================================================================\ | John Voth Mobiltex Data Ltd.Calgary, Alberta,Canada, T1Y-4T7 | | jvoth
mobiltex.com 403-291-2770, 403-259-6795 (fax) | \====================================================================/
attached mail follows:
Merhabalar
ITU ve serbestyazilim.org.tr ortak etkinligi kapsaminda pazartesi gunu C++'in yaraticisi Bjarne Stroustrup tarafindan " Fundamental C++ programming styles / Multiparadigm programming in C++ " konularinda ITU Suleyman Demirel Kultur Merkezinde ucretsiz seminer verilecektir. Bununla birlikte pazar gunu ITU Matematik ve Bilgisayar Kulubu ve WIOS ortak etkinlik kapsaminda PHPed editorunun yazari Ergin Soysal ayni yerde Genel PHP semineri verecektir Ayrintilar icin www.matbilg.itu.edu.tr/seminerler adresini ziyaret edebilirsiniz. Tum yapilacak seminerler ucretsizdir. Istanbulda boyle seminerlerin devam etmesi icin mumkun oldugu kadar katilmanizi rica ediyoruz. Simdiden istiraklariniz icin tesekkur ederiz. Desteklerinizi bekliyoruz.
19 Mart 2001 - C++ : C++'in yaraticisi Bjarne Stroustrup
ITU Ayazaga Kampusu - 19 Mart 2001 Saat 16:00 Suleyman Demirel Kültür Merkezi
Konusmaci: Dr. Bjarne Stroustrup AT & T Labs, Research Director
Konu: C++ Fundamental C++ programming styles / Multiparadigm programming in C++
Dr. Stroustrup, C++'in do?u?u, ve geli?iminde önemli etkileri olmu?, C++'in yaraticisidir. Konu uzerinde yazdigi kitaplar, temel basvuru kitaplaridir. Dr. Stroustrup, daha oncede, INETD'nin atasi olan TRUUG tarafindan Turkiye'ye getirilmi?ti.
Dr. Stroustrup, "serbest yazilim yarismasi" (www.serbestyazilim.org.tr) nedeniyle Turkiye'ye gelmekte, ve Istanbul'daki konu?maya ek olarak, Ankara'da ODTU'de 20 ve 21 Mart'ta 2 konusma yapacaktir.
Etkinlik her Internet meraklisina aciktir ve ucretsizdir.
Ayr?nt?l? bilgi: http://www.matbilg.itu.edu.tr/seminerler
---------------------------------------------------------------------------- ------------------------------ ---------------------------------------------------------------------------- ------------------------------
18 Mart 2001 -Web Programlama Dili PHP PHPed Adl? dünyaca ünlü program?n Yarat?c?s?
ITU Ayaza?a Kampüsü - Saat 10:00 Süleyman Demirel Kültür Merkezi
Konusmaci: Ergin Soysal Pleksus Information Technologies <http://www.pleksus.net.tr/> as director of software research and development department and head developer.
Konu: PHP Ergin Soysal, PHP konusunu 2 kisimda isleyecektir. 1. K?s?m 18 Mart 2001 tarihinde asag?dak? konularda verilecektir. 2. K?s?m için Daha sonra tarih belirtilecektir.
PHP-1: Giris Gerekli Dosyalar ve Kurulum Yazim Kurallari Degiskenler/Veritipleri Operatörler Diziler if/elseif/else switch Döngüler Fonksiyonlar Formlar Form alanlari Post ve Get Dosya gönderme ve alma (upload) PHP-2 ?leri düzey Siniflar Çerezler Oturumlar Kullanici Dogrulama
Ergin Soysal, bir PHP editoru yazacak kadar PHP'i sevmis ve kullanmaktadir. AB 2001 ve Inet-tr 2000'de Ergin Soysal benzeri seminerler vermistir.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ugur COSKUN
ISTANBUL TEKNIK UNIVERSITESI - Bilgi Islem Dairesi Baskanligi
http://www.matbilg.itu.edu.tr
coskunu
itu.edu.tr ugur
gelecek.com.tr
Tel: (+90 212) 285 39 30 / 110
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
attached mail follows:
Hey :)
I'm in the need to fetch some javascript varibles from php, any ideas on how this could be done ?
Regards, Morten Hansen
attached mail follows:
1. Do an "echo" in the JS function definition:
function myJavascriptFunction() { var foo = <?php echo $somePhpVariable ?>; }
2. Assign the PHP variable to a HIDDEN <FORM> element, then access this from JS:
<INPUT TYPE="HIDDEN" NAME="somePhpVariable" VALUE="<?php echo $somePhpVariable ?>">
function myJavascriptFunction () { var foo = document.forms[0].somePhpVariable.value; }
Kirk
-----Original Message-----
I'm in the need to fetch some javascript varibles from php, any ideas on how this could be done ?
Regards, Morten Hansen
attached mail follows:
Hey!
Once again, I have a question ;)
I have a string that looks like this(I loaded it with a file data):
"<!-- head --> blabla <!-- body --> continue of blabla <!-- end -->"
I would like to know what's the fastest technique of taking just a specific part in this string(case-insensitive) and putting it into a new string i.e.: from "<!-- head -->" to "<!-- body -->" or: from "<!-- body -->" to "<!-- end -->"
Thank you in advance -
Aviv Revach
BRILLIANeT Website - http://www.brillianet.com/
attached mail follows:
imap functions are notorious for not returning anything usfull, same with xslt functions.
$headers = imap_sort($this->imap_stream, SORTARRIVAL, 1, SE_UID );
this wrks on my linux box. its almost exactly the same as yours. one thing I found is try playing with
if ($this->imap_folder)
$this->imap_stream =
imap_open($this->imap_stream_string, $this->imap_username, $this->imap_password);
else
$this->imap_stream =
imap_open($this->imap_stream_string, $this->imap_username, $this->imap_password, OP_HALFOPEN);
if there is a folder then do no use OP_HALFOPEN. I had to use this to get nntp working right.
--Chris Lee Mediawaveonline.com
ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120
lee
mediawaveonline.com
"Terrence Wong" <terrence
edlabs.com> wrote in message news:3AAF6B99.F0E4B5A0
edlabs.com... This command works without problems on a local unix server. However, when I tried the exact same code , $sortmail = imap_sort($mailbox,SORTSIZE,1) on a remote imap server running on mac, it produces problems. (no error messages)
I am unable to check the error messages as they are none. And adding on to that, the HTML have been terminated without any error messages without completing the entire html closing tags.
All functions works, except imap_sort?
Anyone? any ideas? terrence
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Is there anyway in PHP to prompt the user for input like JavaScript's prompt("Hello, what is your name?")
Thanks, Gary
attached mail follows:
<?PHP if( $Submit ){ print "Your name is $name"; } else{ print "<FORM METHOD=\"post\" ACTION=\"$PHP_SELF\">"; print "Please Enter Your Name:"; print "<INPUT TYPE=\"text\" name=\"name\">"; print "<INPUT TYPE=\"submit\" NAME=\"Submit\" VALUE=\"Submit\">"; print "</FORM>"; } ?>
Kevin Leavell
kevin
ldigitaldesign.com
P 406.829.8989
C 406.240.4595
---> -----Original Message-----
---> From: Gary [mailto:gcooke
radionics.com]
---> Sent: Wednesday, March 14, 2001 1:13 PM
---> To: php-general
lists.php.net
---> Subject: [PHP] prompts
--->
--->
---> Is there anyway in PHP to prompt the user for input like JavaScript's
---> prompt("Hello, what is your name?")
--->
---> Thanks, Gary
--->
--->
--->
---> --
---> PHP General Mailing List (http://www.php.net/)
---> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
---> For additional commands, e-mail: php-general-help
lists.php.net
---> To contact the list administrators, e-mail:
---> php-list-admin
lists.php.net
attached mail follows:
Kevin,
Thanks for the reply. This will not solve my problem. The problem is, for some languages the sentence structure may be different. For example, the sentence may need to be, $greeting = "$first_name, welcome!" as opposed to, $greeting = "Welcome, $first_name!"
Or, it can come in a different form, like, $greeting = "Good morning, $first_name."
These specificity need to be in the language file, not the scripts.
Tao
Leavell Digital Design wrote:
> You can use constants:
>
> in your language file
> define("HELLO", OLA);
>
> in your script which includes the language file you can write
> $greeting = HELLO . " $first_name";
>
> print $greeting;
>
> Kevin Leavell
> kevin
ldigitaldesign.com
> P 406.829.8989
> C 406.240.4595
>
> ---> -----Original Message-----
> ---> From: Tao [mailto:taoliang
cdr.stanford.edu]
> ---> Sent: Tuesday, March 13, 2001 9:50 PM
> ---> To: php-general
lists.php.net
> ---> Subject: [PHP] software localization with PHP
> --->
> --->
> ---> Hi all,
> --->
> ---> I have a question about localizing PHP scripts. I understand
> ---> that for basic
> ---> localization one can have a "strings" file for each language,
> ---> which contains
> ---> string variables and values such as:
> ---> <?php
> ---> $title = "Welcome!";
> ---> $error = "An error occurred.";
> ---> ?>
> --->
> ---> Then, in the scripts just "include" the language file at the
> ---> beginning and
> ---> simply call the strings by their variable names. The issue I
> ---> have is when
> ---> embedding variables within these strings. Suppose I need to
> ---> call the user
> ---> by his/her first name, in the strings file I would have a variable like
> ---> this:
> ---> $greeting = "Welcome! $first_name";
> --->
> ---> The problem is, the strings file is loaded at the beginning of
> ---> the script
> ---> before $first_name was set, so the $greeting string will come out as
> ---> "Welcome! ", with $first_name being an empty string. Even if
> ---> I loaded the
> ---> strings file after the $first_name variable is set, the problem still
> ---> remains - when $first_name variable is changed, the strings
> ---> file has to be
> ---> reloaded.
> --->
> ---> What is the best way of dealing with this problem? Is there a
> ---> place to find
> ---> "best practices" on localizing PHP software?
> --->
> ---> Tao
> --->
> --->
> --->
> ---> --
> ---> PHP General Mailing List (http: