Re: [PHP] Create a new directory on server.

2004-01-31 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote:

is there in PHP a function that create a new directory on server

This is a serious case of needing to RTFM. www.php.net/mkdir

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


Re: [PHP] detecting flash in php

2004-01-08 Thread Leif K-Brooks
Louie Miranda wrote:

is there anyway of detecting flash? in php

Detecting whether the user has Flash enabled, you mean? No. PHP is 
server-side.

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


Re: [PHP] A simple instruction

2004-01-01 Thread Leif K-Brooks
Dino Costantini wrote:

i have a file name with the path ex food/italy/pizza/margherita.php. how can i obtain the name of the file in this case margherita.php i know there is a function, but i don't remember it.

$_SERVER['PHP_SELF']

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


Re: [PHP] PHP forms that are valid XHTML

2003-12-30 Thread Leif K-Brooks
Tim Burgan wrote:

In their forms they use the name attribute (ie. name=example) instead of
XHTML's id attribute (ie. id=example).
How can I fix this?

(X)HTML still requires name to be used for forms. It's usually best to 
use both name and ID for forms.

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


Re: [PHP] Re: spambothoney: script to pollute spammer's databases

2003-12-09 Thread Leif K-Brooks
Manuel Lemos wrote:

The latest spamming strategies consist on using valid sender addresses 
of inocent companies. Therefore, when you make up invalid addresses, 
all the bounces will go to the innocent companies mail servers. The 
more invalid addresses you make up the more harm you cause to innocent 
companies.
My strategy against spam is giving invalid addresses at my domain name, 
all of which redirect to [EMAIL PROTECTED] No innocent servers besides my 
own are harmed, and the spam is given to an authority who will (in 
theory) do something about it.

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


Re: [PHP] removing line breaks

2003-12-05 Thread Leif K-Brooks
Roel Derckx wrote:

I want to remove line breaks from the front of a string, but i can't get it
to work. Who can help me?
Note that i only want to remove line breaks in the start of the string, all line 
breaks in
the rest of the string should remain.
ltrim()

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


[PHP] UIEE?

2003-12-05 Thread Leif K-Brooks
I need to parse UIEE files for a project. Has anyone done that before? 
Any pointers?

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


Re: [PHP] Re: Unicode translation

2003-12-02 Thread Leif K-Brooks
Luke wrote:

Yeah, i had a similar problem, i dont know if its the same, but i found that
adding
meta http-equiv=content-type content=text/html; charset=UTF-8
in the head of the html output fixed it
 

Even better, use header('Content-Type: text/html; charset=UTF-8') at the 
beginning of your PHP page.

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


Re: [PHP] how can i get rid of newlines?

2003-11-28 Thread Leif K-Brooks
David T-G wrote:

I need a true nl2br function to get rid of newlines; I am accepting a
changed ini file parameter but the newline kills me.
Try:
$text = preg_replace(/\r\n|\n|\r, 'br', $text);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] how to escape '\'

2003-11-28 Thread Leif K-Brooks
Manisha Sathe wrote:

I have magic_quotes_gpc ON

'Here's is'  - this comes out after HTTP post  as

'Here\'s is'

But i want to get back the original string as it is - how to change ?

www.php.net/stripslashes

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


[PHP] How compatible is using PATH_INFO?

2003-11-27 Thread Leif K-Brooks
One common way to work around many search engines ignoring pages with 
query strings is to use scripts with odd URIs 
(http://server.com/foo.php/foo/bar for instance) and get them with 
$_SERVER['PATH_INFO']. How compatible is doing that? Will servers 
besides Apache support it?

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


[PHP] Storing images for photo album?

2003-11-16 Thread Leif K-Brooks
I'm writing a photo album in PHP. The idea is to convert user-uploaded 
images to PNGs with unique IDs (1.png, 5.png, etc.), and cache them at 
certain sizes as needed. Now I'm running into an out-of-memory 
converting user images to PNGs, and I'm not sure what to do: copy them 
in whatever format the user used and convert to JPEGs for output? Use 
some other format for storage?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] What is white space

2003-11-15 Thread Leif K-Brooks
Robert Cummings wrote:

FYI, if you're woprried about the header cannot be sent due to
output... error, then if your file only has code and no HTML, then you
can omit the ? tag at the end of your script. This solves countless
issues with there being a space, a tab, a newline, or any whitespace
after the closing tag.
 

And when that bug is fixed?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] What is white space

2003-11-15 Thread Leif K-Brooks
Keith Greene wrote:

It's not a bug. Anything (including spaces, newlines etc) that is not 
inside ? and ? is output directly to the browser.
No, I'm talking about not using ?.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] What is white space

2003-11-15 Thread Leif K-Brooks
Keith Greene wrote:

That's not a bug either. Leaving out the ? is simply telling the php 
parser that it has to parse the rest of the script.
Where's the manual page saying that's allowed?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] What is white space

2003-11-15 Thread Leif K-Brooks
Keith Greene wrote:

Ok, you're getting into semantics now. 
http://www.php.net/manual/en/language.basic-syntax.php doesn't say 
whether it is acceptable or not, but as Robert pointed out, if your 
script is purely php, omitting it is a good way of eliminating the 
headache of trailing white spaces that may interfere with headers.
No, I'm getting into the reality that an undocumented feature may very 
well be a bug, and may disappear.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Extracting Source code from Binary Files(.dll,.exe.,class)

2003-11-13 Thread Leif K-Brooks
Prashant Akerkar wrote:

I have a Query. Is it Possible to extract the source code from .exe,(VB,'C',C++),.dll(VB,'C',C++) or .class(java) files.
 

To some extent. All that's left intact by the compiler is the logic, not 
the exact source code. In theory, a utility to transform machine code 
logic into C (or another high-level language), but you wouldn't get the 
exact source code you compiled.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to find the Drive letters

2003-11-12 Thread Leif K-Brooks
D. Jame wrote:

How to find the Drive letters and Drive Types of remote system WNT, i have system administrator password too.. 
this all work done with PHP pages, when my client give IP, user /password then my PHP scirpt show him that system drive/ folders...
 

Can't be done unless the remote machines are configured specially.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Echo issue RESOLVED!

2003-10-30 Thread Leif K-Brooks
- Edwin - wrote:

Just by reading this - http://www.apple.com/macosx/ esp.
these last two sections:
 * Solid as a rock
 * Developer's dream
would give people reason to consider and even switch...
 

Mac OS X is fairly stable, I'll give you that. As for developer's 
dream, that's a matter of opinion.

One of Japan's most prestigious universities, Tokyo
University, just purchased 1,149 customized iMacs and 53
Xserves--all running OS X, of course. They weren't the first
one though. A university in Nagoya City has also bought more
than a thousand of those.
 

Yep, Macs are being bought. Same can be said for Intel-compatible 
hardware running Linux and Windows.

Imagine this.

I've just finished recording a re-run of Dark Angel. I've
cut the commercials, added chapters, and now it's ready to
render and burn into a DVD together with the previous episode
(I can put two in one disc). While waiting, I'm listening to
my fav music on MP3s and debugging some of my PHP scripts.
Oh, and did I mention that I'm doing all of this while
copying voice/music from cassette tapes to the hard disk so
that I can turn them all into MP3s?
And did I mention that you can do all of the above just by
installing Mac OS X and one software called Toast? You don't
even need to install Apache, sendmail, etc. (and of course
PHP) for testing since they're part of the OS installation.
 

With a DVD burner and video capture equipment. Oh, and my iMac doesn't 
even have a sound in port.

Apache, sendmail, and PHP are also standard on most Linux distros.

Do you need to ssh to your remote server? No sweat. The
terminal is part of the OS as well. There you can just run
the ssh client and login to your remote server. Btw, you can
*also* customize the looks of your terminal. I like mine
semi-transparent, with a prompt that looks and feels like I
was back in those DOS days ;)
 

Same for all Linux distros.

Yes, I can do those and more on my Mac. And it doesn't even
crash on me even if I do many things at the same time. I
could run it for months! The only time I really needed to
reboot it is when I added a new Serial ATA RAID card. Now,
I'm really missing the blue screen...
 

Linux is stable too. My iMac is dirt slow, and cost $1000.

But I bought my old iMac back in 2000-ish. Maybe Macs have become better 
since then, I don't know.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Endless 'while' loops?

2003-10-30 Thread Leif K-Brooks
Dave G wrote:

In the example they give in this book, they use a while loop
(page 670, for anyone who has it). But it's confusing because it looks
like this:
while ( $subscriber = mysql_fetch_row($result))
{
[write and send the email]
}
$subscriber is probably an array, filled with the email address
and information about the mailing list subscriber. But in the rest of
the script I can't find where they declare and fill this array. But more
than that, I can't understand how this while loop would ever stop
running. Nothing seems to change $subscriber within the while loop's
control structure. It doesn't ever say anything like $subscriber ++1.
Nor does $result have anything act upon it which would change it. So to
me they both look static, and this loop looks endless.
In PHP, the equal sign returns the value assigned. For instance, this 
will output 5 and set $foo to 5:

print $foo = 5;

Now, the mysql_fetch_row function returns an array of results, or false 
if it's gone through all the results (it automagically knows which 
result it's on). If it's the last row, $subscriber is set to false and 
false is given for the loop condition.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] quotes in php.ini

2003-10-29 Thread Leif K-Brooks
Curt Zirzow wrote:

Try reversing the quotes:
error_prepend_string = font color='#ff';
 

Not valid XHTML (not sure if it's even valid HTML).

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Calendar Script

2003-10-29 Thread Leif K-Brooks
Vijay Killu wrote:

Where can I find the Calendar script that has been used on the PHP.net site.
I believe I can use it on my website since it is open source :-)
I don't seeany calendar, but you should be able to use the show source 
link whereever it is.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] quotes in php.ini

2003-10-29 Thread Leif K-Brooks
- Edwin - wrote:

Why not?
 

Because that's what the standard says.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] quotes in php.ini

2003-10-29 Thread Leif K-Brooks
- Edwin - wrote:

Interesting. Where?
 

www.w3.org

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Upgrading GD...

2003-10-28 Thread Leif K-Brooks
- Edwin - wrote:

That should do it. (Unless, of course, you encounter some configure
or make problems.)
And of course, I did:

configure: error: Cannot find rfc822.h. Please check your IMAP installation.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] show_source

2003-10-28 Thread Leif K-Brooks
Curt Zirzow wrote:

+1 and + on getting rid of the font tags
 

What he said.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Generate Thumbnail gif's

2003-10-28 Thread Leif K-Brooks
Vijaya_Manda wrote:

Is there any pre-written code available on the net to generate thumbnail
images for a picture.
I mean I send the path of the image and my PHP Script should be able to
generate a gif file of size 100x71 or something like that.
 

Images will look stretched if you do that, but here are two functions to 
resize an image with a new width or height proportional to its current 
size. Pass them GD image resources created with imagecreatefrompng() and 
friends.

function imageresizeheight($img, $newheight) {
   $oldheight = imagesy($img);
   $oldwidth  = imagesx($img);
   $newwidth  = $oldwidth * ($newheight / $oldheight);
   $newimg = imagecreatetruecolor($newwidth, $newheight);
   imagecopyresized($newimg, $img, 0, 0, 0, 0, $newwidth, $newheight, 
$oldwidth, $oldheight);
   return $newimg;
}
function imageresizewidth($img, $newwidth) {
   $oldheight = imagesy($img);
   $oldwidth  = imagesx($img);
   $newheight  = $oldheight * ($newwidth / $oldwidth);
   $newimg = imagecreatetruecolor($newwidth, $newheight);
   imagecopyresized($newimg, $img, 0, 0, 0, 0, $newwidth, $newheight, 
$oldwidth, $oldheight);
   return $newimg;
}

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Generate Thumbnail gif's

2003-10-28 Thread Leif K-Brooks
Vijay Killu wrote:

That will resize the image and display it as a thumbnail. 
 

No, they will give you a GD image resource to do what you want with.

What I want is a new image to be created. I mean a .gif file. 
 

You can't create a GIF, but you can use imagepng() or imagejpeg() to 
output it to a file as a PNG or JPEG.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Upgrading GD...

2003-10-27 Thread Leif K-Brooks
I need to use imagecreatetruecolor(), but my server is still using GD 
1.6. Is it possible to upgrade GD without having to recompile PHP, etc.? 
I'm still fairly new to Linux administration.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Upgrading GD...

2003-10-27 Thread Leif K-Brooks
Curt Zirzow wrote:

The odds aren't that good, unless the current gd is loaded from a
shared object instead of linked directly to php.
Check your configure command from phpinfo() if it has the option
--with-gd then it was linked directly. Otherwise it is loaded from
an shared object file located in your 'extention_dir'
If it is loaded from extension_dir you can rebuild gd2 module and
replace the old one, and it will use that one instead.
I don't think you can load both into php.
 

Crud, looks like it's linked directly in. What would be the most 
painless and easiest way to recompile PHP with GD2?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Tricky variable syntax...

2003-10-27 Thread Leif K-Brooks
René Fournier wrote:

What I want to do is echo the value of $img_photo_name. But how can I
refer to it?
echo 'file name: ' . ${$fld . '_name'};

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Upgrading GD...

2003-10-27 Thread Leif K-Brooks
Ryan Thompson wrote:

Just a thought. Try using phpinfo() to find out the compile options. Use that 
and just add the GD compile options after upgrading GD. That's usually how I 
go about adding a new module. I can never remember what I've compiled into
it.
 

Thing is, I don't know how to get GD, how to compile PHP, or anything 
else. Is there something explaining how somewhere?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to deal with XML?

2003-10-27 Thread Leif K-Brooks
Robert Cummings wrote:

PHP docs are SGML as far as I can remember.

How so? PHP isn't XML, SGML, HTML, or anything else besides PHP.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] if and like together?

2003-10-26 Thread Leif K-Brooks
Tim Thorburn wrote:

Is there an IF LIKE statement in PHP?  I've got a MySQL database setup 
with headings and text (think a news article site) - headings in one 
field, text in another.  In some cases, I don't want the contents of 
the heading field to appear on the site - in these cases, the headings 
begin with 'noshow-'.

So I'm thinking the easiest way to handle this is if there is 
something similar to the MySQL 'LIKE' command in PHP ... is there such 
a beast?
if(preg_match('/^noshow-/', $heading)){
//Don't show
}
--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Idea for new operator

2003-10-26 Thread Leif K-Brooks
Larry E. Ullman wrote:

I was feeling generous so I went back in time and added this 
functionality to PHP as of version 3. I call it the strcasecmp 
function. I placed the description and usage of the function in the 
PHP manual: http://www.php.net/strcasecmp
That was nice of you, but he wanted an operator.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] run exe file

2003-10-20 Thread Leif K-Brooks
Deependra b. Tandukar wrote:

Is there anyway that I can put .exe file on the web, and allow 
visitors only to run it, not download it.
No.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Darken and lighten color?

2003-10-18 Thread Leif K-Brooks
I'm looking for a nice alithogram to darken and lighten a color by a 
certain ammount. I know this isn't strictly a PHP question, but I'm 
doing it in PHP and there isn't anywhere better to ask.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Darken and lighten color?

2003-10-18 Thread Leif K-Brooks
Chris Shiflett wrote:

--- Leif K-Brooks [EMAIL PROTECTED] wrote:
 

I'm looking for a nice alithogram to darken and lighten a color by a 
certain ammount.
   

Maybe you mean algorithm? :-)
 

Yep. My ability to spell decreases 5% every 15 minutes after 12AM.

To lighten, increase RGB values by 10% each. To darken, decrease RGB values by
10% each. Maybe replace 10 with whatever the certain amount is.
 

But what do I do with something like 40,40,255? What happens to the 255?

Is that all you're wanting to do?
 

Yup.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Darken and lighten color?

2003-10-18 Thread Leif K-Brooks
Becoming Digital wrote:

You just have to leave it at 255.  That's what Illustrator does.
 

Hmm, seems to work, thanks. Note to self: try before you ask.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Page breaks and printing?

2003-10-17 Thread Leif K-Brooks
J J wrote:

Is there a good way in PHP to determine page breaks
for long reports and printing?  I'd like to be able to
best determine where pages should begin and end and
reprint things like table/page headers and footers on
each page so the reports print nicely.
 

Just use HTML thead/tfoot elements and let the browser do it for you:

table
thead
tr
thSomething/th
thSomething/th
thSomething/th
tr
/thead
tbody
tr
tdData/td
tdData/td
tdData/td
/tr
tr
tdData/td
tdData/td
tdData/td
/tr
tr
tdData/td
tdData/td
tdData/td
/tr
tr
tdData/td
tdData/td
tdData/td
/tr
/tbody
tfoot
tr
td colspan=3Footer/td
/tr
/tfoot
/table
--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Alternative to die()????

2003-10-16 Thread Leif K-Brooks
Scott Fletcher wrote:

I am wondering if there is an better alternative to the die() because it
prevent the HTML codes from being send to the browser, including some php
echo codes with HTML in it.
 

If you don't want the page to end, don't use die at all. Simple as that.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Pidget - The PHP5 Widget Library

2003-10-14 Thread Leif K-Brooks
Luke Ehresman wrote:

Hi Everyone,
 

It doesn't seem to be very standards-compliant. Good PHP is important to 
me, but good HTML is too.

Also, I can't find any examples, but it doesn't really seem to seperate 
logic from presentation - it just provides another means of presentation.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Leif K-Brooks
LiteSpeed Information wrote:

We glad to introduce you LiteSpeed Web Server 1.1.
Mind explaining this?

$ telnet litespeedtech.com 80
HEAD / HTTP/1.1
Host: litespeedtech.com
HTTP/1.1 200 OK
Date: Wed, 08 Oct 2003 16:36:18 GMT
Server: Apache   
-
Last-Modified: Wed, 08 Oct 2003 03:13:06 GMT
Eag: 342b8-36cd-3f8380c2
Accept-Ranges: bytes
Content-Length: 14029
Connection: close
Content-Type: text/html

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Leif K-Brooks
LiteSpeed Information wrote:

Thank you for your interest.
Our recommendation is, to setup your server environment with Apache 
first, make sure every thing works, then run LiteSpeed in parallel on 
different port, sharing the document root, then stop Apache and switch 
LiteSpeed to port 80. If anything goes wrong, switch back to Apache. 
The migration could be easier after we finish the Apache conversion 
tool. :-)
I suppose you're waiting for it before switching yourself?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Leif K-Brooks
LiteSpeed Information wrote:

What we are waiting for are extra security features: chroot(almost 
done) and auto-ban. They are not available on Apache either we believe.
If they aren't available with Apache either, why are you still using it?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] LiteSpeed Web Server 1.1

2003-10-08 Thread Leif K-Brooks
LiteSpeed Information wrote:

No doubt, Apache is a good web server, everyone use it. ;-)
What the heck?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Verry strange GET behaviour

2003-10-07 Thread Leif K-Brooks
Chris Shiflett wrote:

You have register_globals disabled, and if you are asking this question, you
need to leave register_globals disabled. Use $_GET['_section'] to access your
variable.
But he says $REQUEST_URI works.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] GET globals REQUEST the plot thickens

2003-10-07 Thread Leif K-Brooks
Marek Kilimajer wrote:

Has you mention what php version are you running? Superglobals are 
available only since 4.1.0
If $_GET works, then his PHP version must support superglobals.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] or return problem

2003-10-07 Thread Leif K-Brooks
Chris Sherwood wrote:

Well Unfortunately pat
You are going to have to be an unlazy man and use an if statement
 

Why won't any of you give a good reason why it won't work? How come this 
works:

function foo() {
   2+2==4 or die(The world is ending, or at least your processor!);
}
But this doesn't:

function foo() {
   2+2==4 or return(The world is ending, or at least your processor!);
}
The way I see it, there's something really odd going on here.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] or return problem

2003-10-07 Thread Leif K-Brooks
Robert Cummings wrote:

Directly from the docs:

   http://ca3.php.net/manual/en/function.return.php

First line:

   If called from within a function, the return() statement
immediately ends execution of the current function
Important concept:

   IMMEDIATELY returns.

Learn to read.
 

What does that have to do with anything?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] or return problem

2003-10-07 Thread Leif K-Brooks
Robert Cummings wrote:

How can you possibly test, in a conditional, the return value of the

return statement itself when it has no value to return and even causes
the current scope to exit IMMEDIATELY??
 

Ok, that explains it. Thanks.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] or return problem

2003-10-07 Thread Leif K-Brooks
Robert Cummings wrote:

Generally it doesn't look like a function since you can do:

   return 'foo'

which has no parenthesis. The parenthesis are optional and only used to
return the result of an expression.
The same is true of exit/die.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] HTML Printing problem.

2003-10-07 Thread Leif K-Brooks
php coder wrote:

HTML files are to large to print from the browser. We are creating 
reports that are ++5 mg in size. This is a real problem for the 
browser. We are on a network and can print directly from the server 
but this means we must convert the html to some printer friendly 
format. We are using many new standards such as tbody and thead tags 
to give us consistent header on each page of a printed document. This 
seems to cause problems with most conversions that we have seen.
What does this have to do with PHP?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How can I get a function name?

2003-10-06 Thread Leif K-Brooks
RDias wrote:

How can I get a function name?

If  you're using PHP 4.3.0+, try the __FUNCTION__ magic constant. 
http://us2.php.net/manual/en/language.constants.predefined.php

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Are variable object vars possible?

2003-10-02 Thread Leif K-Brooks
Jason Godesky wrote:

I've been playing with variable variables and variable functions 
lately, and I was wondering if there was anyway to use that with 
object variables?  I'm trying to make classes that can store instances 
in a database, and I'd like to have an abstract parent class with a 
load() method ... but since each of its children have different 
variables, I need to do a SELECT * from the database, and for each 
field/row pair, do something like $this-

{$field} = $row[$field]  If anyone knows how to do this, I'd appreciate 
your help

Try:
$this-$field = $row[$field];
--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] OT(?): mod_rewrite not passing GET variables to php

2003-10-01 Thread Leif K-Brooks
Steven Jarvis wrote:

I'm just starting to experiment with mod_rewrite on Apache 1.3.x and 
php 4.3.3. Register_globals is off.

I have the following rules in my .htaccess file (which sits in the 
site's root dir along with paper.php):

RewriteEngine On
RewriteRule ^/([a-z]+)/([a-z]+)/$ paper.php?paper=$1section=$2 [L]
The browser gets served up paper.php, but I can't access the variables 
that should be in $1 and $2. They're supposed to be GET variables, right?

I've tried accessing them with $_GET[varname] and 
$_REQUEST[varname]  (and directly with $varname, even though 
register_globals is off), but I get nothing.

Can someone point out the (probably obvious) problem I'm having?

thanks,

Steven

Try this (I'm no mod_rewrite expert, so no promises):

RewriteEngine On
RewriteRule /^([a-z]+)\/([a-z]+)$/ paper.php?paper=$1section=$2 [L]
--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Compare dates

2003-09-29 Thread Leif K-Brooks
Shaun wrote:

How can I compare two dates with PHP, to see if one date occurred before the
other?
 

Convert them to a timestamps (strtotime()), then just compare them:

$date1 = 'september 10th 2003';
$date2 = 'september 20th 2003';
$date1_ts = strtotime($date1);
$date2_ts = strtotime($date2);
if($date1_ts  $date2_ts){
echo 'Date 1 is before date 2.';
}else{
echo 'Date 2 is before date 1.';
}
--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Lifetime with cookie-less sessions

2003-09-24 Thread Leif K-Brooks
Becoming Digital wrote:

I just took a thorough look at the Session Handling section in the manual.  I couldn't even find any mention of non-cookie session lifetimes.  I get the impression they either die on broswer close or have a fixed lifetime that cannot be changed.  Hopefully someone can prove me wrong, if only for amusement value. ;)
 

It works something like this:

Used goes to www.foobar.com, session ID is 1
Used clicks on link to foo.php, which has been automagically changed to 
foo.php?PHPSESSID=1
PHP sees the PHPSESSID GET variable, and uses session ID 1.
User goes to some other site, then comes back to foobar.com by typing it 
into their address bar
PHP has no way to know the session ID since the user didn't add 
?PHPSESSID=1 to the URL, so it uses session ID 2 with new session data

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Can I run scripts on server?

2003-09-23 Thread Leif K-Brooks
zavaboy wrote:

Is there a way to have a PHP script run on the server? For example, I want
to run a script to erase old database fields at 12:00 AM server time without
any user interaction, how would I do that?
All PHP scripts are run on the server, I'm guessing you mean run 
/automatically/ on the server. You're looking for cron on a *nix server.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] precompile php scripts

2003-09-18 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote:

Hi there i was wondering if there was an open source port of a php script
compiler for the server. Will this make alot of difference in performance
at all. I know this may have been asked many times, is the encoders also a
compile i dont particularly need to encode/decode code but compile for
performance advancement.
http://pear.php.net/package/bcompiler

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] oop problems code

2003-09-18 Thread Leif K-Brooks
ORLANDO POZO wrote:

Hello, mailing list, I have problem with this oop code:

[snip bad code]

-- 

the output of it is:
[snip output]

-- 

  I don't know what happen in this code, because, the last inheritance 
(Displayer Class) that I made, it is inherited the properties and 
methods of the Employee Class, and as Employee Class is also inherited 
the functionality of the parent class, the Displayer Class would be 
inherit this functionality, too.

  thanks if any could help me, regards, bye.

If a class doesn't define a constructor, the constructor of its parent 
is used; the inherited constructor of displayer wants 6 parameters. 
Also, your code wouldn't do anything useful, since you don't set the 
values of $obj2 (did you expect it to get values from $obj1?).

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session with various Browser.

2003-09-18 Thread Leif K-Brooks
Dan Anderson wrote:

Try running newer browsers.  I'd be curious how everything handles with
Netscape 7 or the newest incarnation of IE.
NS7 would be the same as Mozilla.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Block HTML Control

2003-09-02 Thread Leif K-Brooks
Seth Willits wrote:

Aaa ok. I was confused with the semi colon and colon used in the  
last example. This clears it all up. Thanks.
http://us3.php.net/manual/en/control-structures.alternative-syntax.php

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] some html basics please

2003-08-30 Thread Leif K-Brooks
Dennis Gearon wrote:

It seems that HTML is LAME, LAME,LAME when it comes to determining 
local directories.
This is a PHP list, not an HTML list. What does this have to do with PHP?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] some html basics please

2003-08-30 Thread Leif K-Brooks
Dennis Gearon wrote:

h, php outputs to the browser,
hmmm, browser reads HTML
hm,maybe somepeople who program in PHP have to dabble in HTML
Never said they don't, but the HTML PHP outputs has nothing to do with 
PHP. Take this to an HTML list/newsgroup.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] IS THIS A BUG?

2003-08-28 Thread Leif K-Brooks
Steve Todd wrote:

Is this a bug or can we legally use it.

Please RTFM before posting! http://php.net/variables.variable

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Thank You for your help

2003-08-28 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote:

2) this question is more directed to Justin French, but in any case, the
reason i wanted to use the PDF forms is so that i don't have to create them
again in CSS or any other format, the forms are already created and all i
need to do is figure out how to make the data that people enter into them
submittable.  but in any case, have you seen some pretty complex forms
made up of entirely CSS that i can look at?  i guess this solution would be
acceptable pending some examples
 

CSS does not make forms! HTML makes forms, and CSS can be used to style 
them.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: IS THIS A BUG?

2003-08-28 Thread Leif K-Brooks
DvDmanDT wrote:

When using register_globals=off, this might be off intrest: (notice $$var)
while(list($var,$val)=each($_REQUEST))$$var=$val;
Why not just turn register_globals on, then?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: How can I load load Additional extensions ?

2003-08-15 Thread Leif K-Brooks
Dennis Lee wrote:

Why it is wrong when I run php as module under apache 2.0.46 ?

PHP and Apache 2 are currently unstable together.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] how to disable html postings?

2003-08-15 Thread Leif K-Brooks
Merlin wrote:

I am wondering how to prevent that users can post html through a form. I
process the form with php and save the date to a db.
There are a couple of sites I have already seen such thing. No matter what
you do, it is not possible to submit html commands.
Thats exacly what I want to do for my site.
Can anybody point me into the right direction on how to disable that?

If you want to display the tags (actually show tag), use 
htmlentities(). If you want to remove the tags, use striptags().

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] Screen Resoultion

2003-08-14 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote:

umm sorry i wouldnt know i've never sold my soul to the devil
 

lol jscript dude , dont get the boyz and girlz started , it would be 
nice if php could do client stuff like asp  --You

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] Screen Resoultion

2003-08-14 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote:

i didnt understand a word of that , please rephrase ??

ASP doesn't do an upload meter by magic. PHP can do anything ASP can do, 
it simply doesn't have built-in features for anything unessential.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] Screen Resoultion

2003-08-14 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote:

how is it possible to send a jscript variable to php thats impossible

It would look something like this (unfinished, using comments instead of 
real code in a few places:

?php
if(!isset($_GET['height'])){
?
script type=text/javascript
!--
var height = //resolution height
var width = //resolution width
document.location.href = document.location.href + ?height= + height + 
width= + width;
--
/script
?php
}else{
 echo 'Your resolution is ', $_GET['height'], 'x', $_GET['width'], '.';
}
?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] what is %s and %d

2003-08-14 Thread Leif K-Brooks
pehepe php wrote:

what is %s and %d   I see these in php tutorials. These are used in 
printing data from database but I don't know why we use %s and %d.  
And is there any expressions like this?  Thank you for your answers.

www.php.net/sprintf

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] How can I load load Additional extensions ?

2003-08-14 Thread Leif K-Brooks
Dennis Lee wrote:

what was wrong ? thanks for any useful words .

Are those extensions in c:\php\extensions?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] Screen Resoultion

2003-08-12 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote:

oh right sure thats easy done , i assumed u meant the variable itself

document.formname.fieldname.value=somevar;

Well, ASP can't do any more in that area than PHP can, nor should it be 
able to.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] Screen Resoultion

2003-08-12 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote:

yeh i'm saying it would be nice , i didnt say can it, i built an image
uploader progress bar class , it had to use javascript with flash as php
has no way of working out how much a file has uploaded where asp can
Luckily, ASP doesn't work by magic. PHP (thankfully) doesn't have 
automatic features for doing everything, but it can be used for 
everything ASP can.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] Re: Globals

2003-08-01 Thread Leif K-Brooks
Greg Beaver wrote:

$GLOBALS does not contain a reference to itself
Yes it does. I just ran the following, and I got Greg is wrong.

?php
$foo = 'Greg is wrong.';
echo $GLOBALS['GLOBALS']['GLOBALS']['GLOBALS']['foo'];
?
--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] I don't understand...

2003-07-31 Thread Leif K-Brooks
Jason Martyn wrote:

Here's kinda what I'm trying to do (not working of course).

[snip unimportant code]

   mysql_query = (select);
   while ($result = mysql_fetch_array($sql_uc, MYSQL_ASSOC)
   {
   mysql_query .= ( . $season ...$result['field_name']. as .$result['display'].,;
   }
   
   mysql_query .= (from .$season.;);

You're trying to assign to a function, seriousley messed up. I reccomend 
you make sure you know PHP before going any further.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] I'm really getting annoyed with PHP

2003-07-23 Thread Leif K-Brooks
Daryl Meese wrote:

One important difference between most windows and linux setups is is case
sensitivity.  Windows sees $x and $X as the same variable but Linux does
not.  so it could be a case issue.
The two OSes do that with /files/, but PHP doesn't rely on the OS to 
check variable names.  PHP is case-sensitive, no matter what OS it's on.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] I'm really getting annoyed with PHP

2003-07-23 Thread Leif K-Brooks
Daryl Meese wrote:

Well, I know I am not running the latest version of PHP but I don't believe
this is accurate.  I believe PHP case sensitivity is based on the os that
processes the file.  Can anyone clear this up.
Correct for files, but variables aren't files.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] I'm really getting annoyed with PHP

2003-07-23 Thread Leif K-Brooks
Beauford.2005 wrote:

It's obvious though that PHP can not handle it.

A poor workman always blames his tools.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] checkbox: was it shown or not?

2003-07-17 Thread Leif K-Brooks
Chris Hayes (SENSE) wrote:

if i understand well, a checkbox in a form is only send on to the next 
page when it is checked: so the next page will only see a value in 
$_POST['checkboxname'] if it is set: else it is not set. Right?

So the followup page cannot see the difference between a form where 
the checkbox was not checked, and a form where the checkbox is not 
even there?
Correct.  This has little to do with PHP, though.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] Too much of $GLOBALS[] a problem??

2003-07-17 Thread Leif K-Brooks
Ow Mun Heng wrote:

This isn't really a Problem but.. is it bad programming practice?? Or I
should just write another function that can return the values/string?
I don't see why it would be, unless you don't like how it looks.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] How to use ph to set meta tags ?

2003-07-15 Thread Leif K-Brooks

I wish to create be able to put in the meta tags value from functions.
How can be done ?
Here is part of the code :

?php
 function mAuthor() {
   $Author = Daniel Szasz;
   return $Author;
 };
?
?

?

HTML
HEAD
META http-equiv=Content-Type content=text/html; charset=windows-1252

 

META NAME=mAuthor CONTENT= ?php echo mAuthor() ? 

/HEAD
/HTML
 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] Unknown Syntax

2003-07-11 Thread Leif K-Brooks
Chris Morrow wrote:

Does anybody recognize this:

!==

with 2 '='

Ive known != to mean not equal to but i'm just looking at someone elses
script and they use this instead. Does anyone know if this works or any
problems with it?
Not identical.  Negative ===.
http://us2.php.net/manual/en/language.operators.comparison.php
--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] Capturing Windows Login Details

2003-07-11 Thread Leif K-Brooks
CPT John W. Holmes wrote:

You can get the username, that's it.

$_SESSION['LOGON_USER']

Don't you mean $_SERVER['LOGON_USER']?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] Question

2003-07-11 Thread Leif K-Brooks
Alvaro Rosales R. wrote:

Hi guys,I am new to PHP and I am writing my forst scripts, so maybe this quesetion 
is a kinda stupid, but it is driving me crazy,  can you tell meHow can I set a line 
break in long line of my code?.

More of a text editor question than a PHP question.  In most text 
editors, just hit the enter or return key on your keyboard where you 
want the line break to be.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] Question

2003-07-11 Thread Leif K-Brooks
Alvaro Rosales R. wrote:

Thank you but ,(I come from microsoft vb world, and line breaks of code could be 
divided with a character(_), so the compiler could parse it and where it finded that 
character  it knew that it was a line break), is there something similar in php?

No.  Just put a line break.

--
The above message is encrypted with double rot13 encoding.  Any 
unauthorized attempt to decrypt it will be prosecuted to the full extent 
of the law.



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


Re: [PHP] How configure PHP parser 4.3.x in IIS version 6.0?

2003-07-09 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote:

I use the dll  php4isapi.dll and it doesn't work, Could someone give me a
hand?
Most of us don't have crystal balls.  What does it do when it doesn't 
work?  How is it set up?  Give us some information!

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] Forms and PHP_SELF

2003-07-05 Thread Leif K-Brooks
Dan Anderson wrote:

Be careful when using PHP self.  Not all servers support it.  If you're
planning on using this script over and over on multiple servers you may
find creating a variable is helpful.
$some_variable = the_script_name.php;

	Then, where you would use PHP_SELF just echo (or whatever)
$some_variable.  You will have to change it if the script name changes,
but otherwise it's just a relative path.
 

Please don't mislead users!  That's plain untrue.  You're correct that 
not all servers have register_globals on, so use 
$HTTP_SERVER_VARS['PHP_SELF'].

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] Forms and PHP_SELF

2003-07-05 Thread Leif K-Brooks
Dan Anderson wrote:

I assure you that server administrators can turn off the variables such
as PHP SELF.  It may not be common but it does happen.
The only way to do that would be editing the PHP source.  That's above 
the IQ of any sysadmin who would want to do that.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] cookie question

2003-07-04 Thread Leif K-Brooks
David R wrote:

Hello,
I have a cookie question.
I have the following code is a file called tc.php

?
global $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $settings, $sql ;
   $val=123;
   setcookie (auth, $val , time() + 3600);
   $cookie = $HTTP_COOKIE_VARS['auth'];
   echo cookie is: $cookie;
?
I have no problem retrieving the value cookie value ( 123 ) on my local
machine but when I post to the internet I can't get the cookie value.
Any ideas why?

Did you set the cookie for the production server domain?  Cookies for 
your local machine won't still be there once you upload, you know.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] cookie question

2003-07-04 Thread Leif K-Brooks
David R wrote:

I have never read anything about a production server domain. How do I set
the cookie for it?
Same way as for the cookie on your local server, but change the cookie's 
domain.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] string modification

2003-07-03 Thread Leif K-Brooks

hi,

i didn't find a function for this in the manual, but maybe there is one (or
a workaround):
does anyone have a solution for replacing multiple whitespaces with a single
whitespace whitin a string? similar to trim(). maybe a regular expression?
eg:
$string = 'word1   word2 word3';
$modified = preg_replace('|(\\s)+|','$1',$string);

$modified = 'word1 word2 word3';
 



--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


[PHP] Extension to MIME type?

2003-07-03 Thread Leif K-Brooks
Is there any way to get Apache's list of extension - MIME type 
associations into an array?  I want to readfile() a file which only some 
users can view for security, but the file types vary from file to file 
so I need to know the MIME type.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] strip white space

2003-07-02 Thread Leif K-Brooks
Steve Buehler wrote:

Another question is this.  The  in wsstrip($str).  Does that mean 
that it takes the input to the function as Global and changes it 
Globally?  I am assuming that because that is what the whole function 
seems to do for me.
No, it means that it passes a reference to the variable rather than the 
value.  In other words, any changes made to the variable in the function 
will change the variable passed in too.  See http://us2.php.net/references

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] print html code

2003-07-02 Thread Leif K-Brooks
Karina S wrote:

Hello,

I want to make a php site which can generate a html code and display it on
the screen. (Display the code itself.)
I use htmlspecialchars() function. It works fine, but now I have to add
about 200 lines of static html code to print it out. If I put all of the
code in a string than it will appear in a single line. (Maybe it works, but
not nice)
How can I easy print out more lines of html code with php?
 

This has nothing to do with PHP, but try putting code and /code tags 
around the HTML.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] print html code

2003-07-02 Thread Leif K-Brooks
Jim Lucas wrote:

You could always use PLAINTEXT at the top of the screen.

And violate every single HTML standard.  AFAIK, plaintext was never a 
real tag.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] print html code

2003-07-02 Thread Leif K-Brooks
In browsers that refuse to follow standards, maybe.  Breaking standards 
is a bad thing.
Jim Lucas wrote:

So what, it would do what was requested.  :)

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


  1   2   3   4   5   6   >