[PHP] DOM - Question about \0

2008-03-16 Thread dav
Hi, I have question about \0 character with DOM : ?php $cdata = 'foo' . \0 . 'bar'; $dom = new DOMDocument('1.0', 'utf-8'); $dom-formatOutput = true; $container = $dom-createElement('root'); $blob = $dom-createElement('blob');

[PHP] XML dom encode

2002-10-04 Thread Dav rn Jhannsson
?php header(Content-Type: application/xml); //query database records $connection = mysql_connect(localhost, user, pass) or die(can't connect); mysql_select_db(webbish); $query = SELECT id, title, artist FROM xmldb; $result = mysql_query($query); if(mysql_num_rows($result) 0){

RE: [PHP] Re: XML dom encode

2002-10-04 Thread Dav rn Jhannsson
-Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: 4. október 2002 12:23 To: [EMAIL PROTECTED] Subject: [PHP] Re: XML dom encode On 10/04/2002 09:14 AM, 翽 wrote: But I need to modify this script so that I can set the encoding of the xml document to ISO-8859-1 so

[PHP] Re: Function Call Line Number

2001-11-14 Thread dav
Well, I don't know either but I was thinking about that... Usually this $lineno = __LINE__ would be avaluated when the function is called, this mean it gives the __LINE__ of the function call itself. Why don't you try a more simple include/require instead of calling a funcion ?(see example) but

[PHP] Re: Function Call Line Number

2001-11-14 Thread dav
Another thing... if the $lineno variable isn't defined yet, maybe the parser first try a cast into __LINE__ type, so even if the assign procedure is called at the function call, the line is evaluated at the funcion definition step... but maybe it's a bullship :-) J Dav [EMAIL PROTECTED] ha

[PHP] Re: using sessions and include

2001-11-14 Thread dav
session name in the display_image appears to be different from the name specified in the index Jtjohnston [EMAIL PROTECTED] ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Martin, are ya out there? Does anyone know anything about sessions? (An post reply would be handy

[PHP] Re: Multiple .ini-files for PHP

2001-11-14 Thread dav
You can pass different ini stuff in the htaccess file for each virtual host Stefan [EMAIL PROTECTED] ha scritto nel messaggio 002a01c16ce4$bf6bc960$3c01a8c0@quasimodo">news:002a01c16ce4$bf6bc960$3c01a8c0@quasimodo... Is there a way to have different .ini-files for each VirtualHost? Apache is used

[PHP] Re: Multiple .ini-files for PHP

2001-11-14 Thread dav
From www.php.net searching htaccess in the online documentation: When using PHP as an Apache module, it is possible to override PHP ini setting per Virtual Host in httpd.conf or per directory with .htaccess. Refer to the Configuration section and Apache Manual for details. Stefan [EMAIL

[PHP] Re: array_unique() workaround?

2001-11-14 Thread dav
You can: 1) make a while cycle 2) pop the value 3) use the in_array to check if the value is in the array (pop means extract not only get) 4) if in_array function returns true push the value in a new array J Spunk S. Spunk III [EMAIL PROTECTED] ha scritto nel messaggio [EMAIL

[PHP] Re: VALUABLE LESSON: using sessions and include

2001-11-14 Thread dav
What you can do is not to name session at all :-) It's easyer :-) J Jtjohnston [EMAIL PROTECTED] ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thanks Dav, You caught me while I was debugging. But I learned a valuable lesson! I indeed did not name my sess

[PHP] Re: Array problrem!

2001-11-14 Thread dav
It seems you data are down-taken to Integers (int) instead of the correct variable type. Try to define the array as an array of correct types, otherwise the array will be int type and will contain integers (1.2 taken to 1, 0,5 taken to 0, and so on) J De Necker Henri [EMAIL PROTECTED] ha scritto

Re: [PHP] array_unique() workaround? SOLUTION!

2001-11-14 Thread dav
Well infact you are checking equity, like my suggestion about in_array :-) Spunk S. Spunk III [EMAIL PROTECTED] ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thanks everyone for the ideas, Here's what I came up with... I forgot to mention that I needed to preserve the

[PHP] Re: $QUERY_STRING

2001-11-13 Thread dav
Try getenv() function to import the query string from apache ambient. This is not a bug, maybe the index.php?1 isn't standard at all. Ernesto [EMAIL PROTECTED] ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I'm a newbie using Apache 1.3.22 and PHP 4.0.6 on Windows.

[PHP] Re: Checkboxes / Undefined Variables

2001-11-13 Thread dav
define it :-)) boolean name_of_chechbox_3; for example J [EMAIL PROTECTED] ha scritto nel messaggio news:[EMAIL PROTECTED] .net... In am HTML form, checkboxes NOT checked are not passed to the PHP script called by the form. Therefore, if $name_of_chechbox_3 is not passed but it's used in

[PHP] Re: Frames and Sessions

2001-11-13 Thread dav
I agree :-)) J Jimmy Elab [EMAIL PROTECTED] ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Michael Hall wrote: can't figure out how I'm going to maintain a session across the three seperate HTML files in the frameset. You don't! PHP and your browser will do it for

[PHP] Re: can php detect whether an email address is a valid one?

2001-11-13 Thread dav
You can do it like: 1) Have php send the email with a particulare return reply so that wrong email addresses get sent back to it 2) Configure procmail to launch a php script when an email is received on that account (the return one) 3) Write the php script (SCRIPT NOT WEB) to parse the email

[PHP] Re: Destroying Session Prob

2001-11-12 Thread dav
Try a more simple: ?php session_start(); session_destroy(); echo(You are now logged off br); ? Joe Van Meer [EMAIL PROTECTED] ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi again, I've just completed my logout process, everything is going great but after I log out

Re: [PHP] Excel to MySQL

2001-10-28 Thread dav
I use to save my access data to a dbf file and then use the dbf2mysql (see www.mysql.com site). dbf2mysql will create proper tables and export data to the mysql really faster than odbc. Very easy. I have exported someting like 5.000.000 records into 8 differents tables in 4 hours (3 cdroms of