Re: [PHP] basename()

2001-08-21 Thread Renze Munnik

On Mon, Aug 20, 2001 at 03:42:34PM -0400, Gerard Samuel wrote:
> $file = basename ($path);
> $file = $file.php3;
> 

You might want to consider using,

$file = basename ($path);
$file = "$file.php3";   // <-- !

instead, if you don't like warnings.

$file = $file.php3

isn't the way to do it! You _could_ use

$file = $file.".php3";

though.

-- 
* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Date Functions

2001-08-20 Thread Renze Munnik

On Mon, Aug 20, 2001 at 12:12:15PM +0100, Peter Allum wrote:
> I am using PHP 4, I have a date which I am adding to a MYSQL db, I have that
> bit sorted, I am trying to calculate an 2 expiry dates, one that is 1 year
> and 11 months ahead of the 1st date and another that is 2 years ahead of the
> 1st date.
>
> Any Ideas, I have seen lots of scripts for adding days but not months or
> years.
> Thank you in advance for your reply


Peter,

For the first date:
-
  $month = date("m") + 11;
  $day = date("d");
  $year = date("Y") + 1;
  $newDate = date("Y-m-d",mktime(0,0,0,$month,$day,$year));

or

  $newDate = date("Y-m-d",mktime(0,0,0,date("m")+11,date("d"),date("Y")+1));
-

And for the second date:
-
  $month = date("m") + 11;
  $day = date("d");
  $year = date("Y") + 3;
  $newDate = date("Y-m-d",mktime(0,0,0,$month,$day,$year));

or

  $newDate = date("Y-m-d",mktime(0,0,0,date("m")+11,date("d"),date("Y")+3));
-

And that's all you need!


--
* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Unix vs PC test for server

2001-08-16 Thread Renze Munnik

On Thu, Aug 16, 2001 at 09:57:20PM +0700, Paul S. wrote:
> I design a website on a PC, and upload it to UNIX. Of course, there are
> always one or two variables that I have to keep track of as to
> whetherteh server is UNIX or PC. There MUST be a simple way to test
> 
> if (the OS is Windows) {
>  $siteurl = "http:// www.website.com/ ";
>  $mysqlpasswordfilelocation = " ... outsideroot.txt ";
> }else{
>  $siteurl = "http://127.0.0.1/";;
>  $mysqlpasswordfilelocation = " ...outsideroot.txt  ";
> }
> 
> ???


Paul,

You could check one of the following variables:

  $HTTP_SERVER_VARS{"OSTYPE"}
  $HTTP_SERVER_VARS{"SERVER_NAME"}
  $HTTP_SERVER_VARS{"SERVER_ADDR"}
  $HTTP_SERVER_VARS{"HTTP_HOST"}
or
  $HTTP_SERVER_VARS{"DOCUMENT_ROOT"}

Check phpinfo(), it gives some really usefull info.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Fussy logic...

2001-08-16 Thread Renze Munnik

On Thu, Aug 16, 2001 at 10:38:56AM +0200, Tribun wrote:
> yapp.
> 
> I know the JS-function, but I was curious if someone knows an beautifuller
> solution.
> 
> something neater ;)


Okay... Well... then you should store the history yourself (eg. in a
session or db). But then again... the $HTTP_REFERER isn't something
to rely on. So then you'll need to store the current page in the
history session/db. That way you always have the correct URL because
it's the URL of the page the user is using. How much can go wrong
with that?
I think that's the best way. Actually I think it's even (a lot)
better then the JS solution I mentioned.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Fussy logic...

2001-08-16 Thread Renze Munnik

On Thu, Aug 16, 2001 at 10:01:36AM +0200, Tribun wrote:
> Moin!
> 
> Has anybody already thought about the problematic conditional on adding an
> automatic "BACK" Link?
> 
> It seems to be very easy... just Link to basename($HTTP_REFERER);
> 
> BUT if you CLICK on this Link, and come to a prior site, the BACK-Link THERE
> appears NOT to the PAGE, witch was prior this, but is linked to the Site you
> come from...
> so the link should better be called "FORWARD".
> 
> Do U C the problem???
> 
> ;)
> 
> Has someone an idea to solve it?
> 
> 
> Sincerely yours,
> Patrick Lehnen (alias: Tribun)


Patrick,

It's pretty obvious that after using it once it becomes a forward
link because the HTTP_REFERER is the page you last came from. And
after using the back-button once, the last page was the 'next'. The
HTTP_REFERER isn't some kind of history-list.
If you realy want to go Back, why not use:
JS: history.back(...);

That way you really use the history-list of the browser. So after
using it once, it's still a Back-button instead of a Forward-button.

Besides that, using the $HTTP_REFERER isn't really something to rely
on. $HTTP_REFERER doesn't always have to be set. In that case you
can't go either Back nor Forward.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] session security issue

2001-08-16 Thread Renze Munnik

On Wed, Aug 15, 2001 at 10:52:33PM -0300, Christian Dechery wrote:
> >$HTTP_SERVER_VARS{"SSL_SESSION_ID"}
> >
> >Another thing I found with phpinfo() is
> >$HTTP_SERVER_VARS{"UNIQUE_ID"}. I don't know (yet) was it is, but it
> >sounds usable, doesn't it?
> 
> sure it does... but first we need to know exactly what it is anyone?

Well I don't... but I _do_ know it's _really_ unique. It's never
the same. So actually I don't really know what to do with it.
Although probably at some time something will come up where one
would need it. I think.
To be short... FAIK it's exactly what's called: a unique ID.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] could i get a clue?

2001-08-16 Thread Renze Munnik

Robert V. Zwink wrote:
> This particular application is designed to assist someone working on data
> entry, and is currently in production.  She inputs 100's of mail-in reply
> cards into a database using a php webpage.  The first field of the form is
> for the email address listed on the reply card.  If the email address is
> already in the database, the person doing data entry will see an image of a
> red light, if the email address is not in the database the person doing data
> entry will see an image of a green light.  Kind of weird, true, but exactly
> what she wanted.  Why should the person doing data entry have to type in
> email address, mailing address, first name, last name, etc. just to get an
> error saying duplicate entry found?  This way she can choose to replace the
> record or just skip it depending on the results (red or green).  The
> changing image increases her productivty by decreasing time spent inputing
> duplicate data.
>
> And also is one possible answer to the question, "How do I access php from
> JavaScript".
>
> I fail to see how this is a "horrible construction".  Solves a problem with
> minimal input from user, quickly, and completely.  How is this horrible?
> Its a functional tool, that is used ever day with 0 complaints.
>
> Horrible?
> Inigo: "You keep using that word. I do not think it means what you think it
> means."



Michael Geier wrote:
> No it's not.
> First one is changing the address of the current window.
> Second one is a popup window leaving the first one intact.
>
> Just semantics.


A question for the both a you: Did either one of you actually _READ_
my message completely? No.

Michael... I said "same _KIND_OF_ construction". I didn't say it's
exactly the same. Kind of you to tell me thing I already know, but
it doesn't change anything. It still is the same _kind_of_
construction. Like I wrote before; you redirect someone to a
different page. And whether you do that in the same window or in a
window that pops up makes no change to that. The user still goes to
a different page for the result of the referenced PHP-script.

And Robert... Seems like a pretty cool application you got there and
for what you're doing there, the images _are_ a good solution. You
want the 'light' to switch from green to red depending on a db-query
in a different PHP-script. And it does, without the user having to
leave the page. Smart!
But like a wrote before; if you're not using any images on your
page, it's not a nice solution. Then one should put images on a page
where he/she doesn't want any images. And, like I wrote, then you
get the Sitestat/Nedstat kind of constructions where you have to put
a transparent image from 1x1 pixel on the page. That's not the way
to do it.
And why wouldn't I know what horrible means? Because I keep using
that word? Wow... then you must have absolutely no clue of what
words like 'is' and 'the' mean. Yes, I know... this doesn't make
sense... Neither does your remark (...)

--

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] could i get a clue?

2001-08-15 Thread Renze Munnik

On Wed, Aug 15, 2001 at 10:20:39AM -0400, Robert V. Zwink wrote:
> 
> // Besides that... what if I want to do some _serious_ processing
> // instead of 'drawing' an image?
> 
> Actually you just readfile an existing image, how much processing does that
> involve?  Not too much.

I didn't say that your construction doesn't work, but it's not the
way to develop your sites. By using horrible constructions you can
make 'good-working' site, but that doesn't make it a good site. You
should always avoid using such terrible constructions. I mean... why
creating an image if you never intended to do anything with images?
Just because you want to have some weird construction on your site
and you can't think of anything else, soon enough?

> 
> // The popup is the same thing as I said. You just redirect to a
> // different (PHP-)page. So... nothing new!
> 
> For future reference:
> 
> window.location.href="myscript.php"
> 
> !=
> 
> window.open('./myscript.php','mywindow','width=400,height=400,scrollbars=yes
> ')

It's the same kind of construction. You redirect the user to a completely
different page.


> 
> No offense intended,

None taken... and none intended...


-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] could i get a clue?

2001-08-15 Thread Renze Munnik

On Wed, Aug 15, 2001 at 09:44:58AM -0400, Robert V. Zwink wrote:
> I don't think this is the "only possible way".  I have used an html IMG tag,
> then created something like a rollover effect that called a php file for the
> image.  It was kind of like a stop light, the light was off until focus came
> off of a particular form element, javascript then updated the image href
> with a few extra arguments, then the light turned green or red.
> 
> You can also use a javascript popup window to call a php script.  I'm sure
> there are a few ways to do this too.


Hmmm, yeah... Way-2-go!

The popup is the same thing as I said. You just redirect to a
different (PHP-)page. So... nothing new!

And for your other solution. Very usefull. Especialy when you don't
have images on your page! What are you gonna do then? Create an
image from 1x1 that's transparent or something? Can't get any worse.
That's the SiteStat/Nedstat style. Awful!
Besides that... what if I want to do some _serious_ processing
instead of 'drawing' an image? Then, if I use your solution, I
always have to create (or redirect to) an image. Not to way to do
it!

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] error

2001-08-15 Thread Renze Munnik

On Wed, Aug 15, 2001 at 02:08:39PM +0200, Alexander Wagner wrote:
> Eduardo Kokubo wrote:
> > Hi,
> > How can I change this error message to my own message?
> > Warning: fopen("publico/d/bibliografia.html","w+") - No such file or
> > directory
> 
> There are two possibilities:
> 1) Use @fopen() instead of fopen(). This will supress the error-output. 
> If fopen returns false, you still know something went wrong. You don't 
> know what went wrong, though (permission, file doesn't exist...).
> 2) Use output-buffering. This way, the error-message will not be sent 
> to the browser but remain in the buffer. Just look into the buffer if 
> there is an error and react. Also, you should erase the error-message 
> from the buffer.

3) Write your own error-handler:
   http://www.php.net/set_error_handler

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Onclick and PhP

2001-08-15 Thread Renze Munnik

On Wed, Aug 15, 2001 at 11:56:42AM +0200, Flugel wrote:
> Is it also possible for the output of that php-page (MySQL query) to be
> displayed in a layer on the page where the button is located?


Should be... But unfortunately I don't have enough time to figure it
out for you at the moment. Sorry!

-- 

* R&zE:

-- »»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Onclick and PhP

2001-08-15 Thread Renze Munnik

On Wed, Aug 15, 2001 at 11:45:03AM +0200, Flugel wrote:
> When a page is loaded the php code is being executed, is this also possible
> for an onclick event? If so how do I do that?
> 
> tnx!


No. PHP is server-side, not client-side like onclick (JS). The only
way to do things like that is:

onclick="window.location.href='blahblahblah.php';"

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] session security issue

2001-08-15 Thread Renze Munnik

On Tue, Aug 14, 2001 at 02:32:03PM -0700, David Price wrote:
> Sean,
> 
> That is a very interesting suggestion.  How would you call that using PHP?
> 
> Thanks,
> 
> David Price


$HTTP_SERVER_VARS{"SSL_SESSION_ID"}

Another thing I found with phpinfo() is
$HTTP_SERVER_VARS{"UNIQUE_ID"}. I don't know (yet) was it is, but it
sounds usable, doesn't it?

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] could i get a clue?

2001-08-14 Thread Renze Munnik

On Tue, Aug 14, 2001 at 10:18:18AM -0500, marilyn manson wrote:
> ok a basic question. perhaps I dont know enough about javascript but
> anyway..
> 
> I want to call a php script from javascript. Anybody have any hints for me?
> A link to a useful website would work as well. thanks mates
> 
> -student of computer science

FAIK the only possibility is to redirect to the PHP script. Then
you'll get something like:

window.location.href="myscript.php";

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] session security issue

2001-08-14 Thread Renze Munnik

On Tue, Aug 14, 2001 at 08:42:22AM -0300, Christian Dechery wrote:
> I have pages that uses session for security that looks something like this:
> 
>session_start();
> 
>   if( !isset($uid) )
>   {
>   include("include/auth.inc.php");
>   auth_user();
>   }
> 
>   more code...
> ?>
> 
> so $uid tells me if the user is logged on or not...
> 
> but what if somebody calls the script directly from the address bar like 
> this: http://server/script.php?uid=10
> 
> wouldn't this be a security problem?


Christian,

This can indeed be a security issue. Try using
$HTTP_SESSION_VARS{"uid"} instead. It's a saver solution. Then one
cannot just use ?uid=10 in order to fool you. At least, not in that
way.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Re: prob with session start

2001-08-14 Thread Renze Munnik

I think I know what it is. The construction I mentioned to avoid the
reloading used three pages to login: the login-page, the validation
page and then some page that produces output to the user.
What you do, is include that output page in the validation page
(authentication.php). You shouldn't do that. Instead of the
include('super.php') you should use header("Location: super.php")
and instead of include('ordinary.php') you should use
header("Location: ordinary.php"). If you include
super.php/ordinary.php you still don't leave authentication.php.
That means that one can still reload authentication.php. Then the
browser asks for resubmitting the form. If you use header() instead
of include() you actually leave authentication.php and go to a
different page. The user can ofcourse reload that page, but that
page wasn't actually the result of a form-submital so the page will
then just be reloaded and no information will be resubmitted. Even
if one pushes Back from that page, he/she will not go back to
authentication.php but to login.html. And gone is your problem.

I think this should be your solution...


Oh... btw:

in authentication.php:
  session_register('$emp_id');
should be:
  session_register("emp_id");

and in logout.php:
  session_unregister($emp_id);
should be
  session_unregister("emp_id");

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] session_questions() part IV

2001-08-14 Thread Renze Munnik

On Mon, Aug 13, 2001 at 05:59:42PM +0200, Aniceto Lopez wrote:
> Renze asked:
> "how would you detect whether or not someone has
> closed his browser? (session is over then)"
> 
> Do I realy need to know this to let or not a registered
> user navigate some restricted web pages?
> 
> 
> Aniceto Lopez


That question was just a small part of my message. I was explaining
that you don't need to destroy the session when someone closes the
browser.
You were asking if you needed to take some action if the browser
closes. But you never can tell when it closes. That's why I
mentioned (not really asked) how you thought to detect the browser
closing.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] session_start() part III

2001-08-13 Thread Renze Munnik

On Mon, Aug 13, 2001 at 05:39:47PM +0200, Aniceto Lopez wrote:
> I guess Renze, I have to use session_start() in the file where
> I want to output data from the session
> 
> All this questions about session are generated because I want
> to control the acces to some of the web pages in a site so only
> accesible to registered visitors.
> 
> Ok name user and password are stored in a db (mysql), after
> password verification sesion is started, temporal storage of  some
> values (PHPSESSID i.e.) and I guess in the begining of every
> restricted page this temporal info shoul be checked to make the
> page visible or not but if the visitor closes the browser the sesion is
> over, session_destroy is this necessary?
> 
> thanks
> 
> remind me to invite you to have a beer next time you come to barcelona


Yes, indeed, you do have to use session_start() on each page you
want to use the session-info. And no, you don't need
session_destroy() when the user closes the browser. The session is
ended automatically then. And btw, how would you detect whether or
not someone has closed his browser?

Hope this was an answer to your question...

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] session_start() part II

2001-08-13 Thread Renze Munnik

On Mon, Aug 13, 2001 at 04:57:08PM +0200, Aniceto Lopez wrote:
> ok, let's have this in the right place
> in a file named startsesion.php i.e.
> 
> session_start();
> session_name("mysesion");
> session_register("myvar");
> $myvar = "whatever";
> 
> a SID is generated autmaticaly
> 
> 
> I've been trying to echo the values of the var defined
> and the SID generated in another php file
> 
>  not working
>  not working
>  not working
>  not working
> 
>  not working
> 
> how can I get this values?
> 
> thanks, gracias


Did you use session_start() in the file where you try to output data
from the session?

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] How to get the query string?

2001-08-13 Thread Renze Munnik

On Mon, Aug 13, 2001 at 03:06:48PM +0200, Tamas Bucsu wrote:
> hi guys,
> 
> I'd like to get the query string the browser sends to the script. The problem is 
>that since the $HTTP_POST_VARS (or $HTTP_GET_VARS ) is an associative array I can't 
>use numbers to point to the elements of this array. This piece of code does not work:
> 
> for ($a=1;$a<=sizeof($HTTP_POST_VARS);$a++){
>  echo "$a. ".$HTTP_POST_VARS[$a]."";
> }
> 
> Please help
> 
> Tamas Bucsu


For the complete query-string: $HTTP_SERVER_VARS{"QUERY_STRING"}

Eg.: http://www.some-domain.com/index.php?one=xxx&two=yyy

$HTTP_SERVER_VARS{"QUERY_STRING"}: "one=xxx&two=yyy";


But you can also use:
$HTTP_GET_VARS{"one"} and $HTTP_GET_VARS{"two"}, etc:

$HTTP_GET_VARS{"one"}: "xxx";
$HTTP_GET_VARS{"two"}: "yyy";


Or you can use:
$one and $two, etc.

$one: "xxx"
$two: "yyy"

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




[PHP] Re: prob with session start

2001-08-13 Thread Renze Munnik

On Mon, Aug 13, 2001 at 04:33:49PM +0530, Balaji Ankem wrote:
> Hi! friend,
> I want to start session if authentication is succesfull means if he is a valid 
>user.
> Then what i have to do Renze??
> 
> Thanks in advance. 
> 
> With warm regards
> -Balaji


I think (haven't got time to test it) you should move the two
header()-lines down. Just put them right before you want to sent
some output. Or, ofcourse, right behind the session_start().
Think that should do the job.
You just have to keep in mind, that no output should be sent before
you try to send headers and that session_start() should be as close
as possible to the start of your script.


-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] plz check the warning message

2001-08-13 Thread Renze Munnik

On Mon, Aug 13, 2001 at 02:01:59PM +0530, Balaji Ankem wrote:
> Hi! Renze,
>  Thanks a lot for u'r help. I am in vacation up to now.
>   Now i am trying with u'r solution. I am getting the following error.
> I am sending the file also.
> 
> Warning: Cannot send session cache limiter - headers already sent in 
>c:\www\authentication.php on line 34
> 
> 
> File:authentication.php
>  header ("Cache-Control: no-cache, must-revalidate");
> header ("Pragma: no-cache");
> 
>   error_log ("emp_id: $emp_id", 0);
>   error_log ("Lastname: $emp_pass", 0);
> 
> // Connect to MySQL
> 
> mysql_connect( 'localhost', 'balaji', 'pingpong' )
> or die ( 'Unable to connect to server.' );
> 
> // Select database on MySQL server
> 
> mysql_select_db( 'imac' )
> or die ( 'Unable to select database.' );
> 
> // Formulate the query
> 
> $sql = "SELECT * FROM employee WHERE
> emp_id = '$emp_id' AND  emp_pass = '$emp_pass'";
> 
> // Execute the query and put results in $result
> 
> $result = mysql_query( $sql )
> or die ( 'Unable to execute query.' );
> 
> // Get number of rows in $result.
> 
> $num = mysql_numrows( $result );
> 
> if ( $num != 0 ) {
> // A matching row was found - the user is authenticated.
> session_start();
> session_register('$emp_id');
> 
> $row = mysql_fetch_object($result);
> 
>   if ($row->user_type=='S')
>   {
>   include('super.php');
> 
>   }
>   else if ($row->user_type=='O')
>   {
>  include('ordinary.php');
> 
>   }
>   }
> 
>   else
>   {
>file://User does not exist or not authenticated.
>echo 'Authorization Required.';
>file://header( 'WWW-Authenticate: Basic realm="Private"' );
>file://header( 'HTTP/1.0 401 Unauthorized' );
>exit;
>  }
> 
> ?>


Well... You can't sent any headers after some output has already
been sent. I didn't take a very good look at your code, but looking
at the warning you get and the position of session_start() in your
code, I'd say you have to move the session_start() up. You can best
start your code with session_start() and then the rest of your
script.


-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Having my script login to a secure area of another site.....

2001-08-13 Thread Renze Munnik

On Fri, Aug 10, 2001 at 03:24:07PM -0700, Evan Nemerson wrote:
> Try messing with the query string, and emulate a GET request. For instance
> 
> $uri = "http://www.somewhere.com/secure.php?username=bob&password=linuxrocks";;
> $theFile = implode("\n",file($uri));
> echo $theFile;

Using/emulating GET for security isn't realy a very smart thing to
do. Everyone can just use the URL as you show it. Using POST isn't
completely waterproof either, but at least you don't just give a way
your security information.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Meta Tags and Regular Expressions

2001-08-13 Thread Renze Munnik

On Fri, Aug 10, 2001 at 01:29:26PM -0400, Kyle Mathews wrote:
> Hello:
> 
> I'm looking for a good way to pull information from a static HTML file for
> dumping into a database.
> I need to pull the information from a META tag, and from within two comments
> in the HTML file.
> I know this can be done with regular expressions, but I'm not really sure
> where to start or how to do it.
> 
> 
> 
> I need to pull the CONTENT information from this META tag.
> 
> 
> 
> Story contents
> 
> 
> 
> Then pull the information from between these two comments.
> 
> Any help, and/or example code would help a lot.


This is for an exact match of your example above:
preg_match ("/]+CONTENT=\"([^\"]+)\"/", $string, $matches)

If you don't know if it's in upper and/or lower case:
preg_match ("/]+content=\"([^\"]+)\"/i", $string, $matches)


-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] RE: help, weird include problem with functions

2001-08-10 Thread Renze Munnik

On Fri, Aug 10, 2001 at 08:22:57AM -0400, Jaxon wrote:
> Renze,
> 
> I found that it works if I pass only a variable or a path in, not both.
> 
> e.g.  opendir("/path/to/foo") works
>   opendir("$variable") where variable contains "path/to/foo" also works
>   opendir("$somevar/some/path") does NOT work.
> 
> go figure.
> 
> cheers,
> jaxon


Ehhh Weird!

I really start believing that it's either the directory you use in
$somevar that's wrong, or that the permissions are wrong. I have no
troubles wse with the constructions.
It doesn't matter if I only type the path, or that I put the whole
path in one variable or that I use both a variable and a (part of)
the path. The result is exactly the same.  (as it should btw).

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] plz check the warning message

2001-08-10 Thread Renze Munnik

On Fri, Aug 10, 2001 at 04:42:48PM +0530, Balaji Ankem wrote:
> Is there anyway to restrict the reposting?? Means after pressing
> logout button we shouldn't allow the user to go back or reposting
> the data again and getting session again.


Okay... I've figured out two 'solutions'. But... I must say: They're
not pretty. Actually you can't prevent it. But:

Option 1

You can set a cookie after logging in. The authorization page should
check for that cookie. It should not exist in order to login. The
login page (where one gives his username/password) should remove
that cookie if it exists.
This is, though, a _very_ ugly solution and using cookies for
security isn't realy the best thing to do. So actually I wouldn't
encourage you to use this.

Option 2

Another solution is to redirect to a different page. I created the
following example:

=[ PHP code ]=
// File: login.php

 
  Login Test
 
  
 
  
   
   
   
   
  
 



// File: submit-login.php


// File: logged-in.php
/* Whatever you want! */

=[ end of code ]=

After pushing the submit-button, the data will be submitted to
submit-login.php. There you handle the login-procedure. After that,
you automatically redirect to a different page (logged-in.php in my
example). That's you you show eg 'You are logged in now'. If you
reload that page, nothing realy happens. If you push 'Back', you end
up on login.php again.

Uptil now this is the best option I've come up with.

Hope it works for what you had in mind.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] plz check the warning message

2001-08-10 Thread Renze Munnik

On Fri, Aug 10, 2001 at 04:42:48PM +0530, Balaji Ankem wrote:
> Hi, Munnik,
> I am starting the session if authentication is successful and i am closing the 
>session whenever user click on logout button.
> Here in my case authentication is succesfull and session is started. And i checked 
>the c:\tmp directory. session file is there.
> But it is not closing the session without starting a session again before closing.
> I did as u told it works perfect. Thanks alot.
> Why we have to start again another session before closing.

Well... you don't actualy start another session before closing. The
call to session_start() starts a session or resumes one:

=[ PHP Manual ]=

"session_start() creates a session (or resumes the current one based on
the session id being passed via a GET variable or a cookie)."

=[ end ]=

> 
> One more doubt..after logging out (it closed the session) and i pressed the back 
>button in browser It has given 
> Warning.page expired. I pressed Refresh button It asked do u want to repost the 
>values again. I pressed retry button. It posted the values again and created session 
>again...
> 
> Is there anyway to restrict the reposting?? Means after pressing logout button we 
>shouldn't allow the user to go back or reposting the data again and getting session 
>again.

I don't know (yet)... I'm gonna try to find out. I'll let you know.


-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] plz check the warning message

2001-08-10 Thread Renze Munnik

On Fri, Aug 10, 2001 at 04:08:19PM +0530, Balaji Ankem wrote:
> Hi, munnik,
> 
>   thankyou for u'r help.
> 
> I am getting the following warning while closing session.
> 
> 
> Warning: Trying to destroy uninitialized session in c:\www\logout.php on line 3
> session closed for 85744 
> 
> 
> Plz do the needful. I am sending the following files.
> 
> 
> 
> logout.php
> 
>  session_unregister(emp_id);
> session_destroy();
> echo "session closed for $emp_id";
> ?>
>  (...) 
> 


I just gave a quick look, but I think you forgot (or didn't know to)
add session_start() to your code. So it will be:




Otherwise you don't have any session to destroy...


-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] plz check the warning message

2001-08-10 Thread Renze Munnik

On Fri, Aug 10, 2001 at 02:44:09PM +0530, Balaji Ankem wrote:
> 
> Warning: Cannot send session cache limiter - headers already sent (output started at 
>c:\www\authentication.php:2) in c:\www\authentication.php on line 38
> 


I don't know what's in authentication.php, but I do know that -like
the warningmsg says- you try to send headers while on line 2 you've
already sent some output (echo, print, whatever).
You'll have to put the session_start() before your output.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] problem with session start

2001-08-10 Thread Renze Munnik

On Fri, Aug 10, 2001 at 01:58:54PM +0530, Balaji Ankem wrote:
> Hi Andrew,
>Thankyou now it is working well.
> I would like to close the session after clicking logout button.
> How to do?
> 
> Thanks inadvance.
> Regards
> -Balaji


session_destroy();

http://www.php.net/manual/en/function.session-destroy.php


-- 

* R&zE:

-- »»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Printing

2001-08-09 Thread Renze Munnik

On Thu, Aug 09, 2001 at 06:39:59PM +0100, Fernando Avila wrote:
> Hello php-general,
> 
>   I made a system in php and mysql for a corp.
> This system controls the payment of the customers, so i need to print
> the quote of each payment. Is there anyway to do this with php?
> I mean.. Printing quotes from a web browser, besides that i also need
> something to print from this system, but in this case the monthly
> resume of each customer's account.


Using PHP you can't print client-side. Either the user should press
the print-button (just like elias already mentioned), or you should
use JavaScript (window.print()).

-- 

* R&zE:

-- »»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] RE: help, weird include problem with functions

2001-08-09 Thread Renze Munnik

On Thu, Aug 09, 2001 at 01:15:41PM -0400, Jaxon wrote:
> hmm...yes, it does work, I jumped the gun on the simple example, cuz I
> thought it was an echo problem..
> my un-simplified example has an opendir() in function foo() file.
> 
> 
> function.php is:
>function foo{
>   global $bar;
>   echo "$bar from foo"; //this is working
>   $handle=opendir("$bar/common/"); // I get a "OpenDir - no such file or
> directory"
>   //some more stuff here to handle directory maniuplaion
>   }
>   foo();
> ?>
> 
> so the simple example does indeed work, but the opendir() is choking trying
> to deal with the variable.
> 
> hmmm...
> 
> jaxon
> 


Are you sure the directory you try to open actualy exists?

Btw... for things like this you better use:

if (!($handle = opendir ("$bar/common/"))) {
  // Some error here, and don't try to use $handle after this!
}

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] correct date (cont.)

2001-08-09 Thread Renze Munnik

On Thu, Aug 09, 2001 at 01:08:33PM -0400, [EMAIL PROTECTED] wrote:
> Oops..(Hit send prematurely.)
> 
>   $currentmonth = date("m");
>   $currentday = date("d");
>   $year = date("Y");
>   $newmonth = $currentmonth + 3;
>   if ($newmonth > 12){
> $newmonth = $newmonth % 12;
> $year = $currentyear + 1;
>   }
>   $3months = date("Y-m-d",mktime(0,0,0,$newmonth,$currentday,$year));
> 
> This should get me exactly 3 months later and also checks for if its a later 
> month (oct, nov, or dec) then it goes to the next year.  How could I check to 
> see if the new date doesn't fall on Feb. 30th or whatever?  If someone signs 
> up on the 31st of a month it'll never end on a month with 31 days.
> 
> Thanks,
> Pat
> 

Nothing to worry about... PHP does it for you. You can try it you
know... Just use:

$currentmonth = 2;  /* feb */
$currentday = 31;
$year = 2001;  /* eg */

The output will then be:

2001-03-03

Ain't that most excellent?!?!

I should tell you though... that:

$3months = date("Y-m-d",mktime(0,0,0,$newmonth,$currentday,$year));

doesn't work. Obv. you haven't tried it. It produces an error (and
no date). Your variable name cannot begin with a number.

= PHP Manual =
A valid variable name starts with a letter or underscore, followed by
any number of letters, numbers, or underscores. As a regular expression,
it would be expressed thus:
'[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
= =

So I'd say: $threeMonths.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] correct date

2001-08-09 Thread Renze Munnik

On Thu, Aug 09, 2001 at 01:05:14PM -0400, [EMAIL PROTECTED] wrote:
> I am making a site where people get 3 free months from when they register.  
> In a table I have 2 different fields; 1 for when they register, and another I 
> want exactly 3 months later.  I have this code:
> 

I don't think that works :-)

-- 

* R&zE:

-- »»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] RE: help, weird include problem with functions

2001-08-09 Thread Renze Munnik

On Thu, Aug 09, 2001 at 12:48:38PM -0400, Jaxon wrote:
> oh, this still happens when I fix the missing () in the foo declaration :)
> 
> cheers,
> jaxon
> 


Works fine, no problems at all!

Are you sure function.php is included at all? Because if the only
problem would be $bar, the output would at least be:

someval from page.php
from foo

Like I said... I don't have any problems with it. The output is:

someval from page.php
someval from foo

(and all this without any errors or warnings!)


Pretty much what you'd expected...

-- 

* R&zE:

-- »»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] checking for null form fields fails

2001-08-09 Thread Renze Munnik

On Wed, Aug 08, 2001 at 09:14:56AM -0700, Bjorn Van Simaeys wrote:
> Hey Renze,
> 
> 
> Don't you think that checking too much is useless and
> takes a bite out of your performance too? Don't waste
> your time.
> 
> 
> Greetz,
> Bjorn Van Simaeys
> www.bvsenterprises.com


That's right... Checking _too_much_ is useless. But you let me how
you check too much? Checking whether or not a variable is set
doesn't take any performance. Getting errors and warnings... that
sucks. Some guy worked at this company who -we found out- hardly
ever checked the results of his db-calls... just because that
wouldn't look nice in his code. I mean... what kind of a person are
you then. You won't believe how many errors and warnings his code
produces.
If you use functions calls and don't check the returnvalue(s) your
just asking for trouble. And come on... tell me how much performance
it takes to see whether or not the returnvalue is true or false
after a db-function that takes up about 5 or 6 seconds. Then you're
gonna complain about the performance you lose by checking if that
db-function succeeded?
Tell me... you have any warnings and/or errors logged to your
logfiles? Or do you have the errorreportinglevel set to absolute
nothing? You ever check if anything goes wrong? How the h*ll can you
guarantee functionality of your site?

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Bug?

2001-08-08 Thread Renze Munnik

On Wed, Aug 08, 2001 at 07:18:26PM +1000, ReDucTor wrote:
> if you use
> echo (float)((8.85-8)*100);
> it works because 8.85 go's to 0.85 and times that by 100, and you get 85
> which is what you get...


Maybe you've heard about dynamic pages and stuff...

Say:

$a = 8.85;
$b = 8;
$c = 100;

$result = (int)(($a-$b)*$c);

And you know... we need an integer. Let's say for inserting into a
db or so. Then it doesn't help converting it to float, does it? I
mean... ofcourse in the above example it returns the correct result,
but let's just change it a bit:

$a = 8.8512;
$b = 7.1237;
$c = 100;
$result_i = (int)(($a-$b)*$c);
$result_f = (float)(($a-$b)*$c);

See the diff between $result_i and $result_f? And if you realy need
an integer, $result_f isn't realy what you're looking for.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Bug?

2001-08-08 Thread Renze Munnik

On Wed, Aug 08, 2001 at 07:06:13PM +1000, ReDucTor wrote:
> you must use float not int :D

Using float doesn't solve the problem, does it? Point is that when
using int, the damn thing doesn't get it straight. And that's WEIRD.
I mean the result of (8.85-8)*100 is already an integer and not
converting it to an integer the result is perfectly okay.

Btw: (int)((8.85*100)-(8*100)), _does_ return a correct result.

-- 

* R&zE:

-- »»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Passing HTTP_POST from one script to another

2001-08-08 Thread Renze Munnik

On Tue, Aug 07, 2001 at 11:27:51PM +0500, Vikram Vaswani wrote:
> Hi,
> 
> 'nother question: if I have a form which submits data in POST to script
> "a.php", and I now want to pass this POSTed data to "b.php" - how do I do
> this?
> 
> I have tried the technique of iterating through $HTTP_POST and
> concatenating the key-value pairs into a GET URL, which works perfectly.
> However, I would like to pass the data from a.php to b.php as POST data, in
> the HTTP_POST array itself - is this possible, and how do I do it?
> 
> Thanks!
> 
> Vikram
> --
> I wouldn't recommend sex, drugs, and insanity for everyone, but it works
> for me.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


Try using sessions. Put the values/variables from $HTTP_POST_VARS
into the session and then U can use 'm again on b.php.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] user's ip

2001-08-08 Thread Renze Munnik

On Wed, Aug 08, 2001 at 12:45:32PM +1000, Chris Birmingham wrote:
> I would use
> 
> $HTTP_SERVER_VARS["REMOTE_ADDR"]
>  or
> $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]
> 
> to return the IP address..
> 
> I have seen, people using if($ip == $REMOTE_ADDR) { // do whatever }
> but in some configurations of PHP this can be a bad thing..
> 
> index.php?REMOTE_ADDR=10.0.0.1 would override the variable $REMOTE_ADDR (in
> SOME configurations)
> 
> Its probably alot harder for a malicious user to fake the HTTP_SERVER_VARS
> array than just a normal variable.
> 
> Just my .02c :)
> 
> Regards
> 
> Chris


You could not be more right!

Always use stuff like $HTTP_SERVER_VARS, $HTTP_POST_VARS, etc. It's
the savest/best way!

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [Re: [PHP] user's ip]

2001-08-08 Thread Renze Munnik

On Wed, Aug 08, 2001 at 12:52:42AM +0100, Andreas D. Landmark wrote:
> 1) proxies should cache dynamic content
> 2) proxies should not retrieve from cache if the request is a force-refresh
> 3) proxies should not cache any content which URL includes "?"
> 
> Sounds like you've got yourself a poor proxy there, I've certainly never
> seen any problem with developing through my proxy, apart from those pesky
> doubleclick ads seem to disappear wonder why...

Main word here is 'should'. Because they do. Ever searched for
headers you can sent for forcing no caching. The one thing you
always find is things like 'they should use this header, but they
don't' or 'one proxy only looks at the headers, others only look at
the contents'. I know how proxies _should_ work, but it turn's out
that there are -to quote you- many "poor proxies". And I won't say
that mine isn't one of 'm. But hey... I'm a programmer, not a
system-administrator and stuff like the proxy isn't realy my thing.
I know how they should work and I know we have one. But I also know
(out of experience and theory) that proxies (just like browsers btw)
don't always stick to the standards.
And ehhh... I hardly use URL's including "?". You know... that's the
beauty of sessionhandling. You don't need those ugly URL's anymore.

But... besides proxies one also uses a browser for
Internet-applications. And eventhough you can disable caching and
history and stuff, those damn things _do_ remember things from the
past and they think it's realy convenient to use that. It's quicker
dude! Yeah, well: fuck it! I don't want it to be quicker... I want
it to be right.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] checking for null form fields fails

2001-08-08 Thread Renze Munnik

On Wed, Aug 08, 2001 at 10:06:51AM +0200, Renze Munnik wrote:
> (...)
> checks the returnvalue of printf() and stuff (another thread in this
> list).

oops... it's the same thread...

I NEED COFEE!!!

-- 

* R&zE:

-- »»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] checking for null form fields fails

2001-08-08 Thread Renze Munnik

On Tue, Aug 07, 2001 at 09:26:48AM -0700, Mark Maggelet wrote:
> 
> This isn't right, empty() won't give an error if $input isn't set.

That's true. Empty() doesn't return an error when $input isn't
defined. I didn't RT(F)M on this one. I always use "(!isset($something)
&& empty($something))" to check whether or not $something is empty/not
set.
It's realy more of a feeling. Empty() actualy only checks for a
value in $something. It's basicaly the same as "(!$something)"
except that empty() doesn't return a warning if $something isn't set
(...look, this time I did RTM :).
So... basicaly, with empty() you don't check if $something is set.
You just don't get to know it. So that's why I use isset() with it.
I know the result is the same, but hey... I'm the same guy that
checks the returnvalue of printf() and stuff (another thread in this
list). So... well... Let's just say I have a 'checking-fetish' of
some kind :p

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] checking for null form fields fails

2001-08-08 Thread Renze Munnik

On Tue, Aug 07, 2001 at 11:58:51AM -0600, mike cullerton wrote:
>
> i don't use echo either. i use printf. i was just trying to pass along some
> things i learned reading the manual that were related to the topic.

Cool... finaly. You won't believe how many people use echo(). And I
realy don't know why. But, hey, if we take a look at many of the
(pieces of) scripts you see passing by on this list people don't
seem to care about error-checking. Many of 'm don't even look at the
logfiles or don't have anything logged into them.
And ofcourse I have to admit what's so interesting about
error-checking printf? Well... I say, you always have to check
anything that returns a value. You can better check to much than not
enough. You agree?

> 
> > But you'll have to admit, using braces makes things a lot easier.
> 
> i already did.

H... yeah... Oops... Sorry!
Think my error-checking failed :)

> > And because what this was all about was JavaScript (and not PHP),

I must admit... it's a bit strange on a PHP-list but hey, the real
problem he had was in the JS, so...

> cool, i came in late in the thread. i _do_ use braces. i like braces. braces
> are my friends.

Most excellent, dude! :)

> 
> > And e, who said anything about returning multiple values?
> 
> again, just something learned from the manual.

Ah... okay... Can be useful... But isn't that more of... you know...
like RTFM?!?! But, hey; it's true alright. Do it all the time.
Well... pretty often anyway.

> i was only trying to pass on info about differences between function calls,
> statements and constructs, and hopefully helping someone out in the process.

Okay... "problem" solved.

> isn't that what we do here?

Sure is!!!


CYa'round

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] checking for null form fields fails

2001-08-07 Thread Renze Munnik

On Tue, Aug 07, 2001 at 09:23:02AM -0600, mike cullerton wrote:
> on 8/7/01 2:43 AM, Renze Munnik at [EMAIL PROTECTED] wrote:
> 
> > On Mon, Aug 06, 2001 at 12:31:38PM -0700, Mark Maggelet wrote:
> >> i can't tell if it's just a email formatting thing, but if there's a
> >> line break in the onsubmit string it might mess things up.
> > 
> > It no _might_ mess things up... It sure does! Good one.
> > But... another thing. You just might want to consider using braces.
> > They're not invented for nothing. When you call functions (like
> > return) you should use braces. Especialy when you start writing more
> > complex scripts, the not using any braces, is just the thing that
> > may because a lot of trouble.
> 
> a couple things.
> 
> although i agree with the general notion of using braces, return is not a
> function (the manual calls it a statement), and atleast from what i can find
> in the manual it doesn't take braces.
> 
> http://www.php.net/manual/en/functions.returning-values.php
> 
> also from that page - "You can't return multiple values from a function, but
> similar results can be obtained by returning a list."
> 
> i'm not really sure what the difference is between function, statement and
> language construct (which is what echo is). syntactically, i know that
> functions require parentheses.
> 
> with echo, the manual says you _cannot_ use parantheses if you are echoing
> more than one thing.
> 
> http://www.php.net/manual/en/function.echo.php
> 
> -- mike cullerton
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

You're right, return is a statement.
I never said, though, to use braces with echo. Actualy I didn't say
anything about echo. I never use echo, for some weird reason I just
don't like it. I prefer print. So... I don't realy care how echo
should be used.
But you'll have to admit, using braces makes things a lot easier.
And because what this was all about was JavaScript (and not PHP),
using braces is a smart thing, because in JavaScript you can make
realy ugly constructions in which things _can_ go wrong (no syntax
error, but _wrong_) if you don't use braces. In JavaScript it's not
required to end each line with a semicolon like in PHP. This can
cause weird flows if you also don't use braces.
And e, who said anything about returning multiple values?

To be honest... I don't understand what you try to achieve with your
post Please let me know...

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] if(!$submit)

2001-08-07 Thread Renze Munnik

On Tue, Aug 07, 2001 at 03:47:19PM +0100, Tarrant Costelloe wrote:
> When using if (!$submit)  I get an error saying:
> Warning: Undefined variable: submit in C:\Inetpub\webpub\default.php on line
> 1
> Fair enough, so then I add if (isset(!$submit)) and I then get an error;
> Parse error: parse error, expecting `T_VARIABLE' or `'$'' 
> Could someone please tell me the more than likely simple sollution.
> 
> Thanks
> 
> Taz

if (!isset ($submit))
or
if (!isset ($submit) || empty ($submit))

You were SO close!

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] IP Address

2001-08-07 Thread Renze Munnik

> 
> =[ Get remote IP ]=
> 
> if(getenv(HTTP_X_FORWARDED_FOR))
> {
>   $ip=getenv(HTTP_X_FORWARDED_FOR);
> }
> else
> {
>   $ip=getenv(REMOTE_ADDR);
> }
> $host = gethostbyaddr($ip);
> 
> ===
> 

Oh... btw... I just gave a real look at that piece of code. You
might want to write it a bit different:

if (getenv ("HTTP_X_FORWARDED_FOR")) {
  $ip = getenv ("HTTP_X_FORWARDED_FOR");
} else {
  $ip = getenv ("REMOTE_ADDR");
}
$host = gethostbyaddr ($ip);

The other one does work, but quoting makes a lot of difference in
your logfiles. Without quoting yet get al kinds of warnings.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] IP Address

2001-08-07 Thread Renze Munnik

On Tue, Aug 07, 2001 at 08:29:34AM -0500, Joseph Bannon wrote:
> Just because you're having a bad day doesn't mean I should. Can you just
> tell me what it is? I don't have those posts.
>
> J

Wow... I believe you're the one having the bad day.
Anyway, here's the result of the thread... It's the code you need.

=[ Get remote IP ]=

if(getenv(HTTP_X_FORWARDED_FOR))
{
  $ip=getenv(HTTP_X_FORWARDED_FOR);
}
else
{
  $ip=getenv(REMOTE_ADDR);
}
$host = gethostbyaddr($ip);

===


--

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] IP Address

2001-08-07 Thread Renze Munnik

On Tue, Aug 07, 2001 at 08:11:52AM -0500, Joseph Bannon wrote:
> What is the php code to get a visitor's IP address?
> 
> Thanks,
> Joseph


You might want to consider reading some of the other posts for a
change. There's an interesting thread on this list today. It's about
the exact same question you just asked.
Try reading that!

It's called: user's ip

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] function into string

2001-08-07 Thread Renze Munnik

On Tue, Aug 07, 2001 at 02:30:31PM +0200, Veniamin Goldin wrote:
> Sorry for the dummies question, but how do I insert into string like:
> 
> echo "balalala"
> 
>  how to insert function in the midle like :
> echo "balalala [trim(odbc_result($result_id,3))] aasasasas"
> 
> 
>  Thank you.
> 


How about:

echo "balalala ".trim(odbc_result($result_id,3))." aasasasas";

or

echo "balalala [".trim(odbc_result($result_id,3))."] aasasasas";

depending on what you meant by the '[' and ']'.

This is just one of many possible ways of doing it. I, myself, am
not to happy with echo(). Don't ask me why, just a feeling... No
return value and stuff. I prefer using real functions that I can
check on being successful. So how about:

print ("balalala [".trim(odbc_result($result_id,3))."] aasasasas");

or

printf ("balalala [%s] aasasasas", trim(odbc_result($result_id,3)));

Well... as I said, many possibilities...

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [Re: [PHP] user's ip]

2001-08-07 Thread Renze Munnik

On Tue, Aug 07, 2001 at 02:01:04PM +0200, René Moonen wrote:
> The problem is that REMOTE_ADDR returns the IP address of the
> proxy (if the user
> accesses the web-page via a proxy. This will allways return the IP
> address of
> the user's machine:
>
> if(getenv(HTTP_X_FORWARDED_FOR))
> {
>   $ip=getenv(HTTP_X_FORWARDED_FOR);
> }
> else
> {
>   $ip=getenv(REMOTE_ADDR);
> }
> $host = gethostbyaddr($ip);
>


Ahh see, that wasn't clear in the question. Yeah... that's true.
Pain in the ass those proxies. They're also realy useful while
testing your (dynamic) site. NOT!!! "Hey, what's this? I thought I'd
realy changed that error. How's this possible?", "Didn't I just
change the background-color? Why is it still the same?"
BECAUSE THE DAMN PROXY DOESN'T WANT TO SHOW YOU THE NEW VERSION.
No... cache, cache, cache... Damn things always come up with pages
that are (way) to old!

But anyway... that's not what this was about (just my own
frustration). But I just don't use the proxy nomore. Only for
testing things like REMOTE_ADDR etc.

But thank you for specifying the question. And eh, you're right. I
just didn't know the question was about this problem.

--

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] user's ip

2001-08-07 Thread Renze Munnik

On Tue, Aug 07, 2001 at 03:55:25PM +0530, Adrian D'Costa wrote:
> Hi,
> 
> I am trying to get the ip address of any user browsing a particular page.
> 
> I tried $REMOTE_ADDR but that give me only the remote address.  What would
> be the best way?
> 
> Adrian


Okay... Help me out here...
You want to know someones IP-address and using $REMOTE_ADDR you get
the IP-address of the user. What's the problem man?!?!?!

-- 

* R&zE:

-- »»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] PHP inside code problem

2001-08-07 Thread Renze Munnik

Try using stripslashes() before htmlspecialchars().


-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Currency help

2001-08-07 Thread Renze Munnik

On Tue, Aug 07, 2001 at 11:30:18AM +0200, Mitja Simèiè wrote:
> Hello,
> 
> My problem is how to find simple way to change REAL number
> from MySQL to currency type with PHP.
> 
> Exmaple:
> MySQL: 12323434,34
> I need to parse it as: 12.323.434,34
> 
> tnx,
> mitja.


One simple function number_format:

http://www.php.net/manual/en/function.number-format.php


-- 

* R&zE:

-- »»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] checking for null form fields fails

2001-08-07 Thread Renze Munnik

On Mon, Aug 06, 2001 at 12:31:38PM -0700, Mark Maggelet wrote:
> i can't tell if it's just a email formatting thing, but if there's a 
> line break in the onsubmit string it might mess things up.

It no _might_ mess things up... It sure does! Good one.
But... another thing. You just might want to consider using braces.
They're not invented for nothing. When you call functions (like
return) you should use braces. Especialy when you start writing more
complex scripts, the not using any braces, is just the thing that
may because a lot of trouble.
Weird thing btw, that the JavaScript console doesn't show any errors
when there's a newline between return and verifyInput. I mean...
it's a good example of a syntax error. But that stupid console
doesn't show any damn thing.
Btw... not that it matter anyway, but:
  onsubmit="return <\n> verifyInput();"
doesn't do the right thing (as we've all seen), but:
  onsubmit="return( <\n> verifyInput());"
does. (...)

> well, if it makes it this far, $input will be set, but the value will 
> be "". try empty() instead of !isset()

Well, Mark... almost! You shouldn't use empty() _instead_ of
isset(). You should use 'm together:

 if (isset ($input) && !empty($input)) {
   print ("Okay... form is completed!");
 } else {
   print ("No way... can't do!");
 }

Because, when you check using empty($input) there's still the
possibility that $input isn't defined at all. And then some horrible
error still arises in your logfile.
Note btw that you shouldn't change the order of isset() and empty()
in the above example.

-- 

* R&zE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] Call to undefined function: imap_open()

2001-08-06 Thread Renze Munnik

On Sat, Aug 04, 2001 at 06:57:35PM -0500, Damiano Ferrari wrote:
> I just tried to use the IMAP functions on my website. When I run the first
> script, I get this error:
> 
> Call to undefined function: imap_open()
> 
> Does this mean the IMAP functions are not installed?
> 
> Damiano


Most likely!

You can e.g. use phpinfo() (or phpinfo(INFO_MODULES) to see if it is
installed.

-- 

* R&zE:

-- »»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

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




Re: [PHP] HTTP_POST_VARS variable names?

2001-04-18 Thread Renze Munnik

Mat Marlow wrote:
> 
> Hi,
> Does anyone know if php stores POST variable names as well as values? I'm
> using HTTP_POST_VARS for the values but I'm having to create my own array
> for the names.
> 
> cheers,
> 
> Mat
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


Correct me if I misunderstand you're question, but;

If you use HTTP_POST_VARS you already have the variable names. I
mean... how else do you use the values you're talking about?
$HTTP_POST_VARS{"var_1"}, $HTTP_POST_VARS{"var_2"}, etc.
var_1 and var_2 are the variable names...
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] syntax

2001-04-12 Thread Renze Munnik

elias wrote:
> 
> Hey, i didn't write 'echo' in the origin but i just double-quoted what he
> wrote in the first place w/o even noticing the 'echo' ;)


Ehhh... this wasn't specifically addressed to you Elias. It was more
like a general wondering...

-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] syntax

2001-04-12 Thread Renze Munnik

elias wrote:
> 
> You can use the same code as you typed but use double-quotes instead of
> single-quotes:
> $fp=fopen("echo $agentcode' .'CyberTrac.ctr", "w");
> 
> -elias
> http://www.kameelah.org/eassoft

Why the H*ll would you wanna use echo there?!?!?!
Just fopen($agentcode."CyberTrac.ctr", "w"); works (like someone
already mentioned before), so why would you use some _UGLY_
construction with echo???

-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] string comparsion "inf"

2001-04-11 Thread Renze Munnik

[EMAIL PROTECTED] wrote:
> 
> Hi all,
> 
> I got a problem comparing the string "inf" with another in PHP3. It is
> used as File-Extention for information-files on our system. When
> comparing the following all works fine and the expected result is given:
> 
> "otto"  =  "karl" =>0
> "otto"  =  "otto" =>1
> "otto"! = "karl"  =>1
> "otto"! =  "otto" =>0
> 
> The following problem occurs when comparing the string "inf":
> 
> "inf" = "otto" =>0 correct result
> "inf" = "inf"   =>0  incorrect result expected 1
> "inf" != "otto" =>1 correct result
> "inf" != "inf" => 1 incorrect result!!! expected: 0
> 
> Does anybody have any idea what´s wrong with the string "inf"? It is not
> an reserved word.
> 
> Tahnks in advance
> 
> Marco
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


Well... where shall I start...

Comparison: ==
Assingment: =
(and _not_ the other way 'round)

And then... Why would you even think about comparing to fixed
strings? You wouldn't. So I guess you'd like to send some real code
next time, so people can see what you're trying to do.

And then...
"inf" = "inf" doesn't work _at all_! It produces an error. If you
use "inf" == "inf" the result is exactly what you'd expect.

And then...
In your real code, which is something like $var = "inf", you should
use $var == "inf". If you do that, you won't have any problems.

-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] assignment operator works for comparison??

2001-04-11 Thread Renze Munnik

Dan wrote:
> 
> This confused me for awhile, because the single equal sign seemed to work
> for comparison, but created inexplicable errors in my programs.  It seems
> strange to me that a successful variable value assignment does not return
> true.
> 
> example:
> 
>  
>  $shiny = 1;
>  if($shiny = 0){ echo("This wont print"); }
>  echo( $shiny ); //this will return 0
> 
> ?>
> 
> --Dan
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


Okay...

First:
Checking if $shiny equals 0:

if ($shiny == 0) {

But that's already been discussed.
If you _realy_ want to check if the assignment succeeded:

if (($shiny = 0) == 0) {

Try the following example:

-
$a = "Hello";
$b = "Wold";

if ($b == $a)
  print "Yes, b equals a\n";
else
  print "No, b doesn't equal a\n";

if (($b = $a) == $a)
  print "Yes... now b equals a\n";
else
  print "Oops... b still doesn't equal a!\n";
-

Output will be:

No, b doesn't equal a
Yes... now b equals a

-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] php -> html

2001-04-10 Thread Renze Munnik

ewoong wrote:
> 
> Hello.. ^^
> 
> I am trying to save results for php files.
> 
> for example..
> 
> I create abc.php3 following as..
> 
>  # abc.php3
> 
>echo ("hello");
>  ?>
> 
> If I run abc.php3 , the results is ..
> 
>hello.
> 
>  So..
> 
>  How can I this results to save file.
> 
>  # abc.html
> 
>hello
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


Check the manual!

"Filesystem functions"

-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] apostrophe checks

2001-04-09 Thread Renze Munnik

Wade Halsey wrote:
> 
> Hi
> 
> Ive got a textarea control on a form where a user will enter info, i want to enter 
>this info into an interbase db,ive limited the space to 200 characters in the text 
>area but need to now eliminate any apostrophes and other bad characters, anyone have 
>a function?
> 
> TIA
> 
> Wade


Try:

ereg_replace(); 
(http://www.php.net/manual/en/function.eregi-replace.php)
or
preg_replace(); 
(http://www.php.net/manual/en/function.preg-replace.php)
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] Re: Error message

2001-04-06 Thread Renze Munnik

Toni Barskile wrote:
> 
> Thanks for everyone's help w/the error message thing.
> 
> I got my SQL statement working, but it's not returning any rows.  I noticed
> that there's nothing in my compid field in the 2nd table.  Does anyone know
> how I might go about automatically filling in the value in the 2nd table
> when someone enters data in the 1st table?  I hope this question makes
> sense...
> 
> Toni
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


I don't know what your db exactly is, or what you want to do... but
it pretty much sounds like something for a foreign key. If you don't
like that option, you'll have to change your code (PHP or sp,
wherever you do it) that inserts the data. That function should then
also insert/update the data in the other table.
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] Help w/Error Message

2001-04-06 Thread Renze Munnik

Toni Barskile wrote:
> 
> Hi:
> 
> Can someone please explain the following error message?
> 
> ERROR 1052: Column: 'compid' in field list is ambiguous
> 
> Here's my mySQL statement:
> 
> $sql="SELECT  fname, lname, compid, status, dept, room, bldg, phone,
> ticket_num, compid, date_rpt, request_type, hardware, model, dci,
> dci_num,software_type, software_pkg, problem, comments, entered_by
> FROM users, tickets
> WHERE users.compid = tickets.compid
> ORDER BY lname";
> 
> Thanks in Advance
> 
> Toni
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


You select from two tables that both have a column named 'compid'.
Your computer doesn't know which one of them it should use. So, you
should make that decision for 'm:

SELECT users.compid
or
SELECT tickets.compid
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] how do I delete session

2001-04-05 Thread Renze Munnik

"Jacky@lilst" wrote:
> 
> how?
> Like this
> session_destroy("name");
> how about if I want to register that variable to be session again ( without
> closing browser and start everything all over again)? can I still do that?
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for
> yourself"


In order to completely destroy the session:

session_destroy();

No arguments, just void.
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] how do I delete session

2001-04-05 Thread Renze Munnik

Jacky wrote:
> 
> Hi all
> I wen tto check manual, not quite get it though. I have set up session and I want 
>that deleted, but it did not work so far with session_unset or session_unregister.
> I figure I may have used them incorrectly
> here is what i did
> 
>  session_start();
> global $name;
> $name = "foo";
> session_register("name");
> ...
> 
> session_unregister("name");
> ?>
> 
> It appears to me that the value is still there all the time, unles I close the 
>browser. what did I do wrong??
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for yourself"

If you want to delete the complete session session_destroy.

http://www.php.net/manual/en/function.session-destroy.php
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] Is their a function for this?

2001-04-05 Thread Renze Munnik

"Black S." wrote:
> 
> Basically I have array variables, lets say:
> ---
> $folder[0] = "basic";
> $folder[1] = "standard";
> $folder[2] = "knowledge";
> 
> Fruther down in the code:
> ---
> $totalsub_basic = "10";
> $totalsub_standard = "24";
> $totalsub_knowledge = "12";
> 
> Everything runs fine until "$total_count" how do I take the value of
> $folder[$i], lets say "standard" append that to "totalsub" and get the value
> of "$totalsub_standard"?
> ---
> $i = 0;
> while($i < $level_0_links) {
> echo "First While Loop";
> 
> if (ereg("^/$folder[$i]?", $PHP_SELF)) {
>   $a = 0;
>   $total_count = (eval("$totalsub_$folder[$i]")); <---
>   while ($a < $total_count) {
>   echo "$a";
>   $i++;
>   }
> }
> 
> $i++;
> }
> 
> Thanks Everyone!
> 


Why not use some hash io separate variables? And, eh, why do you
quote integer values? What I would suggest is something like this:

/* Just as you already had */
$folder[0] = "basic";
$folder[1] = "standard";
$folder[2] = "knowledge";

/* -- HASH -- */
$totalsub{"basic"} = 10;
$totalsub{"standard"} = 24;
$totalsub{"knowledge"} = 12;

In this way it's easy to access the totalsub-values:

e.g.: $totalsub{$folder[0]}

-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] More Email ereg Validation

2001-04-05 Thread Renze Munnik

Jason Murray wrote:
> 
>Function validEmail($emailaddress)
>{
>  // Decides if the email address is valid. Checks syntax and DNS
>  // records, for total smartass value. Returns "valid", "invalid-mx"
>  // or "invalid-form".
> 
>  if
> (eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$",
> $emailaddress, $check))
>  {
>if ( checkdnsrr(substr(strstr($check[0], '@'), 1), "ANY") )
>{ return "valid"; }
>else
>{ return "invalid-mx"; }
>  }
>  else
>  {
>return "invalid-form";
>  }
>}
> 
> If it gets through the first match with ".om", it won't get through the
> checkdnsrr().
> 
> Jason
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


Good idea... that $. Also the checkdnsrr is a nice feature. But
I'll have to remind you on a previous thread about quite the same
problem. The checkdnsrr can slow down the performance of your own
site. It _can_ make it terribly slow. Draw your own conclusion.
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] file upload question

2001-04-05 Thread Renze Munnik

Joe Stump wrote:
> 
> I'm in the habit of putting all my form variables into an array (ie:
> ) so
> that I have a nice little package to pass to functions. My question is can you
> put files into those as well? If so how does it handle the $file_name and
> $file_size variables PHP creates?
> 
> --Joe
> 
> /**\
>  *Joe Stump - PHP/SQL/HTML Developer  *
>  * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net   *
>  * "Better to double your money on mediocrity than lose it all on a dream."   *
> \**/
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


Yes. You can just make a file-upload element in your form. E.g.:


In your "result-page" you can use the uploaded file pretty
straightforward:
temp-filename: $f[myFile]
filename: $f_name[myFile]
size: $f_size[myFile]
mimetype: $f_type[myFile]
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] HOWTO: Dynamically Create A Form

2001-04-04 Thread Renze Munnik

Scott Walter wrote:
> 
> I know this sounds very simple, but I only want certain fields on my form
> to be displayed depending on the selected item in a drop-down menu, that is
> part of the form.  I cannot figure out how to get it to work, and I don't
> want to resubmit the form... *** I need it to be done on the fly.***  Your
> help is appreciated!
> 
> Example of online form
>  Source of Income: _
>  Dues: _
>  Type of Funds:v
> 
>  Where  = text field
>  ___v = drop-down menu
> 
> Based on the selection of "Type of Funds"  I want one more field to be
> displayed.
> pseudo-code:
>  if (type_if_fund == 'Bank') {
>  // then display text field to
>  // enter the bank's name
>  } else {
>  // no need to display anything else
>  }
> 
> Thanks again.
> 
> -Scott
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]



Well; PHP is server-side, so without resubmitting the form you won't
be able to do this using PHP. That's why JavaScript is available. At
this time I don't have enough time to explain exactly how to do
this, but JS is the way for this.
If your in a hurry and noone else in this list _has_ got the time to
'finish' my msg, try posting a msg on a JavaScript newgroup.

E.g.:
secnews.netscape.com: netscape.devs-javascript

I'm sorry I can't help you out further at the time.
Good luck!
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] stop these solfix.net messages

2001-04-04 Thread Renze Munnik

"B. van Ouwerkerk" wrote:
> 
> Hi,
> 
> How about these messages from solfix.net  What have I done to deserve
> these..
> 
> Every message I send to this list is followed by one from solfix.. with a
> list of message commands..
> 
> Already send a message to their postmaster still getting them.
> 
> If someone out there knows more about it.. STOP IT.. It's very annoying..
> As far as I know it has nothing to do with the lists @php.net they're
> running ezmlm. The messages I'm getting are generated by Xtramail..
> 
> Bye,
> 
> B.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


Same here!

I tried about everything to get off those stupid msgs. Try going to
their STMP server, you'll find out that your email-address is a
valid user on their system. How funny is that? NOT FUNNY!!!

I still haven't found anything to make 'm stop.
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] help with parse

2001-04-04 Thread Renze Munnik

WD wrote:
> 
> heres what is result in IE...which shouldnt show up at
> this code isnt parsing like I expect..
> 
>  if ($HTTP_USER_AGENT = "Mozilla")
> {
> print ("This site best viewed with IE 4 or
> better!\n");
> print ("\n");
> print ("\n");
> print ("\n");
> print ("\n");
> }
> ?>all...
> 
> \n"); print ("\n"); print ("\n"); print ("
> \n"); } ?>
> 
> __
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

Have you ever checked the $HTTP_USER_AGENT value from IE?

IE says:

"Mozilla/4.0 (compatible; MSIE 5.01; Windows 95)"
(for example)

So, you shouldn't be checking for Mozilla. IE says that to.
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] a PHP fucntion like window.confirm("Click OK to continue. Click Cancel to stop.");

2001-04-04 Thread Renze Munnik

Javier Morquecho Morquecho wrote:
> 
> Is there an PHP equivalent to the javascript:
>  $x= window.confirm("Click OK to continue. Click Cancel to stop.");
> 
>   if ($x)
> 
> Thanks
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


E No!

PHP is server-side. Using PHP you can't do that. Only thing you can
do is have PHP generate the JavaScript that calls window.confirm().
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] Validation Email in PHP programs

2001-04-04 Thread Renze Munnik

[EMAIL PROTECTED] wrote:
> 
> Addressed to: "Steve Werby" <[EMAIL PROTECTED]>
>   <[EMAIL PROTECTED]>
> 
> ** Reply to note from "Steve Werby" <[EMAIL PROTECTED]> Tue, 3 Apr 2001 
>15:24:29 -0400
> >
> >
> > I should have said there's no *reliable* way to check whether an email
> > address on an external server is valid.
> 
> There is one _reliable_ way to verify the email address is valid.
> 
> Generate a random password then send it to the email address they give
> you. Then pop up a page that tells them to check their email for the
> password.  I include the user name and a link to the site in the email I
> generate.
> 
> No email address - no password - no access.
> 
> Rick Widmer
> Internet Marketing Specialists
> http://www.developersdesk.com
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


Just for the record... You guys aren't validating an email-address.
You just send something to an address some gives. If the mail
doesn't arrive bad luck for that guy. That's no way of
validating an address. That's just sending an email to whatever
address someone gives. Realy validating the address is checking
whether or not it exists _WITHOUT_ sending an email. Sometimes you
just have to live with those things that aren't possible like
quickly and savely validating an email-address.

Like Steve and I already posted; you can check the domain and that's
it.

Everything that goes beyond that is just trail-and-error checking.
That's not the way. E.g. if you have some site and you want to
collect marketing information you want the email-addresses to be
correct. But _noone_ will ever fill out some form -> check his mail
-> come back to a given URL -> and validate some password. That's
only a possibility for sites where people can create an account of
some sort. When it just concerns some visitor information, there is
no reliable way of checking the complete address. Just like e.g. the
first- and lastname of the visitor. You just _cannot_ check that!
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] Shell Programming with PHP, but where is the PHP?

2001-04-03 Thread Renze Munnik

Brandon Orther wrote:
> 
> Hello,
> 
> I am looking for the path to my php so I can put it on the top of my php
> script.  Like this: #!/path/to/php
> 
> All I can find that looks like this is libphp4.so  Does anyone know where to
> look for the binary?
> 
> Thanks
> Brandon
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

Try locate and/or whereis.
And you should make sure PHP isn't installed as module.
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] Validation Email in PHP programs

2001-04-03 Thread Renze Munnik

Yep Steve is a smart man. The solutions I gave are good but can
ruin your own performance totaly without it being your mistake. The
bad performance of a different server (which you probably don't even
know!) can ruin the speed of your site. Depending on the importance
of the check you'll have to decide yourself what to do.

If you _do_ want to check the email-adresses using the mx-checks,
but you don't want to take the chance of slowing down your site, you
can always consider batch-processing. Accept the addresses based on
the RE and store them (e.g. in a db). Then at night (or whenever)
you can start a script that iterates through the list, checking all
mx-entries.

And for the usernames that you can't track. It's the nicest feature
a mailserver has! You wouldn't be able to do anything normal anymore
if the users could be tracked. Every spam-"service" would be
scanning your mailserver and spamming it to death!!
So... you'll just have to accept the username...
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] Validation Email in PHP programs

2001-04-03 Thread Renze Munnik

Johannes Janson wrote:
> 
> Hi,
> 
> this is the regular expression from a PHP book.
> 
> ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-z]{2,3})$,
> $formfield");
> looks horrible but works.
> 


Besides the RE you might wanna take a look at these functions:

http://www.php.net/manual/en/function.getmxrr.php
and
http://www.php.net/manual/en/function.checkdnsrr.php

Using (one of) those you can check the email-address better. I.e.
the domain. Extract the domainname from the given email-address and
feed it to either one of these and you'll get a result whether or
not the domain has an MX-record. Only thing left is whether or not
the user exists on the given mailserver. But for as far as I know
you can't automatically check that.
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] Global Variables

2001-04-03 Thread Renze Munnik

Jon wrote:
> 
> Hi,
> 
> I need to retrieve some information from a database, asociated with the user
> session so I could query this information whenever I want through the user
> session. I am searching for something similar to ASPs global variables if
> there is anything equivalent with PHP.
> 
> Thanks
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


Aren't you looking for session-handling?

Look at:
http://www.php.net/manual/en/ref.session.php

or (Spain):
http://www.php.net/manual/es/ref.session.php
-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] GZip: NS or HTTP/1.0

2001-03-30 Thread Renze Munnik

On Fri, Mar 30, 2001 at 09:53:53AM -0500, Michael Kimsal wrote:
> You REALLY don't want to specifically ignore Netscape users, do you?  :)
> 
> Any browser that can accept gzipped stuff sends a content-accept
> header.  Netscape tells the server it can handle gzipped stuff, so the
> server can send it.  Other browsers (HTTP 1.0, 1.1, or whatever)
> can choose to tell the server what they can accept, regardless
> of HTTP version.
> 
> Netscape can handle the gzipped stuff just fine - they prove it by rendering
> it.
> It's simply their printing logic which is messed up.  Face it -
> just disable gzipping for Netscape users.  JUST DO IT!  Anyone else
> who can't handle gzipped stuff will have the good sense to not
> announce that it can accept it in the headers.
> 
> 
> 
> Renze Munnik wrote:
> 
> > This error is server-side and only occurs when using HTTP/1.0. So I
> > was wondering if the HTTP/1.0 can also be the cause of the printing
> > problem concering the gzhandler?
> >
> > If that's the case I should disable the compression for each and
> > every browser that uses HTTP/1.0 instead of only disabling it for
> > NS.
> >


Hi there Michael,


Eh... No! 'Course I'm not gon' ignore all NS users. I'm just gon'
disable compress'n f'r 'm. I nev'r had (& nev'r will have) the
intens'n of blocking 'm out. But I explicitly off'r the poss. of
print'n out the page, so it must always work. As long as I enable
compress'n, NS-us'rs can't print the page. So... no compress'n for
'm. Or someone sh'ld have a bett'r idea. I mean... NS s'nds the
head'r tellin' my serv'r that it supp'rts gzip -> my serv'r then
s'nds the compress'd page -> then NS rememb'rs it doesn't want to
decompr'ss it and prints the compr'ss'd sh!t.

And bring'n up the whole HTTP-thin' was a stupid idea from my side.
Just forg't to t'st my "theory" prop'rly. Sorry!!

So... f'r n'w I'm g'nna disable compr'ssion f'r NS-us'rs, 'till
someone has anoth'r solut'n.

[sorry 'bout all them '-s, but I'm working to long today]

-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] GZip: NS or HTTP/1.0

2001-03-30 Thread Renze Munnik

On Fri, Mar 30, 2001 at 08:06:21AM -0600, Brad S. Jackson wrote:
> 
> 
> I've tested the ob_gzhandler with PHP 4.0.4pl1 and Netscape 4.76 and it works
> fine for me.  I don't know why some people have problems.
> 
> I doubt it has anything to do with HTTP 1.1 and this can be tested by disabling
> 1.1 support in the IE advanced options.
> 
> I think compression is controlled entirely by the browser sending an
> Accept-Encoding: gzip header and the server responding
> with a Content-Encoding: gzip header.  It's possible that the server is
> compressing with the deflate method, which I think
> Netscape doesn't support.


Well

I never said that NS doesn't support compression. Using the
gzhandler works just fine with NS. The problem hower is a different
one. The page is shown perfectly, but when you try to print it, NS
'forgets'(?) to decompress it. _That's_ what's wrong. Another thing
is 'view source'. Then (I think) NS doesn't decompress either,
'cause NS then says that the document is 'Untitled' and no code is
shown _at all_.

And for the HTTP-thing I started You're exactly right! Painful
to see the answer on a question and notice that the answer is _SO
SIMPLE_. "Just go to Tools, go to Internet Options, go to Advanced,
disabled 'Use HTTP/1.1'". G, and then knowing that I've been
developping and testing for years now. Something so extremely
simple, and I just _DID NOT THINK ABOUT IT_. Anyway... I disabled it
and it makes no difference.

Conclusion (for now...):

HTTP/1.0 is not the problem, NS is.
Another lovely bug from the NS-services.


So

This was a pretty useless try from me.
Thanks for attending me to the very basics of IE-testing (...)

-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




[PHP] GZip: NS or HTTP/1.0

2001-03-30 Thread Renze Munnik

Okay guys I've got a new idea

I just found out that NS<5 uses HTTP/1.0 and not HTTP/1.1. Well,
okay, but that's not _to_ exciting is it?! But... (there's always a
'but') IE>=5 uses HTTP/1.1. Now, looking back at the subject being
discussed in this thread, I'm wondering if that might be the problem
that arises when using the gzhandler.

Example
On our server we use the multi-views: no extensions required! So,
instead of calling 'page.php' I just call 'page'. Nothing wrong with
that, not even for NS. But... (there it is again!) I made the
following (test) page:


 
  PHP Info
  
BODY {
   background-color: #ff;
}
  
 

 
  
 


I've named this file 'php-info.php'. So... Now I call this page from
IE (5) calling 'php-info'. Guess what? Nothing wrong; works
perfectly! And now the big NS test. S*cks!!! Calling 'php-info' from
NS provides me the next error:

..."no acceptable variant: "...

This error is server-side and only occurs when using HTTP/1.0. So I
was wondering if the HTTP/1.0 can also be the cause of the printing
problem concering the gzhandler?

If that's the case I should disable the compression for each and
every browser that uses HTTP/1.0 instead of only disabling it for
NS.

-- 

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] Array in Session-Vars?

2001-03-30 Thread Renze Munnik

elias wrote:
> 
> I never tried to use arrays in session variables,
> but i believe if you try to serialize the array first and then register the
> serialized value as session value it should work.
> and ofcourse to retrieve it do reverse work by unserializing the variable
> back to the array and use it.
> 
> -
>   $a = Array("asdad", "adasd", "123123", "6adas f g");
>   echo ($s = serialize($a)) . "";
>   // you can session_register($s)
>   unset($a);
>   // in file2 you can retrieve $s and make $a back again:
>   $a = unserialize($s);
>   var_dump($a);
> 
> -
> -elias


Hi,

Never tried it either, but from previous postings I remember you
should just be able to use array's with no prob's.

(4 all I can remember i.e.)

* R&zE:

***
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***

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




Re: [PHP] Need urgent help... Send HTML with jpg/gif page with php

2001-03-29 Thread Renze Munnik

Paul Godard wrote:
> 
> Hi,
> 
> I am finalizing a new web site that needs to be live this week-end
> and I still have a problem to receive HTML email send from a web page
> using implode in php.  Help to fix the problem will be VERY much
> appreciated...
> 
> Please reply directly to [EMAIL PROTECTED] ... thanks
> 
> Here is the php script I use ... very simple
> 
> $mailbody = implode("",file("$Page"));
> $mailheaders = "From: ".$FullName." <".$from.">\nMime-Version:
> 1.0\nContent-type: text/html\nContent-Transfer-Encoding: 7bit\n";
> mail($to, $subject1, $mailbody, $mailheaders);
> 
> At the bottom of the page
> http://www.gondwanastudio.com/Expedition/AvantPremiere.html, there is
> a small form to send a resume of the page to an email address.
> 
> The http://www.gondwanastudio.com/Expedition/Episodes/Page_001.html
> which is imploded and sent is received ok but the link to the
> pictures are dead...
> 
> Why and how to fix it?
> 
> My optimal wish is to receive the email with embeded pictures, not
> lived links to the website pictures.  How can I modify the code of
> the page to work?
> 
> If this is too difficult, is it possible to have AT LEAST the live links?
> 
> Thanks in advance...
> --
> 
> Kind regards, Paul.
> 
> Gondwana
> [EMAIL PROTECTED]
> http://www.gondwanastudio.com
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


You use relative links to your images. It's not so weird that
someone who receives the page will not get the images with it. If
you want the images to be seen by the rcpt, you should use absolute
links to them. Usualy you wouldn't want to do that, I agree, but
when sending pages all over the world, there's pretty much no other
way. So e.g. the first image will be:

http://www.gondwanastudio.com/Expedition/Episodes/xMedia/Logo/MiniLogo_BushWeb.gif"
width=" ... etc.

That way, the rcpts will be able to see the images.
-- 

* R&zE:

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




Re: [PHP] fatal error

2001-03-29 Thread Renze Munnik

PHP3 doesn't support sessions

RenzE



Theo Richel wrote:
> 
> Can anyone please tell me why I get the following message: Fatal error: Call
> to unsupported or undefined function session_start() in
> /www/richel/authent/index.php3 on line 22
> 
> Thank you,
> 
> Theo Richel

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




Re: [PHP] sessions and REMOTE_USER

2001-03-29 Thread Renze Munnik

Well, try this:

$REMOTE_USER
or
$PHP_AUTH_USER
or
$HTTP_SERVER_VARS["REMOTE_USER"]
or
$HTTP_SERVER_VARS["PHP_AUTH_USER"]
or
$HTTP_SERVER_VARS{"PHP_AUTH_USER"}
or
$HTTP_SERVER_VARS{"REMOTE_USER"}

...make your choice...

RenzE


Rahul Bhide wrote:
> 
> Gurus,
> I am a relative newbie to sessions in php.
> 
> Question: How can I get the loginname of the user . Can session and
> session variables get this??. Another way I have tried(but
> unsuccessfully !!) is to have a .htaccess file in the directory . Once
> the user logs in I use the following code to get his login name in a
> variable.
> 
>  $f=getenv("REMOTE_USER");
> print "$f";
> ?>
> 
> but on execution nothing gets printed.
> 
> Any solutions ??
> 
> thanks in advance,
> ~Rahul
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




Re: [PHP] Session Varables with PHP3

2001-03-29 Thread Renze Munnik

PHP Documentation:

"Note: Session handling was added in PHP 4.0."

RenzE


Sean Weissensee wrote:
> 
> How can I create Session Varables, the docs I have read only provide funtions
> for PHP4.
> 
> Sean Weissensee
> 
> Ion Solutions.

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




Re: [PHP] Line breaks in PHP

2001-03-29 Thread Renze Munnik

I think nl2br() is what you're looking for.

RenzE


Matt Davis wrote:
> 
> I have a  form  that edits the text on a web page by putting the data into a
> db and then outputting to the webpage when it is called. When I enter my
> text into my form I use the return key to start new lines, but when the text
> appears on my webpage it  has no line breaks so the text just wraps to the
> width of the page.
> 
> Is there any way of PHP picking up these line breaks so that the text will
> be formatted on my web page as it was on my form.
> 
> Thanks
> 
> Matt.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




Re: [PHP] GZip + NS + Print = Trouble

2001-03-28 Thread Renze Munnik

To get back to your remark about those stats; I just did.

Less than 1% uses NS!

But still... I'd like to have a site that just works!!!


RenzE

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




Re: [PHP] GZip + NS + Print = Trouble

2001-03-28 Thread Renze Munnik

Yep... You're right (again...). Though I must say that the transfer
_is_ a 'problem'. Not only for NS users, but for most people,
because let's face it; most people still use a modem (39K, 56K...)
for Internet and not the 2Gb line that I have. I've got not problems
with transfer-speed at all, but those people at home will. Ofcourse
I know that making my pages less big would be a good solutions, may
hey... it makes 'm look and works so very nice. What I mean is; I
didn't say that NS transfers slower, but the people who use my sites
have to download a lot of sh%t that I wrote (well, not exactly sh%t,
'cause I do get paid for it) and to speed that up (most
Internet-connections at home s~ck) I wanted to compress the data
being transferred. And the gzhandler was a good sollution. I mean...
HTML still _IS_ plain text and that compresses like reealy
good. And the unzipping on the clientside hardly takes any effort,
so...

But now I'm writing to much.

You're right. That's what this was about. The solution like I have
it now doesn't work for NS; that's for sure. So for the time being
I'll just adjust my 'headers' (cry, cry, cry) so that the gzhandler
isn't used for NS. God I hate this!!!

When ever anyone has _some_ (sort of a) solution for this
afterall... Please, please, please let me know...

For now: Thanks for the effort(s)!!

RenzE


Michael Kimsal wrote:
> 
> No problem.  Understood about the table issue, but it's normally not
> the downloading of the HTML that's as much a problem as the rendering,
> in my experience, with netscape.
> 
> I'm the last person who would adopt this attitude, but...
> 
> Check your stats?  How many IE users?  How many NS users?
> The 'solution' is one which by definition CAN'T work with NS.
> It may not be an IE only thing - not sure about opera or lynx or
> konqueror with gzip stuff.  But don't look at it like an IE only thing.
> Just a non-NS thing.  It's their own damn fault.
> 
> If you've got a lot of traffic, the gzip can save a lot of bandwidth.
> Especially if 80% of your traffic is IE anyway.
> 
> Good luck.
>

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




Re: [PHP] GZip + NS + Print = Trouble

2001-03-28 Thread Renze Munnik

A well... what shall I say. I have to agree with you _A LOT_!!!
Netscape ruled, but doesn't anymore. It's a damn shame. They pretty
much stick to the standards (which I like very much) but the program
(browser) is f*cked up.

Anyway... My pages contain some tables about three within each
other. And NS can't handle tables to good. So if there is any
browser I'd want to use compression for... it'd be NS. That way the
data would be faster there and NS should have more time to process
it. So I'm not realy looking for I solution that only works for IE.
Because only compressing it for IE was something I'd thought about
already, but I don't realy think it's a reasonable option.

But... Thanks for spending your time to my problem!

RenzE


On Wed, Mar 28, 2001 at 09:51:09AM -0500, Michael Kimsal wrote:
> If you're using a templating system of some sort,
> if should be pretty easy to check the USER_AGENT and only
> compress if it's IE.  Or NOT compress is it's NS.
> 
> That's about the only way to do it easily that I can think of,
> and we're planning on implementing.
> 
> 
> 
> I WANT to like netscape.  REALLY.  But they've pretty much made it
> impossible by not fixing things.  Historically, NS had an edge on features
> over IE, imo, till the 4 series.  Neck and neck, again, imo.  But
> without any significant changes in years its just way behind the times.
> 
> Reloading a page to do 'view source'?  (Sorry - POSTED data!)
> Reloading a page to print?
> Reloading a page after a browser resize?
> 
> Just ridiculous engineering, imo.  Even more so when you figure that,
> when this was first out, every one was on 14.4 modems.
> 
> 
> 
> Hopt that helps.
> 

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




Re: [PHP] removing $HTTP_POST_VARS

2001-03-28 Thread Renze Munnik

The referer isn't always defined though... not even if it would be a
valid one. Some browsers just don't want to cooperate...

RenzE


Jon Rosenberg wrote:
> 
> You could just check the referrer, as pseudo-code below shows.
> 
> if refferer is not valid{
> exit;
> }
> else{
> do my stuff;
> }
> 
> - Original Message -
> From: "Matt Williams" <[EMAIL PROTECTED]>
> To: "PHP General List" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 28, 2001 9:20 AM
> Subject: [PHP] removing $HTTP_POST_VARS
> 
> > Hi
> >
> > Is there a way I can remove all the values of $HTTP_POST_VARS?
> >
> > I'm trying to check where a form has been posted from and if it's not the
> > right plac I want to remove all the post vars so they can't any damage.
> >
> > I've tried unset($HTTP_POST_VARS) but it doesn't seem to do anything.
> >
> > TIA
> >
> > M@
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




Re: [PHP] JavaScript and Submit

2001-03-28 Thread Renze Munnik

Ehhh... do you want to have them all go to the same page after a
submit?

With real submit buttons:
If you don't, you can just change the 'action' of your form at the
moment that someone pushes one of the submit-buttons.

With 'fake' submit buttons:
Otherwise (if they all have to go to the same page) I'd say you can
just add a hidden field e.g. and set the value to either 'sbm_1',
'sbm_2' or whatever, at the moment someone pushes the button. Then
at the 'result-page' you can check that field and look what the
value is. Another way is (if you want to use the exact check as
you've described) to create three hidden fields (submit1, submit2
and submit3) and assign a value to the one corresponding to the
pushed button.

RenzE


elias wrote:
> 
> Actually, when I want to submit a form programmatically i do myform.submit()
> but what if i got like 3 submit buttons and each one with a name?
> ie: submit1 button, submit2 button, and submit3 button.
> if the users clicks on of them, i can check in the action file like:
> if (isset($submit1)) { ... }
> elseif (isset($submit2)) { ... }
> 
> but programmatically, how can i write a code that simulates the submit2
> click, so the last check (i just wrote) can really say that submit2 was
> clicked and continues?
> 
> Sorry for poor english, hope i expressed my idea as I'm asking...
> 
> -elias
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




Re: [PHP] comparing dates works sometimes and fails another time!

2001-03-28 Thread Renze Munnik

If you _do_ want to use this method for comparing dates (which isn't
realy a usual way of doing it... there date-functions) you should
fill up with leading 0's, like:

$date1="2001-01-07"; $date2="2001-01-14";

The reason is _very_ simple... You performing a text-compare here.
And let's face it... the characters "-1" (day of date2) are
"smaller" than "-7" (day in date1).

So...

RenzE


kaab kaoutar wrote:
> 
> Hi!
> 
> $date1="2001-1-7";$date2="2001-1-14";
> if ($date1>=$date2) echo "date1 is greater then date2";
> else echo "date2 is greater then date1";
> the result is the first :(
> but it works for other dates!
> 
> Thanks
> 
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




Re: [PHP] GZip + NS + Print = Trouble

2001-03-28 Thread Renze Munnik

Thanks for bringing up this solution. However... I already thought
of this option myself. Problem, though, is that _ALL_ my pages
should be printable. Maybe a very small number of pages will not
have to be printable, but those are so small that the compression
isn't realy necesary. Besides that I don't realy like sites that use
separate 'printer-friendly' pages. When I'm looking at some page I
just want to be able to print it rightaway. And I want to give my
clients this opportunity to. That's why I also have a separate
(extra/own) print-button on my sites. The user can just use that
without realy having to know how the browser works (concerning
printing). Because you will just not believe how 'stupid' some users
are.

But anyway... any other solutions are ofcourse _very_ much welcome
and I'll keep y'all posted a.s.a. I get some more info about this
subject.


RenzE


On Wed, Mar 28, 2001 at 09:49:45AM +0100, Jurian wrote:
> Hehe, I've seen that before, stupid netscape :-)
> We're using output compression as well, what we did, was make an option to 
> disable compression (http://site/file.html?skip_compress=true) in the 
> compression function. Then have a "printer friendly page" button on pages 
> you want to be printable, that links to the current page, with the 
> skip_compress=true option. That way the browser gets the uncompresses 
> version, and prints ok again. I haven't been able to get netscape to print 
> the uncompressed text when the output is compressed, if you somehow find a 
> way that doesn't require reloading the page with an option like 
> skip_compress, please, let me know :-)
> 
> Hope this helps,
> 
> Jurian
> 

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




[PHP] GZip + NS + Print = Trouble

2001-03-27 Thread Renze Munnik

Okay

ob_start ("ob_gzhandler") is a very cool thing to use. At least when
you write _to much_ code like I do. And it works perfectly

most of the time, i.e.

I've got this problem:

My pages start with the gzhandler (see above) to decrease the amount
of data that should be transferred. Nicest thing is that if your
browser doesn't support any compression, the data will be sent
uncompressed. Very cool. But then Netscape... It understand gzip.
Yes it does but they forgot something. At the point that you want to
print out the page your looking at in your browser, Netscape forgets
to unzip the data. Guess what... a whole lot of crap on the paper.
Well not very much ofcourse _BECAUSE IT'S COMPRESSED!!!_

I don't realy like this bug and I'm wondering if someone maybe has
some solution for this


RenzE

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




Re: [PHP] Header Problem...

2001-03-26 Thread Renze Munnik

There may not be any headers before you use the 'header' statement.
The header("Location:...") should be the first output you send. You
might want to consider moving the two 'anti-cache' headers after the
header("Location;...") statement.

RenzE.


On Mon, Mar 26, 2001 at 11:06:11PM +0800, E K L wrote:
> Hi all,
> 
> could any one tell me that how do I go to a specific URL using php 
> command.At the same time, I would like to pass the variable to the page.
> I used header to do it but failed, with the error message:-
> 
> Warning: Cannot add header information - headers already sent by (output 
> started at /usr/local/apache/htdocs/traName_use.php:2) in 
> /usr/local/apache/htdocs/traName_use.php on line 3
> 
> Warning: Cannot add header information - headers already sent by (output 
> started at /usr/local/apache/htdocs/traName_use.php:2) in 
> /usr/local/apache/htdocs/traName_use.php on line 4
> 
> Warning: Cannot add header information - headers already sent by (output 
> started at /usr/local/apache/htdocs/traName_use.php:2) in 
> /usr/local/apache/htdocs/traName_use.php on line 26
> 
> 
> 
> 
> And our code is as below:-
> 
>  header("Pragma : no-cache ");
> header("Cache-Control :no-cache,must-revalidate");
> 
> $db=mysql_connect("localhost","root","123456");
> mysql_select_db("test",$db);
> $query="select trade_name_c
> from confirm_member_info
>   where  trade_name_c = '$tradeName'";
> $result=mysql_query($query,$db);
> $row=mysql_fetch_row($result);
> 
> if($row[0]==$tradeName)
> {
> //echo "Sorry, the Trade Name $tradeName has been used";
> //echo "Please Choose other Trade Name";
> //echo "Click  to back.";
> header("Location: http://192.168.0.1/mysignup_1.php");
> }
> else
> {
> //echo "Your Trade Name and password has been acceptted";
> //echo "Click to proceed.";
> //
> header("Location: http://www.hotmail.com");
> }
> ?>
> 
> 
> 
> 
> 
> I tried to use hidden input type to pass the value, but can it work without 
> form and submit button??
> 
> I would appreaciate if you could give me suggestions and advice.
> 
> thanks
> 
> 
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

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




Re: [PHP] reading a URL...

2001-03-26 Thread Renze Munnik

Just use $id in your code. That should do the job.
Variables that are passed using GET or POST you can just use in your
code. Ofcourse you have to add the $-sign. So if you use the URI:

http://www.arandomsite.com/news_story.php?id=123

You can just use:

"SELECT xxx FROM yyy WHERE id=$id"

RenzE.

On Mon, Mar 26, 2001 at 02:26:27PM +, [EMAIL PROTECTED] wrote:
> 
> 
> 'ello,
> 
> Is it Possible, in PHP to read a URL?
> 
> What I am trying to do is this...
> I have many news stories in a database, and a single static news page, that
> calls the story, and the corresponding headline.
> I have looked about on-line, and seen a common URL,...
> 
> http://www.arandomsite.com/news_story.php?id=123
> 
> I have adopted this method, and it only displays the top most story in my
> database, no matter what news ID I use.
> 
> Can I get the ID number from the URL?, and then pass that to the SQL statement?
> 
> I cannot find a tutorial or similar on-line anywhere.
> 
> Hope you can help,
> Tris...
> 
> P.S, after getting this all set up, my boss asked me to turn everything into
> .jsp pages.
> SO, I am off to buy a "JSP in 20 seconds" Type books, any ideas?
> 
> 
> 
> 
> 
> 
> **
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> 
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
> 
> 
> **
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 


Mvg,

Renze Munnik
Manager Business Development
DataLink BV

E-mail  : [EMAIL PROTECTED]
Telefoon: 023-532.61.62
Fax : 023-532.21.44
Mobiel  : 06-218.111.43

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




Re: [PHP] about:home

2001-03-26 Thread Renze Munnik

The JavaScript solution to this:

window.home();

Don't know how to do this in PHP. Don't this that's possible...


RenzE

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




Re: [PHP] get the domain to display on my page

2001-03-26 Thread Renze Munnik

Well, you can use the $HTTP_REFERER, but it's not all to reliable.


On Mon, Mar 26, 2001 at 04:13:17PM -0600, Jacky wrote:
> Hi all
> Is there anyway I can get the domain name where the viwer came from and write it out 
>on my page?
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for yourself"

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




  1   2   >