[PHP] Re: flash and php (using the varibles)

2003-01-09 Thread rolf vreijdenberger

in flash:

result=null;
URL= myscript.php
loadVariables(URL, myobject, POST)//flash 5, MX has better capabilities
gotoAndPlay(checkframe)

well, you get a name/value pair from the script.
the script ran some queries on the database.
teh output from the script to flash is:
mynumber=123result=true
Ok, in flash, in the checkFrame you check for a result variable
---
if(result==true){
//watch out, true is a string in flash, even if it is a boolean in php
//take some action
}elseif(result==false){
//ooops, error, output error message
}

capiche?

 Hi guys i hope there is someone in here that use flsah along with php to
 help with this :)

 Anyway i will make it simple.

 mysql returns a number say 123 i want flash to take this number to animate
a
 progress bar, but here the problem it does work but the progress bar
dosn't
 animate it just sets to the hieght of the numbers sent back from mysql.
How
 can i slow down the animation of the progress bar

 Anyone





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




[PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread rolf vreijdenberger

hey there,

I include files outside the document root in my site.
include $_SERVER['DOCUMENT_ROOT'].../inc.php ;

when I use this on the localhost it doesn't find this variable:
$_SERVER['DOCUMENT_ROOT']

which makes testing more annoying since I have to upload to my site all the
time.

any ideas on the how and why???
thanks a lot



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




Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Rolf Vreijdenberger
yes, the server var doesn't exist in phpifno();

no difference
winxp pro with iss

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




Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread rolf vreijdenberger
I use php 4.2.3

and only my pc is running xp, the server is a linux machine



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




Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread rolf vreijdenberger

the document_root just doesn't show up in my phpinfo();

do windows machines have one anyway?
I have used this var before, just not testing it locally.

It normally shows up when I use phpifno on the server.



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




[PHP] Default argument values for functions

2002-12-16 Thread rolf vreijdenberger
I want to use the value of a variable that is defined in a text.inc.php file
as a default argumant value for a function.
$t_email_afzender_rtg
It doesn't work !!!
I tried it without quotes and with.
If I just put a string value in it it works, but that defeats the purpose of
my inc.php file!
So this is just a theoretical thing !

function htmlemailheaders($from=$t_email_afzender_rtg,$CC=,$BCC=)
{
 $mailheaders = From: $from\r\n
 $mailheaders .= Reply-To: $from\r\n;
 if($CC!=)
 {
  $mailheaders .= Cc: $CC\r\n }
 if($BCC!=)
 {
  $mailheaders .= Bcc: $BCC\r\n;
 }
 $mailheaders .= MIME-Version: 1.0 \r\n;
 $mailheaders .= Content-type: text/html;charset=us-ascii \r\n;
 $mailheaders .= Content-Transfer-Encoding: 7bit \r\n;
 return $mailheaders;
}//end function
htmlemailheaders()-

thanks for your help



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




[PHP] stop script on browser closing

2002-12-16 Thread rolf vreijdenberger

I was wondering when a script stops executing server side.
I am sending out a large number of mails.
This takes some time ( 30 secs) before it is done.
If I close the browser window before the execution of the script, a lot of
emails do not arrive.
is there a way to prevent this?
and how does this function?
how does the server side script know that I close the browser window?
Is all of the above true?

thanks a lot



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




Re: [PHP] stop script on browser closing

2002-12-16 Thread rolf vreijdenberger

yes, thank you, found it in the manual

thanks



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




[PHP] Re: Just Curious

2002-12-08 Thread rolf vreijdenberger
outlook express 6



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




Re: [PHP] Good eve

2002-12-07 Thread rolf vreijdenberger


sorry, I read your post wrong!

don't use php functions, but use native database functions.
in mysql you can use date_format()

 SELECT field from table where  date=DATE_FORMAT(now(), '%d/%m/%y);

this makes the format of now(), which is 2002-12-07 into a format with first
the days of the week in numeric form (%d) followed by a / (/) followed by
the months of the year in numeric form(%m) etc



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




[PHP] Mail(): How much time?

2002-12-06 Thread rolf vreijdenberger
Hi,
I am getting all my emailadresses for my mailinglist out of a database in a
loop,
and in that same loop I personalize the email by adding the name and a
personal URL (script.php?email=youremail).
In that loop I then send the email.
This whole process takes about 0.5 to 2 seconds per adress.
This seems quite long to me.
It can't be the database query or the if conditions in the loop, so why is
this taking so long??
I don't have any problems with script execution time as I increment it in
every iteration.
This is not a nice solution though.
I am also wondering how many adresses you can put in one subject, Cc or Bcc
field?

thanks in advance

--
Rolf Vreijdenberger
De Pannekoek en De Kale
Maystraat 6
2593 VW Den Haag
T: 06-24245719
E: [EMAIL PROTECTED]
W: www.depannekoekendekale.nl



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




Re: [PHP] Mail(): How much time?

2002-12-06 Thread rolf vreijdenberger
I do something similar, I wasn't clear with what I meant by a loop. the loop
is the same as you do, I work on the result set too!



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




[PHP] evaluating vars in a var

2002-12-06 Thread rolf vreijdenberger
Hi,
this problem came forth from my previously posted -Mail(): how much time-,
but is different so I posted it seperately.

I make html emails with personal stuff in it e.g.
span class='someclass'hello $firstName $lastName/span
etc.

Problem:
I would like to put the whole email html layout in one var, like this:
$htmlEmail = htmlbodyspan class='someclass'hello $firstName
$lastName/span/body/html;

and then I want to have the values of firstName and $lastName updated in
every iteration of a loop where I put in new Values of these vars.
In order to do this, I have to reevaluate the whole $htmlEmail variable.

Is this possible, and if so, how?

thanks a lot



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




Re: [PHP] evaluating vars in a var

2002-12-06 Thread rolf vreijdenberger
thanks a lot,
I thought there might be a trick,
this is really helpful,
thanks again



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




Re: [PHP] Good eve

2002-12-06 Thread rolf vreijdenberger
 SELECT field1, field2, field3 FROM table WHERE date=NOW()



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




[PHP] Re: Your opinion on globals/reference

2002-11-03 Thread rolf vreijdenberger
but what if you decide later you want more objects or globals in your
function??
your parameter list could get quit long!

--
Rolf Vreijdenberger
De Pannekoek en De Kale
W: www.depannekoekendekale.nl
Gerard Samuel [EMAIL PROTECTED] schreef in bericht
news:3DC54436.2090803;trini0.org...
 Something I just thought of about using global in a function.
 Mostly I global objects in a function like -

 function foo()
 {
 global $bar_object;
 $bar_object-do_something();
 }

 Is it better, more effiecient, if I pass it by reference, like -
 function foo($bar_object)
 {
 $bar_object-do_something();
 }

 Thanks for your thoughts...

 --
 Gerard Samuel
 http://www.trini0.org:81/
 http://dev.trini0.org:81/





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




[PHP] storing inc.php outside doc root

2002-10-31 Thread rolf vreijdenberger
hi,
I want to include a file that is one directory above my web document root on
the server.
eg. www.mydom.com/file.php wants to include a file that is one dir higher,
so that file is not accesible via the web.
how can I access this file, if I specify a include(../inc.php); it doesn't
work.
I also want to use this for downloading files only via php scripts!
thanks

--
Rolf Vreijdenberger
De Pannekoek en De Kale
Maystraat 6
2593 VW Den Haag
T: 06-24245719
E: [EMAIL PROTECTED]
W: www.depannekoekendekale.nl



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




[PHP] storing inc.php outside doc root/security/includes

2002-10-31 Thread rolf vreijdenberger
this is how it is done:

include ($_SERVER['DOCUMENT_ROOT'].'/../sensitivedata.inc.php');

explanation:
suppose i have a file:
www.mydomain.com/file.php
on the server it could be :
 /home/sites/site168/web/file.php
this file wants to include a file with sensitive data, (or just download
some other files ) that should not be in the root (accessible via the web)
so I store this files in this directory, one higher than the doc root
/home/sites/site168/
like this
/home/sites/site168/sensitivedata.inc.php
it is now inaccesible via the web in a direct way, but not indirectly,
through other php scripts.

you include it in the way described above:
include ($_SERVER['DOCUMENT_ROOT'].'/../sensitivedata.inc.php');
$_SERVER['DOCUMENT_ROOT']
quote php manual The document root directory under which the current script
is executing, as defined in the server's configuration file.

hope to have helped you all



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




Re: Fw: [PHP] Re: headers and cookies

2002-10-30 Thread rolf vreijdenberger
   what I found out in the meantime is that you CAN use cookies and headers,
just like you said, but my particular problem arose because a notice was
issued for an undefined variable;
I didn't check correctly for it's existence.
so any output, and also output like notices, warnings and errors, just
anything you might get in a development situation, outputs headers and the
consecutive calls to header() or setcookie() will fail.

for clarity, this was the output:
notice; undefined index: bla in file.php on line 162 #wrong check in if
condition
warning: cannot add header infromation - headers already sent by (output
started at file.php) in file.php on line 164#wetcookie call, but notice has
already been sent out, so this will fail



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




[PHP] headers and cookies

2002-10-29 Thread rolf vreijdenberger
I have one more than one occasion run into the problem of headers already
sent when I was using the header function in combination with cookies.
What is the right way of doing it?
?php
header ( your thinggies here);
setcookie(blabal);

or the other way round? can I do php routines between these consecutive
calls for header and cookie?
I know that all headers must be sent before other output but what is the
catch here?


--
Rolf Vreijdenberger



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




Re: [PHP] headers and cookies

2002-10-29 Thread Rolf Vreijdenberger
thanks, I already thought so
I'll check it out!

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




[PHP] Re: headers and cookies

2002-10-29 Thread rolf vreijdenberger

but are you really sure that you cannot use setcookie() and header() at the
same time??
I cannot find it anywhere, either in the manuals or in tutorials or in the
output control functions!



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




Re: [PHP] outputting articles in a certain format.

2002-10-24 Thread rolf vreijdenberger
Ok, so basically, what you are saying is:
do it yourself, or use other programms to do it for you.
The basic layout is IN the database!

I understand the way you might do it in xml, with e.g. a text element that
includes paragraph elements that might include bold elements etc.

I thought people might do it with linked tables, where the article id
referred to a linked article id that is a key with the paragraph id with
other columns being e.g. header and paragraph text.
but this might be an overkill.
Or as I said before, just plain including of html pages ( which might be
useful in framesets but not in standalone pages with sidemenus, banners
etc.)

thanks anyway.!



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