[PHP] Merging Strings

2005-05-03 Thread Rolf van de Krol
Hi all,

why do result the following two examples in two different value for $month?
(1)
$current_date = getdate(time());
$month = strval($current_date['year']);
$month .= (strlen(strval($current_date['mon'])) ==
2)?$current_date['mon']:(0.$current_date['mon']);
(2)
$current_date = getdate(time());
$month = strval($current_date['year']) .
(strlen(strval($current_date['mon'])) ==
2)?$current_date['mon']:(0.$current_date['mon']);

The first example sets $month to 200505 and the second sets it to 5. Why is
that. In my opinion they both should set it to 200505.
Is this a weird bug, or did i something wrong?

I'm using PHP 4.3.10 with Apache 1.3.33 on W2K Pro, but the server of my
hosting provider does the same (php 4.3.10 + apache (don't know the version,
i guess 1.3.33) on linux (i'm not sure, but i thought it was redhat)).

Rolf van de Krol

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



[PHP] Creditcard transactions

2004-04-01 Thread Rolf van de Krol
Hi all,

Does anybody know a good start to search for information about creditcard
transactions handled by php? I've tried Google, but I didn't find relevant
information.

Rolf

///
/   Suicidal twin kills sister by mistake!/
///

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



[PHP] OOP Get Parent data

2004-03-11 Thread Rolf van de Krol
Hi everybody,

In the code below are three x-char in the function parent_test of the class
browser. What do I have to type there when I want to get the var $test from
the session-object.

class session {
 var $test=TEST;
 var $browser;

 function init() {
  $this-browser = new browser;
 }
}

class browser {
 function parent_test() {
  return xxx;
 }
}

I tried $this-parent-test but it doesn't work. Can anybody help me?

Rolf

///
/ 640K ought to be enough for anybody./
/   Bill Gates '81/
///

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



[PHP] Parse error

2004-02-17 Thread Rolf van de Krol
Does anybody know what this error can meen?
Parse error: parse error, unexpected T_VARIABLE in
/www/htdocs/rolfvand/thinkquest/browsercheck.php on line 46
What is a T_VARIABLE?

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



[PHP] Parse Error

2004-02-17 Thread Rolf van de Krol
More info about the parse error of my previous post:
The lines 45-46:
$mysql_query = INSERT INTO
sessions(sessionid,ver,agent,bwinf,screenwidth,screenheight,availwidth,avail
height) ;
$mysql_query .=
VALUES('$sessionid','$ver','$agent','$bwinf',$scrwidth,$scrheight,$availwid
th,$availheight);

The error is:
Parse error: parse error, unexpected T_VARIABLE in
/www/htdocs/rolfvand/thinkquest/browsercheck.php on line 46

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



[PHP] Session (maybe cookies)

2004-02-03 Thread Rolf van de Krol
Hi all,

I tried to start a session by this code:
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
html
head
titleUntitled Document/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body
?php session_start();
echo(session_id());
?
/body
/html

When I execute it I got the following error:
Warning: session_start(): Cannot send session cookie - headers already sent
by (output started at e:\rolf\sites\thinkquest\sessiontest.php:9) in
e:\rolf\sites\thinkquest\sessiontest.php on line 9

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at e:\rolf\sites\thinkquest\sessiontest.php:9)
in e:\rolf\sites\thinkquest\sessiontest.php on line 9
e183565b226d52b334b792e4b367221c

These are the headers which my browser sended:
GET http://localhost/sessiontest.php HTTP/1.0
Accept: */*
Accept-Language: ie-ee,nl;q=0.7,is;q=0.3
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Host: localhost
Proxy-Connection: Keep-Alive

And these are the headers which Apache returned:
HTTP/1.1 200 OK
Date: Tue, 03 Feb 2004 18:38:40 GMT
Server: Apache/1.3.28 (Win32) PHP/4.3.3
X-Powered-By: PHP/4.3.3
Connection: close
Content-Type: text/html

Does anybody know why these errors occurs??

Waiting for answer,

Rolf van de Krol

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



[PHP] Cookies

2004-01-21 Thread Rolf van de Krol
Hi all,

When I try to set a cookie, an error occurs: 'Cookie already set'. Does
anybody know why this error occurs?? I don't know.

Rolf van de Krol

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



[PHP] RE: How to make a timer inside the database?

2004-01-20 Thread Rolf van de Krol
Hi Radwan,

There's something like a MySQL-manual when you want to know something like
this, but I understand it if you don't want to read it at all. It's a kind
of big.

I don't expect it is possible top put a timer in MySQL, but why shouldn't
you put the start time in the database. Everytime you need the number you
described, you have to calculate the minutes which expired from the start
time. Then you divide the number of minutes by 10 and round it down to zero
decimals.
Is this a solution? If not please explain.

Rolf


-Oorspronkelijk bericht-
Van: Radwan Aladdin [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 20 januari 2004 9:30
Aan: [EMAIL PROTECTED]
Onderwerp: How to make a timer inside the database?


Hi all

Is it possible in mySQL to put a timer that changes a value inside a row in
a table every while?

For example : Add 1 to the value very 10 minutes for example.. Field
number = 5 after ten minutes = 6 after another 10 minuste = 7..Etc..

Is it possible?And how?

Regards..

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