Re: [PHP] chill out

2003-04-03 Thread Mat Harris
On Thu, Apr 03, 2003 at 01:20:01 +0800, Jason Wong wrote:
> On Thursday 03 April 2003 11:14, [EMAIL PROTECTED] wrote:
> 
> > We subscribe to a few email lists on various languages.
> >
> > This list would have to be the worst for anyone learning
> > - the amount of sarcasm and flaming that goes on is huge.
> 
> Try subscribing to the qmail list for a day or two.

better than that, try the openbsd-misc mailing list :)

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]   www.genestate.com   


pgp0.pgp
Description: PGP signature


Re: [PHP] magic quotes

2003-04-03 Thread Leif K-Brooks
That's exactly what magic_quotes_runtime does.  It adds slashes to data 
at runtime - including data returned from functions such as 
mysql_fetch_(assoc/row/array/object).  

Justin French wrote:

Hi all,

Can I just have a quick head check on magic quotes runtime (&gpc)?

I have them both set to Off currently, and my pages work fine.  However,
when I set them to on, I end up with slashes throughout the mysql data.
Is this the expected behaviour?  Seems counter-intuitive to me, but I've
never really cared about it 'till today, because i've never had a problem!!
What is a common setting for these two directives, so that I can have my LAN
server *reasonably* "normal".
TIA
Justin
 

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


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


[PHP] space

2003-04-03 Thread Diksha Neel
hi all!

in an html file thru a php script, i have to put in some
data.
i am using variable $string to write the data as under.
what i want to know is how can i ensure that the value of
$badd1 and $area get written on different lines.
in other words, i want to know how to use '\n' here.
thanks,
diksha.

';
  $string.=$badd1;
  $string.=$area;
  $string.=$city;
  $string.='
  
___
Odomos - the only  mosquito protection outside 4 walls -
Click here to know more!
http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htm&&odomos&&wn
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] magic quotes

2003-04-03 Thread Chris Hewitt
Justin French wrote:

Hi all,

Can I just have a quick head check on magic quotes runtime (&gpc)?

I have them both set to Off currently, and my pages work fine.  However,
when I set them to on, I end up with slashes throughout the mysql data.
Is this the expected behaviour?  Seems counter-intuitive to me, but I've
never really cared about it 'till today, because i've never had a problem!!
What is a common setting for these two directives, so that I can have my LAN
server *reasonably* "normal".
The defaults are runtime off and gpc on. As you refer specifically to 
slashes in mysql data I assume that the runtime one is more relevant to 
what you are doing. If your code runs properly with runtime off then you 
are doing the addslashes/stripslashes as intended. With the same code 
and runtime on then you will get double slashes.

I had reason to look at this in the manual yesterday and it seems the 
magic_quotes_runtime turned on is aimed more at beginners (but I could 
be wrong).

What I have done is to do the addslashes/stripslashes assuming 
magic_quotes_runtime is off then force it off within my code beforehand 
with:

   if (ini_get('magic_quotes_runtime') == 1)
   {
   if (ini_set('magic_quotes_runtime','Off') == false)
   {
   echo "ERROR: Could not turn off magic_quotes_runtime\n";
   }
   }
I found that ini_set would through an error if the seting was already 
made, hence the initial check. So far this seems OK, but it was only 
yesterday...

If anyone else has a better suggestion, I'd be pleased to hear it.

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


Re: [PHP] space

2003-04-03 Thread Leif K-Brooks
The manual is your friend! :)
www.php.net/nl2br
Diksha Neel wrote:

hi all!

in an html file thru a php script, i have to put in some
data.
i am using variable $string to write the data as under.
what i want to know is how can i ensure that the value of
$badd1 and $area get written on different lines.
in other words, i want to know how to use '\n' here.
thanks,
diksha.

';
  $string.=$badd1;
  $string.=$area;
  $string.=$city;
  $string.='
  
___
Odomos - the only  mosquito protection outside 4 walls -
Click here to know more!
http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htm&&odomos&&wn 



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


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


Re: [PHP] magic quotes

2003-04-03 Thread Justin French
Hi Philip,

Thanks for taking the time...

$me = "confused";

...but rather than attempting to get a grip on the past, I need a solution
for the future :)

So, 

1. turn ON runtime and gpc

2. only addslashes() when inserting into the database IF
get_magic_quotes_runtime() is 0 (false)

3. only stripslashes() when retrieving from the database IF
get_magic_quotes_runtime() is 0 (false)

Right so far?


Then I need to know how to fix up possible mistakes in the past.
What should I do to the current data in multiple tables which may or may not
have had the addslashes() "done twice".  Any one got some cool code???


Justin



on 03/04/03 6:43 PM, Philip Olson ([EMAIL PROTECTED]) wrote:

> On Thu, 3 Apr 2003, Justin French wrote:
> 
>> Hi all,
>> 
>> Can I just have a quick head check on magic quotes runtime (&gpc)?
>> 
>> I have them both set to Off currently, and my pages work fine.  However,
>> when I set them to on, I end up with slashes throughout the mysql data.
> 
> This means you essentially ran addslashes() twice before
> insertion.  Don't do that.  You should never ever have to
> strip slashes from data already in the database.
> 
>> Is this the expected behaviour?  Seems counter-intuitive to me, but I've
>> never really cared about it 'till today, because i've never had a problem!!
> 
> No, only add slashes once.  Do this with a function like
> addslashes() OR do it magically.  Once.
> 
>> What is a common setting for these two directives, so that I can have my LAN
>> server *reasonably* "normal".
> 
> Defaults to on so I guess that's "normal".  See also
> get_magic_quotes_gpc()...
> 
> Regards,
> Philip
> 
> ---
> [This E-mail scanned for viruses]
> 
> 


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



[PHP] @getimagesize

2003-04-03 Thread Diana Castillo
even though I use a @getimagesize , I still get the following Warning when the image 
is not on the server.  I need to somehow not have the warning come out when there is 
no image there.

Warning: getimagesize(http://www.hotelresb2b.com/planos/PLHAHC019330.GIF) 
[function.getimagesize]: failed to create stream: HTTP request failed! HTTP/1.1 404 
Not Found at c:\inetpub\wwwroot\web\site\ReservationManager.php line 190.

I am using PHP Version 4.3.1
Thank you , Diana 


RE: [PHP] @getimagesize

2003-04-03 Thread Niklas Lampén
Check if file exists with file_exists().


Niklas


-Original Message-
From: Diana Castillo [mailto:[EMAIL PROTECTED] 
Sent: 3. huhtikuuta 2003 11:42
To: [EMAIL PROTECTED]
Subject: [PHP] @getimagesize


even though I use a @getimagesize , I still get the following Warning
when the image is not on the server.  I need to somehow not have the
warning come out when there is no image there.

Warning:
getimagesize(http://www.hotelresb2b.com/planos/PLHAHC019330.GIF)
[function.getimagesize]: failed to create stream: HTTP request failed!
HTTP/1.1 404 Not Found at
c:\inetpub\wwwroot\web\site\ReservationManager.php line 190.

I am using PHP Version 4.3.1
Thank you , Diana 

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

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



RE: [PHP] Can php run as a script?

2003-04-03 Thread John Coggeshall

>Note that any errors will be chucked back to the terminal in HTML.

Only if you are using the CGI version of PHP. The CLI version prints
errors, etc without HTML.

John



-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org  http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
>Sent: Thursday, April 03, 2003 2:38 AM
>To: [EMAIL PROTECTED]
>Subject: Re: [PHP] Can php run as a script?
>
>
>
>PHP can run as a script indeed.
>
>#!/usr/bin/php
>
>Do that like you would perl and then make it executable. Should work.
>
>
>
>
>On 4/2/2003, "Poon, Kelvin (Infomart)" <[EMAIL PROTECTED]> wrote:
>
>>Hi,
>>
>>This might be a newbie question but I can't find an answer anywhere I 
>>search.  I know php can be excuted by a web browser, but can 
>it run as 
>>a script like Perl?
>>
>>The reason i ask is, I need to write a php script that updates a 
>>database
>in
>>a server.  And this script needs to be running in the background as a 
>>service, that's why i was wondering if I can excute it like a perl 
>>script.
>>
>>If it can't, do you guys know if I can use perl to call up a php 
>>script?
>>
>>Please advise.
>>
>>Thanks,
>>Kelvin
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>
>Edd Barrett
>(http://www.filibusta.net)
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



[PHP] Apache SetHandler

2003-04-03 Thread Zoff
Hi Guys!

ich have a question with apache and mod_perl I can write a Handler in perl
which is called before anything else happens. this allows me to write all sorts of 
auth stuff.
is there something similar in PHP.
e.g.:

in httpd.conf


SetHandler MyFoo.php

this would really help a lot !

	Zoff.

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


Re: [PHP] Apache SetHandler

2003-04-03 Thread Jason Wong
On Thursday 03 April 2003 17:06, Zoff wrote:

> ich have a question with apache and mod_perl I can write a Handler in perl
> which is called before anything else happens. this allows me to write all
> sorts of auth stuff. is there something similar in PHP.
>
> e.g.:
>
> in httpd.conf
>
> 
> SetHandler MyFoo.php
> 

Have a look at the auto_prepend_file and auto_append_file settings in php.ini. 
Note that you can set these per domain/directory by appropriate entries in 
httpd.conf/.htaccess.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Things equal to nothing else are equal to each other.
*/


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



[PHP] sql: unable to save result set

2003-04-03 Thread Johannes Esteban Kalunka
Hi!
since upgrading my mysql server from 3.23.xx to 4.0.12 the following
error appears on all my php pages (that make use mysql, of course): php
version used : 4.1.2
 
Warning: MySQL: Unable to save result set in ...
 
does anybody know why? 
 
thanks in advance for any hints!
 
Johannes E Kalunka




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



[PHP] Re: *Umlauts/UTF-8

2003-04-03 Thread Alexey Lysenkov
Please, anybody? I'm really stuck with this. Please, help, if you know 
the solution.

-Alex

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


Re: [PHP] Ok, problem found, but that makes way for another...

2003-04-03 Thread Marek Kilimajer
The old installation is likely in /usr, and you installed in /usr/local. 
Simply remove the old installation (man rm ;-) and change httpd.conf  to 
look for php in the new place

Ryan Vennell wrote:

ok, my last post stated that i've tried reconfigureing.making/makeinstalling php 4.3.1 a tons of times.  well, today when i typed php -v it told me that version 4.2.2 was the one that was installed.  so apparently my installing has not been taking the place of the old one.  

The original root is that the original compile of php (not done by me) was installed w/out mysql and i need mysql for what i'm working on.

now that i know the problem here, any suggestions?

I'm running apache for what i'm working on, tomcat for other things that this server does, and the latest version of mysql

now how do i get rid of hte old php and make sure this new one goes into its place?

P.S.- i'm not a total linux newb but i'm not, NOT a newb either.

 



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


Re: [PHP] uploading entire directory, with or without compression ...

2003-04-03 Thread David T-G
Kenn --

...and then Kenn Murrah said...
% 
% i was afraid you were gonna say that, jason ... but i was hoping i had
% overlooked something ...

Yeah.  I went the same route on the list a while back.  Check the
archives :-)


% 
% anyway, thanks for your response ... i'm familiar enough with your input to
% this list that, if you say it can't be done, i'll look no farther ...

Darn!  I was hoping you'd be more persistent and insistent :-)

I should think that some javascript could collect the files in a dir, or
better yet allow multiple selections, and then build the necessary form
for upload (or even build the upload data with MIME separators and all),
but I don't know JS and haven't yet found anyone who's written one...


% 
% thanks again,


HTH & HAND & good luck -- for my sake, too!

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] @getimagesize

2003-04-03 Thread Diana Castillo
according to the documentation on  php.net , This function will not work on
remote files; the file to be examined must be accessible via the server's
filesystem.

so it wont work for http

"Niklas lampén" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Check if file exists with file_exists().
>
>
> Niklas
>
>
> -Original Message-
> From: Diana Castillo [mailto:[EMAIL PROTECTED]
> Sent: 3. huhtikuuta 2003 11:42
> To: [EMAIL PROTECTED]
> Subject: [PHP] @getimagesize
>
>
> even though I use a @getimagesize , I still get the following Warning
> when the image is not on the server.  I need to somehow not have the
> warning come out when there is no image there.
>
> Warning:
> getimagesize(http://www.hotelresb2b.com/planos/PLHAHC019330.GIF)
> [function.getimagesize]: failed to create stream: HTTP request failed!
> HTTP/1.1 404 Not Found at
> c:\inetpub\wwwroot\web\site\ReservationManager.php line 190.
>
> I am using PHP Version 4.3.1
> Thank you , Diana
>
> ###
> This message has been scanned by F-Secure Anti-Virus for Internet Mail.
> For more information, connect to http://www.F-Secure.com/



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



Re: [PHP] uploading entire directory, with or without compression ...

2003-04-03 Thread Awlad Hussain
I found this link that has a stand alone java application that will allow to
to upload a folder... if that what you want? or you want it to be embedded
in your webpage?

http://support.softartisans.com/docs/JFile/prog_g_recursive.htm

hope you find it useful
-awlad


- Original Message -
From: "David T-G" <[EMAIL PROTECTED]>
To: "PHP General list" <[EMAIL PROTECTED]>
Cc: "Kenn Murrah" <[EMAIL PROTECTED]>
Sent: Thursday, April 03, 2003 11:37 AM
Subject: Re: [PHP] uploading entire directory, with or without compression
...



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



Re: [PHP] *Umlauts/UTF-8

2003-04-03 Thread Marek Kilimajer
Where do you get the ?'s and squares? In the browser? Did you specify 
encoding?

Alexey Lysenkov wrote:

Hello,

I am having a problem with umlauts in utf-8 encoded txt file, which is 
being read by my script. Instead of umlauts I get ? or squares or 
anything else, but not those umlauts. What is the problem, can anybody 
help, please?

Thanks.

ps. I've chosen utf-8, because I have to have Western European _and_ 
Cyrillic characters on the same page. utf-8 seems to be the only 
encoding to let me do that.

pps. originally posted at php.lang, but it seems that no one lives 
there anymore :-/




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


Re: [PHP] *Umlauts/UTF-8

2003-04-03 Thread Alexey Lysenkov
I have the junk showing up in my browser (Moz 1.3 / IE5.5 on Win2K)
Strangely enough it happens only on one page - another page, containing 
even more text, shows all umlauts alright. I don't knwo where the 
problem is. :-/ Txt file self?...

Alex

Marek Kilimajer wrote:
Where do you get the ?'s and squares? In the browser? Did you specify 
encoding?



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


RE: [PHP] Re: *Umlauts/UTF-8

2003-04-03 Thread nospam
Hi Alexey

I can't tell about Cyrillic, but for "Umlauts" :
When you write the Text-Files, you can try to encode them
an entities. I stole the following function somewhere :

function encodemymail($txt) {
 for ($i = 0; $i < strlen($txt); $i++) {
  $ent .= "&#" . ord(substr($txt, $i, 1)) . ";";
 }
 return($ent);
}
echo encodemymail('ä ü ö [  ]');

i use it for a different purpose, but it may help..

Grüße
Sebastian
 



> -Original Message-
> From: Alexey Lysenkov [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, April 03, 2003 12:43 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: *Umlauts/UTF-8
> 
> 
> Please, anybody? I'm really stuck with this. Please, help, if 
> you know 
> the solution.
> 
> -Alex
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



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



[PHP] Re: *Umlauts/UTF-8

2003-04-03 Thread Alexey Lysenkov
Sorry for disturbing. That was fault - the txt file was not properly 
encoded.

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


[PHP] tets

2003-04-03 Thread Craig
test



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



[PHP] MSSQL using Sybase FreeTDS

2003-04-03 Thread Craig
Hey all,

Im hoping someone can shed some light on this for me:

Im running PHP 4.31 on RH Advanced Server 2.1

I am connecting, to M$SQL Server 2000  using FreeTDS -- with Sybase support,
and Im stumped on 1 thing:

CODE:






The above code works fine, except when one of the fields e.g client_name -
Has a quoted string or an apostrophe in it, it just spews the following
error:

Warning: Sybase error: Line 1: Incorrect syntax near 's'. (severity 15) in
/var/www/html/clients/pages/add_client.php on line 17

Has anyone experienced this, and if so know of a possible solution?? I have
used addslashes() etc but still no joy.

Thanks in advance.

Craig



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



Re: [PHP] MSSQL using Sybase FreeTDS

2003-04-03 Thread Jyry Kuukkanen
On Thu, 3 Apr 2003, Craig wrote:

> Hey all,
> 
> Im hoping someone can shed some light on this for me:
> 
> Im running PHP 4.31 on RH Advanced Server 2.1
> 
> I am connecting, to M$SQL Server 2000  using FreeTDS -- with Sybase support,
> and Im stumped on 1 thing:
> 
> CODE:
> 
> 
>  
> $ccode = $_POST['ccode'];
> $cname = $_POST['cname'];
> $cstreet = $_POST['cstreet'];
> 
> include("includes/connect.php");
> $iqry_clients = mssql_query("INSERT INTO Clients
> (client_code,client_name,client_street) VALUES
> ('$ccode','$cname','$cstreet')");
> 
> mssql_close($conn);
> 
> ?>
> 
> 
> 
> The above code works fine, except when one of the fields e.g client_name -
> Has a quoted string or an apostrophe in it, it just spews the following
> error:
> 
> Warning: Sybase error: Line 1: Incorrect syntax near 's'. (severity 15) in
> /var/www/html/clients/pages/add_client.php on line 17
> 
> Has anyone experienced this, and if so know of a possible solution?? I have
> used addslashes() etc but still no joy.
> 
> Thanks in advance.
> 
> Craig

I think you should pass the values through AddSlashes function:

include("includes/connect.php");
$ccode = AddSlashes($ccode);
$cname = AddSlashes($cname);
$cstreet = AddSlashes($cstreet);
$iqry_clients = mssql_query("INSERT INTO Clients
(client_code,client_name,client_street) VALUES
('$ccode','$cname','$cstreet')");



Cheers,
-- 
--Jyry
:-(C:-/C8-OC8-/C:-(


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



Re: [PHP] newbie2

2003-04-03 Thread Marek Kilimajer
You need to restart http server, php is loaded usually as module.
For apache on unix:
apachectl restart
or
/etc/init.d/httpd restart
on windows close the apache console and start apache again
Ilyas wrote:

It is an online shop : oscommerce

How can I restart Php? Any ideas???

Ilyas
At 06:42 02.04.2003 -0500, you wrote:
fatal error? What gave you this? Enabling it might not be a good 
idea, for
security.
.. but if you want to enable it you have to editing the php.ini and set
register_globals to ON.

cheers,
- Sebastian
- Original Message -
From: "Ilyas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 02, 2003 6:32 AM
Subject: [PHP] newbie2
| FATAL ERROR: register_globals is disabled in php.ini, please enable 
it!
|
| How can I make this?
|
| Thanks...
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, visit: http://www.php.net/unsub.php
|

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





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


[PHP] Re: Database Question

2003-04-03 Thread José Pereira
I Posted this and no one has helpedis this possible to get working or do
I have to do it differently??

Thanks in advance

"José Pereira" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> Hi all,
>
> I'm trying to grab information from two DBs one being a mamber db and the
> other a report DB
>
> I want to print a list of users(pilots for a Virtual Airline) from the
Pilot
> db and then next to them the nº of reports and total hours they have so
far
> from the REPORT DB.  The Pilot ID on this list must be a link so that when
> clicked it will show the details of the reports.
>
> I got this to but in a general for using a variable $login
>
> so when the pilot/member logins it stores his ID in the $login and then I
> use the SELECT * FROM table WHERE column = $login
>
> to be more specific using this code:
>
>  require("require/config.php");
> require("require/authentication.php");
> $auth=authenticate($login, $password);
>
> $link = mysql_connect("localhost", "user", "password")
> or die("Could not connect");
>mysql_select_db("databse") or die("Could not select database");
> $query = "SELECT flight_hhmm FROM pirep WHERE pilot_id='$login'";
> $result = mysql_query($query) or die("Query failed");
> while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
>  $hhmm=explode(':',$line['flight_hhmm']);
>  $totalm+=$hhmm[0]*60+$hhmm[1];
> }
>
> mysql_free_result($result);
>
> ?>
>
> then to print out the number of hours I use this:
>
>  echo $auth["login"]. '. You have ';
> echo floor($totalm / 60).':'.($totalm % 60). ' total hours.';
> ?>
>
> this show the total hours for $login which is the pilot id in the report
DB.
>
> now I have this code to produce TOTAL reports for the site:
>
> $link = mysql_connect("localhost", "user", "password")
> or die("Could not connect");
>mysql_select_db("database") or die("Could not select database");
> $query = "SELECT * FROM pirep ";
> $result = mysql_query($query) or die("Query failed");
>
>
> $nb1 = mysql_numrows($result);
>
>
> This gets me the nº of rows for all pilots the using echo $nb1 will print
> the total reports.
>
> Now I tried alot but no luck.  I wanted to get a list like so:
>
> MVC103  -  100 reports Filed - 130 Hours Total
> MVC104  -  10 report filed  -  50 hours total
> etc,
>
> having the ID (MVCxxx) being a link so when clicked it will show the
> datails.  I tried the count() statement but like I said I new to PHP.
>
> If anyone can help PLS.. take a look at the site, mind you it is in
> portuguese http://novo.cdmvirtual.com
>
>
>
>



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



Re: [PHP] MSSQL using Sybase FreeTDS

2003-04-03 Thread Lowell Allen
> From: "Craig" <[EMAIL PROTECTED]>
> 
> Im running PHP 4.31 on RH Advanced Server 2.1
> 
> I am connecting, to M$SQL Server 2000  using FreeTDS -- with Sybase support,
> and Im stumped on 1 thing:
> 
[snip]
> 
> The above code works fine, except when one of the fields e.g client_name -
> Has a quoted string or an apostrophe in it, it just spews the following
> error:
> 
> Warning: Sybase error: Line 1: Incorrect syntax near 's'. (severity 15) in
> /var/www/html/clients/pages/add_client.php on line 17
> 
> Has anyone experienced this, and if so know of a possible solution?? I have
> used addslashes() etc but still no joy.

MSSQL doesn't use slashes for escaping. You probably need to use a single
quote character instead of a slash. See user notes in the PHP manual,
, which will direct
you to other info on changing the escape character used.

--
Lowell Allen


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



[PHP] Re PHP Message Board

2003-04-03 Thread blade xtreme
I am looking for a bbs script much like the one at this link:
http://www.hardknox.com/discus/messages/board-topics.html
Can anyone help please?

Blade



_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


[PHP] RE: xml parse error?

2003-04-03 Thread SLanger
I might be mistaken but what you are getting is the normalized whitespaces 
inbetween your nodes, which is considered to be their content.
Example:
...




Will return the following dom:

test
   |
---
  /   |   \
#text   test2   #text




Stefan Langer



Re: [PHP] Re: Database Question

2003-04-03 Thread Marek Kilimajer
What is the problem? You need to be more clear about it, especially you 
did not tell anything about the tables, how they are related and what 
they contain

José Pereira wrote:

I Posted this and no one has helpedis this possible to get working or do
I have to do it differently??
Thanks in advance

"José Pereira" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
 

Hi all,

I'm trying to grab information from two DBs one being a mamber db and the
other a report DB
I want to print a list of users(pilots for a Virtual Airline) from the
   

Pilot
 

db and then next to them the nº of reports and total hours they have so
   

far
 

from the REPORT DB.  The Pilot ID on this list must be a link so that when
clicked it will show the details of the reports.
I got this to but in a general for using a variable $login

so when the pilot/member logins it stores his ID in the $login and then I
use the SELECT * FROM table WHERE column = $login
to be more specific using this code:


   $link = mysql_connect("localhost", "user", "password")
   or die("Could not connect");
  mysql_select_db("databse") or die("Could not select database");
   $query = "SELECT flight_hhmm FROM pirep WHERE pilot_id='$login'";
   $result = mysql_query($query) or die("Query failed");
   while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$hhmm=explode(':',$line['flight_hhmm']);
$totalm+=$hhmm[0]*60+$hhmm[1];
   }
   mysql_free_result($result);

?>

then to print out the number of hours I use this:


this show the total hours for $login which is the pilot id in the report
   

DB.
 

now I have this code to produce TOTAL reports for the site:

   $link = mysql_connect("localhost", "user", "password")
   or die("Could not connect");
  mysql_select_db("database") or die("Could not select database");
   $query = "SELECT * FROM pirep ";
   $result = mysql_query($query) or die("Query failed");
$nb1 = mysql_numrows($result);

This gets me the nº of rows for all pilots the using echo $nb1 will print
the total reports.
Now I tried alot but no luck.  I wanted to get a list like so:

MVC103  -  100 reports Filed - 130 Hours Total
MVC104  -  10 report filed  -  50 hours total
etc,
having the ID (MVCxxx) being a link so when clicked it will show the
datails.  I tried the count() statement but like I said I new to PHP.
If anyone can help PLS.. take a look at the site, mind you it is in
portuguese http://novo.cdmvirtual.com


   



 



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


[PHP] Ximian Mail on PHP

2003-04-03 Thread Chris Blake
Greetings learned PHP(eople),

I want to create a PHP page that can pull all the messages from my
PHP-list inbox, and display them on the local intranet.

There are a few users who use PHP and I want to create a system where
they simply log into the intranet, and view the messages with related
answers. Rather than having three machines downloading 100`s of postings
per day from our mail server, I would like to make one point of access
for them.

Ximian stores messages locally in
../evolution/Local/Inbox/subfolders/PHP.there is one large file in
there with everything.

Is this a gigantic task, has anyone done this before, am I re-inventing
the wheel, barking up the wrong tree, or what ?

Where to start ?

-- 
Chris Blake
Office : (011) 782-0840
Cell : 083 985 0379
Linux vs. Windows is a no-WIN situation.


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



RE: [PHP] PHP Email Attachment problem

2003-04-03 Thread Steve Jackson
I also had a similar problem and it was simply because the directory
holding the attachment didn't have permission to send the attachment, so
check the permissions on the directory. Once I changed it it sends fine.
Cheers,
Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159





> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED] 
> Sent: 3. huhtikuuta 2003 8:23
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP Email Attachment problem
> 
> 
> On Wednesday 02 April 2003 04:19, Michael Arena wrote:
> > the only difference in the server setup is on my remote 
> server it's a 
> > RAQ and locally i'm using Xitami with PHP. I don't 
> understand why it 
> > won't send. I get the email over the RAQ but no attachment...
> 
> Have you checked that the file actually gets uploaded?
> 
> > are there any other
> > settings that could differ that I would need to set? Like in the 
> > php.ini file?
> 
> Have you enabled file_uploads in php.ini?
> 
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications 
> Development *
> --
> Search the list archives before you post 
> http://marc.theaimsgroup.com/?l=php-general
> 
> --
> /*
> Our ISP is having {switching,routing,SMDS,frame relay} problems */
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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



[PHP] Stuck!

2003-04-03 Thread Andrew
Having spent hours on my members registration and login pages I am getting
so close to cracking it, but have now hit a brick wall.

I am getting a warning message which I think could stem from somewhere else
in my code but I have no idea where.

There is a little too much code to put here so is there a kind sole out
there who would take a look at my code if I email it to you to see where I
am going wrong?

There are two pages a login page and a new member page.

Thank you



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



Re: [PHP] PHP Email Attachment problem

2003-04-03 Thread Chris Edwards
make sure your form tag has enctype="multipart/form-data" in it

-- 
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com

- Original Message - 
From: "Steve Jackson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 03, 2003 8:00 AM
Subject: RE: [PHP] PHP Email Attachment problem


> I also had a similar problem and it was simply because the directory
> holding the attachment didn't have permission to send the attachment, so
> check the permissions on the directory. Once I changed it it sends fine.
> Cheers,
> Steve Jackson
> Web Developer
> Viola Systems Ltd.
> http://www.violasystems.com
> [EMAIL PROTECTED]
> Mobile +358 50 343 5159
> 
> 
> 
> 
> 
> > -Original Message-
> > From: Jason Wong [mailto:[EMAIL PROTECTED] 
> > Sent: 3. huhtikuuta 2003 8:23
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] PHP Email Attachment problem
> > 
> > 
> > On Wednesday 02 April 2003 04:19, Michael Arena wrote:
> > > the only difference in the server setup is on my remote 
> > server it's a 
> > > RAQ and locally i'm using Xitami with PHP. I don't 
> > understand why it 
> > > won't send. I get the email over the RAQ but no attachment...
> > 
> > Have you checked that the file actually gets uploaded?
> > 
> > > are there any other
> > > settings that could differ that I would need to set? Like in the 
> > > php.ini file?
> > 
> > Have you enabled file_uploads in php.ini?
> > 
> > -- 
> > Jason Wong -> Gremlins Associates -> www.gremlins.biz
> > Open Source Software Systems Integrators
> > * Web Design & Hosting * Internet & Intranet Applications 
> > Development *
> > --
> > Search the list archives before you post 
> > http://marc.theaimsgroup.com/?l=php-general
> > 
> > --
> > /*
> > Our ISP is having {switching,routing,SMDS,frame relay} problems */
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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



RE: [PHP] @getimagesize

2003-04-03 Thread Niklas Lampén
Check the error reporting level on your server.
I tried @getimagesize("http://www.hotelresb2b.com/planos/Pasdasda.gif";)
and I got no error at all. One thing you could try is if
fopen("http://file";, "r") success, but I don't know if it gives you this
stream creating error as well. Remember to close the file right away, if
you use that! :)


Niklas


-Original Message-
From: Diana Castillo [mailto:[EMAIL PROTECTED] 
Sent: 3. huhtikuuta 2003 13:42
To: [EMAIL PROTECTED]
Subject: Re: [PHP] @getimagesize


according to the documentation on  php.net , This function will not work
on
remote files; the file to be examined must be accessible via the
server's
filesystem.

so it wont work for http

"Niklas lampén" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Check if file exists with file_exists().
>
>
> Niklas
>
>
> -Original Message-
> From: Diana Castillo [mailto:[EMAIL PROTECTED]
> Sent: 3. huhtikuuta 2003 11:42
> To: [EMAIL PROTECTED]
> Subject: [PHP] @getimagesize
>
>
> even though I use a @getimagesize , I still get the following Warning
> when the image is not on the server.  I need to somehow not have the
> warning come out when there is no image there.
>
> Warning:
> getimagesize(http://www.hotelresb2b.com/planos/PLHAHC019330.GIF)
> [function.getimagesize]: failed to create stream: HTTP request failed!
> HTTP/1.1 404 Not Found at
> c:\inetpub\wwwroot\web\site\ReservationManager.php line 190.
>
> I am using PHP Version 4.3.1
> Thank you , Diana
>
> ###
> This message has been scanned by F-Secure Anti-Virus for Internet
Mail.
> For more information, connect to http://www.F-Secure.com/



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

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

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



Re: [PHP] MSSQL using Sybase FreeTDS

2003-04-03 Thread Michael Sims
On Thu, 3 Apr 2003 12:17:50 +0100, you wrote:

>Has anyone experienced this, and if so know of a possible solution?? I have
>used addslashes() etc but still no joy.

In addition to what the other respondents have said, you can set the
INI setting magic_quotes_sybase to 1, and this will change
addslashes() so that it escapes a single quote with a single quote
pair.  This is a global setting, though.  If you access two different
databases, say both MS-SQL and MySql, on the same page then I would
suggest that you not use the built in addslashes(), but instead roll
your own escaping function for each DB type.  Or better yet, use a
database abstraction tool like Pear DB which includes a quote() method
that is specific to each DB backend.

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



[PHP] Multiple odbc queries

2003-04-03 Thread Marco Laponder
Hi All,

I have the problem. We have an application and we are using PHP. The startup
page provides the user with a number of links. A link calls a php page where
a call to the database is issued. The problem is with difficult queries,
then it takes some time to process and the user is a little imaptient and
before the request is processed anoter request is done, and if the user is
very impatient the multiple times. So for one user on the server a number of
database connections and transactions are running which is slowwing down the
complete server. WHat is a neat way to solve this ? 

Kind regards, 
 

Marco Laponder
[EMAIL PROTECTED]



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



[PHP] preg_match_all()

2003-04-03 Thread Thomas Johnsson
I am having problems with preg_match_all spanning over newlines.
Using /m does not seem to ignore the the newlines.

// This works
// Both contents inside  and  are found
$html = '
One cell
Another
';

// This does not
// Only the contents inside the first  and  are found
// The only difference is that there is a linebreak efter the second 
$html = '
One cell

Another
';

preg_match_all("/(.*)<\/td>/m", $html, $out);

I have been doing this before, but I can't remember how I got it working...
Any thougts?



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



Re: [PHP] preg_match_all()

2003-04-03 Thread Tom Rogers
Hi,

Thursday, April 3, 2003, 11:33:02 PM, you wrote:
TJ> I am having problems with preg_match_all spanning over newlines.
TJ> Using /m does not seem to ignore the the newlines.

TJ> // This works
TJ> // Both contents inside  and  are found
TJ> $html = '
TJ> One cell
TJ> Another
TJ> ';

TJ> // This does not
TJ> // Only the contents inside the first  and  are found
TJ> // The only difference is that there is a linebreak efter the second 
TJ> $html = '
TJ> One cell
TJ> 
TJ> Another
TJ> ';

TJ> preg_match_all("/(.*)<\/td>/m", $html, $out);

TJ> I have been doing this before, but I can't remember how I got it working...
TJ> Any thougts?


I think you need /s to cope with newlines

-- 
regards,
Tom


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



RE: [PHP] preg_match_all()

2003-04-03 Thread Niklas Lampén
He needs both. /s makes dot to include new lines too, so you're right.


Niklas


-Original Message-
From: Tom Rogers [mailto:[EMAIL PROTECTED] 
Sent: 3. huhtikuuta 2003 16:26
To: Thomas Johnsson
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] preg_match_all()


Hi,

Thursday, April 3, 2003, 11:33:02 PM, you wrote:
TJ> I am having problems with preg_match_all spanning over newlines.
TJ> Using /m does not seem to ignore the the newlines.

TJ> // This works
TJ> // Both contents inside  and  are found
TJ> $html = '
TJ> One cell
TJ> Another
TJ> ';

TJ> // This does not
TJ> // Only the contents inside the first  and  are found
TJ> // The only difference is that there is a linebreak efter the second

TJ> $html = '
TJ> One cell
TJ> 
TJ> Another
TJ> ';

TJ> preg_match_all("/(.*)<\/td>/m", $html, $out);

TJ> I have been doing this before, but I can't remember how I got it
working...
TJ> Any thougts?


I think you need /s to cope with newlines

-- 
regards,
Tom


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

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

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



RE: [PHP] chill out

2003-04-03 Thread Sysadmin
It's really funny that this happened because not more than one week ago 
I was discussing the professionalism of this list with one of my 
co-workers.  I've been very happy with it, but I remember when I first 
joined it I asked a pretty dumb question and got slammed by a bunch of 
people because it was simple, but I was just overlooking the solution.  
It did make me feel like an idiot, but I dealt with it because this was 
a GREAT resource for all kinds of other information.  I'd have to say 
that this is one of the best, most informative lists I've had the 
pleasure of being a part of and I'd say it's worth getting slammed 
every now and again if that's what I have to deal with to get solutions 
to my problems. :-)  

Cheers...

Brian

-Original Message-
From: Tim Thorburn [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 2:20 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] chill out


Hi,

I'd have to agree with the original poster on this topic - I've been on 
this list for about 3 years now, at times it is helpful - and then 
there's 
every other day.

Granted, there are guru's out there that know all there is to know 
about 
PHP, and then there's the new kid that has no idea what it is, but 
either 
wants to learn or has to learn.  And it is quite possible that not 
everyone 
is as adept at finding information online - if you're new to 
server-side 
programming languages in general - how or why would you know of the 
great 
many repositories of information available online?

Sarcasm is one thing, gawd knows I use it on a by the minute basis ... 
but 
when a newbie posts a question that may seem simple to some - yet 
utterly 
impossible to others, is it constructive to tell them to go back and 
RTFM 
in a violent manner?  Suggesting that they review the manual again may 
help, or better yet - if you think it's not worth your time, that's 
what 
the trash can button is for.

In general, I've had great luck with this list - it just seems the 
majority 
of puter ppl don't have super ppl skills ;)

Now back to work



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


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



RE: [PHP] chill out

2003-04-03 Thread bbonkosk
Sorry to all who think this horse is sufficiently beat, but just to throw 
another couple of cents into the pot...

I think this list is a product of its own behavior.  Some people do get mad 
because of "dumb" or simple questions.  We breed those questions though because 
instead of people explaining to the OP how to FIND the answers, we just type 
out the code for them. So, they essentially don't learn a thing and in a week 
or two they are back.  So, it would be nice to have a concerted effort to 
perhaps teach/guide these newbies and others as to how to find the answers as 
there are numerous resources out there.  Like the old saying goes, "Give a man 
a fish and feed him for a day, but teach him to fish and feed him for a 
lifetime".

-Brad

> It's really funny that this happened because not more than one week ago 
> I was discussing the professionalism of this list with one of my 
> co-workers.  I've been very happy with it, but I remember when I first 
> joined it I asked a pretty dumb question and got slammed by a bunch of 
> people because it was simple, but I was just overlooking the solution.  
> It did make me feel like an idiot, but I dealt with it because this was 
> a GREAT resource for all kinds of other information.  I'd have to say 
> that this is one of the best, most informative lists I've had the 
> pleasure of being a part of and I'd say it's worth getting slammed 
> every now and again if that's what I have to deal with to get solutions 
> to my problems. :-)  
> 
> Cheers...
> 
> Brian
> 
> -Original Message-
> From: Tim Thorburn [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 03, 2003 2:20 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] chill out
> 
> 
> Hi,
> 
> I'd have to agree with the original poster on this topic - I've been on 
> this list for about 3 years now, at times it is helpful - and then 
> there's 
> every other day.
> 
> Granted, there are guru's out there that know all there is to know 
> about 
> PHP, and then there's the new kid that has no idea what it is, but 
> either 
> wants to learn or has to learn.  And it is quite possible that not 
> everyone 
> is as adept at finding information online - if you're new to 
> server-side 
> programming languages in general - how or why would you know of the 
> great 
> many repositories of information available online?
> 
> Sarcasm is one thing, gawd knows I use it on a by the minute basis ... 
> but 
> when a newbie posts a question that may seem simple to some - yet 
> utterly 
> impossible to others, is it constructive to tell them to go back and 
> RTFM 
> in a violent manner?  Suggesting that they review the manual again may 
> help, or better yet - if you think it's not worth your time, that's 
> what 
> the trash can button is for.
> 
> In general, I've had great luck with this list - it just seems the 
> majority 
> of puter ppl don't have super ppl skills ;)
> 
> Now back to work
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 





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



[PHP] Err:"Uninitialized string offset: 0" when doing count on multidim array

2003-04-03 Thread Timo Boettcher
Hi!
I have an multidimensional array with contents like:

 $myarr["url"][]="http://www.example.com";;
 $myarr["img"][]="http://www.example.com/test.gif";;
 $myarr["text"][]="example.com";

I want to display all entries like:

 for ($i=0; $ihttp://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


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



[PHP] Redirect

2003-04-03 Thread shaun
Hi,

How would one redirect a user to a different page if a certain condition was
met?

i.e.

if($condition == true){
goTo newPage.php
}

Thanks for your help



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



Re: [PHP] Redirect

2003-04-03 Thread Lowell Allen
> From: "shaun" <[EMAIL PROTECTED]>
> 
> How would one redirect a user to a different page if a certain condition was
> met?
> 
> i.e.
> 
> if($condition == true){
> goTo newPage.php
> }

Redirects are done using the header() function. See the documentation at
.

--
Lowell Allen


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



Re: [PHP] chill out

2003-04-03 Thread Jason Wong
On Thursday 03 April 2003 08:43, [EMAIL PROTECTED] wrote:

> I think this list is a product of its own behavior.  Some people do get mad
> because of "dumb" or simple questions.  We breed those questions though
> because instead of people explaining to the OP how to FIND the answers, we
> just type out the code for them. 

Another thing which is annoying is people quoting whole paragraphs from the 
manual. It's not as if the manual is a holy tome which is only available to 
some chosen few. It is freely available online or downloadable in numerous 
formats and languages. Just give a quick pointer to whereabouts in the manual 
the relevant info can be found and let the questioner go away and look it up.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
There's a little picture of ED MCMAHON doing BAD THINGS to JOAN RIVERS
in a $200,000 MALIBU BEACH HOUSE!!
*/


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



Re: [PHP] Redirect

2003-04-03 Thread Chris Hayes
At 15:55 3-4-2003, you wrote:
Hi,

How would one redirect a user to a different page if a certain condition was
met?
i.e.

if($condition == true){
goTo newPage.php
}
if  ($condition == true)
{
Header("Location: 
"http://www.sense.nl/index.php?module=ContentExpress&func=display&ceid=15";);
}

take care that your script does not create any output before this,because 
then you will get an error (headers already sent)

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


Re: [PHP] Problem with PHP and MySQl after install

2003-04-03 Thread Don
Forgive my ignorance but I don't follow.  I am not getting any compiling
error messages or warnings.


> > 2) Installed PHP 4.3.1
> > One of my config options was --with-mysql=shared,/usr
>
> I may be completely off base, but where did you intend the mysql
> installation to go? Did it end up there? (I'm thinking maybe not.)
>
> --
> Joel Rees <[EMAIL PROTECTED]>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003


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



Re: [PHP] Stuck!

2003-04-03 Thread Chris Hewitt
Andrew wrote:

Having spent hours on my members registration and login pages I am getting
so close to cracking it, but have now hit a brick wall.
I am getting a warning message which I think could stem from somewhere else
in my code but I have no idea where.
There is a little too much code to put here so is there a kind sole out
there who would take a look at my code if I email it to you to see where I
am going wrong?
There are two pages a login page and a new member page.

With respect, I feel we might help you more if you post the exact error 
message, and the last couple of lines prior to the line number reported 
in the error message.

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


RE: [PHP] Redirect

2003-04-03 Thread Suretha Theron
if($condition == true){
Header ("Location: newpage.php");
exit;
}


-Original Message-
From: Lowell Allen [mailto:[EMAIL PROTECTED]
Sent: 03 April 2003 04:09 PM
To: PHP
Subject: Re: [PHP] Redirect


> From: "shaun" <[EMAIL PROTECTED]>
>
> How would one redirect a user to a different page if a certain condition
was
> met?
>
> i.e.
>
> if($condition == true){
> goTo newPage.php
> }

Redirects are done using the header() function. See the documentation at
.

--
Lowell Allen


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






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



RE: [PHP] chill out

2003-04-03 Thread Hunter, Jess
Well as a relative newbie with little to no programming experience here is
my 2 cents worth.

I have found that I myself have asked some of the "simple" questions, while
some people respond with "RTFM"  I have had the good fortune of having an
understanding sole shoot me back a snippet of code with a brief explanation.

I can say at times the Manual reads like VCR instructions (Yes mine still
blinks "12:00").  while having a new perspective with a real world
implmentation spin to it helps out beyond words.

Like I said, just my 2 cents here

Jess

> -Original Message-
> From: Jason Wong [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, April 03, 2003 8:05 AM
> To:   [EMAIL PROTECTED]
> Subject:  Re: [PHP] chill out
> 
> On Thursday 03 April 2003 08:43, [EMAIL PROTECTED] wrote:
> 
> > I think this list is a product of its own behavior.  Some people do get
> mad
> > because of "dumb" or simple questions.  We breed those questions though
> > because instead of people explaining to the OP how to FIND the answers,
> we
> > just type out the code for them. 
> 
> Another thing which is annoying is people quoting whole paragraphs from
> the 
> manual. It's not as if the manual is a holy tome which is only available
> to 
> some chosen few. It is freely available online or downloadable in numerous
> 
> formats and languages. Just give a quick pointer to whereabouts in the
> manual 
> the relevant info can be found and let the questioner go away and look it
> up.
> 
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> There's a little picture of ED MCMAHON doing BAD THINGS to JOAN RIVERS
> in a $200,000 MALIBU BEACH HOUSE!!
> */
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

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



Re: [PHP] chill out

2003-04-03 Thread Miles Thompson
I mostly lurk -- my level of participation depends on what I'm working on.

I do have these observations:

1. Far too many people don't try to help themselves first, i.e., by doing 
some creative searching /reading of (primarily) the manual.

2. A serious question usually gets prompt and helpful responses.

3. The same thing usually applies to questions that could be resolved by 
checking the docs.

4. There are some really sterling and knowledgeable individuals whose 
participation is more than generous. (I won't name them, but if you check 
the frequency of posts and quality of answers they're pretty easy to pick 
out - John Holmes & Jason Wong come to mind immediately.)

5. Moderately off topic issues are usually handled with some discretion.

6. The level of language is civilized, not much profanity, etc.

7. There are occasional spats - someone pushing a particular class, or 
won't let go of the bone, but they're rare.

8. Rasmus L. watches the list!

9. It's open to exchanges like this, which would never get past a moderator.

10. Overall, people are really responsive.

Cheers - Miles Thompson

At 01:14 PM 4/3/2003 +1000, [EMAIL PROTECTED] wrote:
We subscribe to a few email lists on various languages.

This list would have to be the worst for anyone learning
- the amount of sarcasm and flaming that goes on is huge.
Just try and remember - everyone has to learn,
if you feel a question is off topic or stupid - ignore it,
theres no need to make the poster feel like an idiot.
We all know your smarter than the rest of us ;-)

Steve



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


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


Re: [PHP] Submit Image Button

2003-04-03 Thread -{ Rene Brehmer }-
On Wed, 2 Apr 2003 21:41:02 -0500, John Coggeshall wrote about "RE: [PHP]
Submit Image Button" what the universal translator turned into this:

>Well you can ignore it if you don't need the X/Y cord... But you can use
>it to make sure the button was clicked:
>
>If(!$_GET['sub_x'] || !_GET['sub_y']) {
>   // display form
>} else {
>   // it was submitted

If you can't click the button without getting both a X and Y coordinat,
wouldn't it make more sense to use AND instead of OR in the above logex??

So it would be:

If(!$_GET['sub_x'] && !$_GET['sub_y']) {
// display form
} else {
// it was submitted

Plus you're missing a $ in the second $_GET...

Rene

-- 
Rene Brehmer

This message was written on 100% recycled spam.

Come see! My brand new site is now online!
http://www.metalbunny.net

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



[PHP] Imagerotate() Problems

2003-04-03 Thread Mike Brum
I'm having some problems with imagerotate() - e.g. it won't work.

I've tried many different ways to get it to work, but I have yet to see it
do anything at all. I'm using PHP 4.3.1 on XP. I know that GD is working
properly because I can do other image-manipulation with it without error.
Plus, I installed PHP manually, not with the Windows installer (which I've
had problems getting GD to work properly on in the past).

I've added the last attempt at getting the code to work. Note that the
imagecopy() works fine and the new image displayed always ends up being an
exact copy of the destination image.

Any help would be greatly appreciated!


  if (($degrees == "90") || ($degrees == "180") || ($degrees == "270")){
foreach($image_check as $temp_file){

  $src_img = imagecreatefromjpeg("$inbox_dir\\$temp_file");
  $new_img = imagecreatetruecolor(imagesx($src_img),imagesy($src_img));


imagecopy($new_img,$src_img,0,0,0,0,imagesx($new_img),imagesy($new_img));

  if (function_exists(imagerotate)){
  if(imagerotate($new_img, $degrees, 0)){
print "Image Rotated Successfully";
  } else {
print "Error Rotating Image";
  }
  }
  imagejpeg($new_img, "$inbox_dir\\new_image_path.jpg");

  imagedestroy($src_img);
  imagedestroy($new_img);

*code left off that's not important - though there's no syntax/compile
errors



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





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



Re: [PHP] PHP Email Attachment problem

2003-04-03 Thread Michael Arena
I just checked the directory that I specified for temporary uploads
(/tmpuploads) and there is nothing there which leads me to believe the file
isn't getting uploaded. Does the PHP code look ok? I suspect there's
something in there that's not right.
I could email you a copy of my PHP.ini file if you want to check that out as
well because I didn't see anything in there called file_upload.

Thanks,
Mike

- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 03, 2003 12:23 AM
Subject: Re: [PHP] PHP Email Attachment problem


> On Wednesday 02 April 2003 04:19, Michael Arena wrote:
> > the only difference in the server setup is on my remote server it's a
RAQ
> > and locally i'm using Xitami with PHP. I don't understand why it won't
> > send. I get the email over the RAQ but no attachment...
>
> Have you checked that the file actually gets uploaded?
>
> > are there any other
> > settings that could differ that I would need to set? Like in the php.ini
> > file?
>
> Have you enabled file_uploads in php.ini?
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> Our ISP is having {switching,routing,SMDS,frame relay} problems
> */
>



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



Re: [PHP] Apache SetHandler

2003-04-03 Thread Zoff
Jason Wong wrote:
On Thursday 03 April 2003 17:06, Zoff wrote:


ich have a question with apache and mod_perl I can write a Handler in perl
which is called before anything else happens. this allows me to write all
sorts of auth stuff. is there something similar in PHP.
e.g.:

in httpd.conf


SetHandler MyFoo.php

that's not what I want.
I want something where all the POST and GET data gets passed thru transparently.
and where I can serve static and dynamic pages as well.
mod_perl can do this.
	Zoff.

Have a look at the auto_prepend_file and auto_append_file settings in php.ini. 
Note that you can set these per domain/directory by appropriate entries in 
httpd.conf/.htaccess.



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


Re: [PHP] chill out

2003-04-03 Thread Miles Thompson
Jason ...

A fellow proofreader!! Well done!

Miles


> We all know your smarter than the rest of us ;-)

I hope you don't think I'm making you stupid, but I think you mean "you're".

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
 

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


Re: [PHP] Problem with PHP and MySQl after install

2003-04-03 Thread Don
Further to this point, I've just read that RedHat installed PHP RPM's do not
come with MySQL support.  Now I've d/l the latest stable version form
php.net, version 4.3.1 but I still cannot get MySQL support after compiling
and installing.

So..., how does one remove every trace of a PHP install; I want to start
over from scratch?  I've alrweady upgraded the MySQL package to version
4.0.12.

Thanks,
Don

> > 2) Installed PHP 4.3.1
> > One of my config options was --with-mysql=shared,/usr
>
> I may be completely off base, but where did you intend the mysql
> installation to go? Did it end up there? (I'm thinking maybe not.)
>
> --
> Joel Rees <[EMAIL PROTECTED]>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003


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



Re: [PHP] Problem with PHP and MySQl after install

2003-04-03 Thread Ernest E Vogelsinger
At 16:58 03.04.2003, Don spoke out and said:
[snip]
>Further to this point, I've just read that RedHat installed PHP RPM's do not
>come with MySQL support.  Now I've d/l the latest stable version form
>php.net, version 4.3.1 but I still cannot get MySQL support after compiling
>and installing.
>
>So..., how does one remove every trace of a PHP install; I want to start
>over from scratch?  I've alrweady upgraded the MySQL package to version
>4.0.12.
[snip] 

After recompile make sure Apache uses the module you have just compiled.
Have a look at phpinvo() and check the build date to see if it's using the
very last buld.


-- 
   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/


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



Re: [PHP] Problem with PHP and MySQl after install

2003-04-03 Thread Don
The expected MySQL section is not even listed in the phpinfo() page.  This
would explain my "undefined function" errors when attempting MySQL
functions.  What I can't figure out is why MySQL is not being recognized by
PHP.


> At 16:58 03.04.2003, Don spoke out and said:
> [snip]
> >Further to this point, I've just read that RedHat installed PHP RPM's do
not
> >come with MySQL support.  Now I've d/l the latest stable version form
> >php.net, version 4.3.1 but I still cannot get MySQL support after
compiling
> >and installing.
> >
> >So..., how does one remove every trace of a PHP install; I want to start
> >over from scratch?  I've alrweady upgraded the MySQL package to version
> >4.0.12.
> [snip]
>
> After recompile make sure Apache uses the module you have just compiled.
> Have a look at phpinvo() and check the build date to see if it's using the
> very last buld.
>
>
> --
>>O Ernest E. Vogelsinger
>(\) ICQ #13394035
> ^ http://www.vogelsinger.at/
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003


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



Re: [PHP] Problem with PHP and MySQl after install

2003-04-03 Thread Ernest E Vogelsinger
At 17:09 03.04.2003, Don spoke out and said:
[snip]
>The expected MySQL section is not even listed in the phpinfo() page.  This
>would explain my "undefined function" errors when attempting MySQL
>functions.  What I can't figure out is why MySQL is not being recognized by
>PHP.
[snip] 

I believe it's a directory mismatch between your mysql build and php build.
Usually the mysql build is either located in /usr or /usr/local (check for
directories /usr/include/mysql and /usr/lib/mysql), you need to specify the
correct directory when configuring php.

The next issue may be if you have multipls PHP versions (from RPM, or from
your own builds) on your system - check which version Apache is using.
Check your httpd.conf what installation it uses.


-- 
   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/


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



RE: [PHP] Redirect

2003-04-03 Thread LeTortorec, Jean-Louis
To work around that "headers already sent" problem, I use:

if ($condition == true) { echo
"location.href=('http://...');"; }

That works great all the time (unless the javascript has been disabled at
the browser side, but usually it's enabled).


Jean-Louis



At 15:55 3-4-2003, you wrote:
>Hi,
>
>How would one redirect a user to a different page if a certain 
>condition was met?
>
>i.e.
>
>if($condition == true){
> goTo newPage.php
>}

if  ($condition == true)
 {
 Header("Location: 
"http://www.sense.nl/index.php?module=ContentExpress&func=display&ceid=15";);
 }

take care that your script does not create any output before this,because 
then you will get an error (headers already sent)


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

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



Re: [PHP] chill out

2003-04-03 Thread Chris Hewitt
I lurk more than contribute. I'd contribute more (within the limitations 
of my knowledge) with more time. Being a fairly high volume list, I 
understand the frustration of considerably OT posts. I feel the list is 
not particularly suited to those both new to PHP and to programming. 
Other resources can help in general programming, this list is about PHP.

I've learnt a great deal by being on this list. I'd like to take this 
opportunity to thank all its contributors.

Chris

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


Re: [PHP] chill out

2003-04-03 Thread David T-G
Miles --

...and then Miles Thompson said...
% 
% Jason ...
% 
% A fellow proofreader!! Well done!

Oh, there are lots of us out here, but I for one hesitated to jump into
the discussion just for that :-)


HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP] Self-filling login form

2003-04-03 Thread Alberto Brea
A question please:
I have a login form on (PHP 4.3.1 and Apache 1.3.27). When I click inside
the ID box, you can glimpse at some of the user IDs inside it for a fraction
of a second (similar to a drop-down menu), which shows an unauthorized
visitor some of the id values.
Worst of all, when you enter your ID the password automatically fills in,
giving free access to the unauthorized user.
Does anybody know why this happens? Something in the php.ini or httpd.conf
files perhaps?
Thanks for any comment

Alberto Brea


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



Re: [PHP] Problem with PHP and MySQl after install

2003-04-03 Thread Don
Hmmm...well the php libraries indicate that it is PHP 4 which is what I had
originally (upgraded from 4.1.x to 4.3.1).  I did use the
"i386-redhat'linux" configuration option.

I am using the "--with-mysql=shared/usr" option.  Following your point
below, I did a search on all instances of 'mysql' and found the following.
However, any change I made to the mysql config. directory gives me the
error:

"error: Cannot find header file under "

Please tell me what the directory should be in my mysql config option.

Thanks,
Don

/usr/bin/mysql
/usr/lib/mysql
/usr/libexec/webmin/caldera/mysql
/usr/libexec/webmin/mscstyle3/mysql
/usr/libexec/webmin/mysql
/usr/share/pear/tests/DB/tests/mysql
/usr/share/mysql
/usr/include/mysql
/usr/local/php-4.3.1/ext/mysql
/var/lib/mysql
/var/lib/mysql/mysql
/var/lock/subsys/mysql
/etc/rc.d/init.d/mysql
/etc/logrotate.d/mysql
/etc/webmin/mysql



> At 17:09 03.04.2003, Don spoke out and said:
> [snip]
> >The expected MySQL section is not even listed in the phpinfo() page.
This
> >would explain my "undefined function" errors when attempting MySQL
> >functions.  What I can't figure out is why MySQL is not being recognized
by
> >PHP.
> [snip]
>
> I believe it's a directory mismatch between your mysql build and php
build.
> Usually the mysql build is either located in /usr or /usr/local (check for
> directories /usr/include/mysql and /usr/lib/mysql), you need to specify
the
> correct directory when configuring php.
>
> The next issue may be if you have multipls PHP versions (from RPM, or from
> your own builds) on your system - check which version Apache is using.
> Check your httpd.conf what installation it uses.
>
>
> --
>>O Ernest E. Vogelsinger
>(\) ICQ #13394035
> ^ http://www.vogelsinger.at/
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003


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



Re: [PHP] uploading entire directory, with or without compression ...

2003-04-03 Thread David T-G
Awlad, et al --

...and then Awlad Hussain said...
% 
% I found this link that has a stand alone java application that will allow to
% to upload a folder... if that what you want? or you want it to be embedded
% in your webpage?

I don't really know what I want other than the functionality.  What I
really want is to open a dialog box / file browser where you can select
multiple files and then click a button, much like opening multiple
documents in the bafflingly-ever-popular MS Word (File -> Open ->
ctrl-click each or shift-click a group -> Open).  I can have that sort of
browser box, but only for a single file, in basic HTML code.  I have no
idea what javascript can do for me, but since other parts of my app
already require javascript that wouldn't be so bad.  Going to Java would
mean another requirement, but perhaps those who would most want such a
feature would also be likely to not have turned off Java so it could work
anyway.

It's certainly a start :-)


% 
% http://support.softartisans.com/docs/JFile/prog_g_recursive.htm

I'll definitely check it out!


% 
% hope you find it useful
% -awlad

Thanks so much :-)


HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] Self-filling login form

2003-04-03 Thread David T-G
Alberto --

...and then Alberto Brea said...
% 
% A question please:
% I have a login form on (PHP 4.3.1 and Apache 1.3.27). When I click inside
...
% Does anybody know why this happens? Something in the php.ini or httpd.conf
% files perhaps?

Almost certainly not without seeing some code.


% Thanks for any comment


HTH & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] Self-filling login form

2003-04-03 Thread CPT John W. Holmes
> A question please:
> I have a login form on (PHP 4.3.1 and Apache 1.3.27). When I click inside
> the ID box, you can glimpse at some of the user IDs inside it for a
fraction
> of a second (similar to a drop-down menu), which shows an unauthorized
> visitor some of the id values.
> Worst of all, when you enter your ID the password automatically fills in,
> giving free access to the unauthorized user.
> Does anybody know why this happens? Something in the php.ini or httpd.conf
> files perhaps?
> Thanks for any comment

This is a browser "feature". Look through the browser options for a way to
turn it off. It's not related to Apache or PHP.

---John Holmes...


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



RE: [PHP] Self-filling login form

2003-04-03 Thread LeTortorec, Jean-Louis
A few days ago, I found a way to stop the autocomplete feature. It's more
html coding that php actually.

Try 

Jean-Louis


 
Jean-Louis 



-Original Message-
From: Alberto Brea [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 03, 2003 10:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Self-filling login form


A question please:
I have a login form on (PHP 4.3.1 and Apache 1.3.27). When I click inside
the ID box, you can glimpse at some of the user IDs inside it for a fraction
of a second (similar to a drop-down menu), which shows an unauthorized
visitor some of the id values. Worst of all, when you enter your ID the
password automatically fills in, giving free access to the unauthorized
user. Does anybody know why this happens? Something in the php.ini or
httpd.conf files perhaps? Thanks for any comment

Alberto Brea


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

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



Re: [PHP] Submit Image Button

2003-04-03 Thread Thomas
It works either way apparently...plus, I need the $POST not $_GET.  but it
works aswell.


"-{ Rene Brehmer }-" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wed, 2 Apr 2003 21:41:02 -0500, John Coggeshall wrote about "RE: [PHP]
> Submit Image Button" what the universal translator turned into this:
>
> >Well you can ignore it if you don't need the X/Y cord... But you can use
> >it to make sure the button was clicked:
> >
> >If(!$_GET['sub_x'] || !_GET['sub_y']) {
> > // display form
> >} else {
> > // it was submitted
>
> If you can't click the button without getting both a X and Y coordinat,
> wouldn't it make more sense to use AND instead of OR in the above logex??
>
> So it would be:
>
> If(!$_GET['sub_x'] && !$_GET['sub_y']) {
> // display form
> } else {
> // it was submitted
>
> Plus you're missing a $ in the second $_GET...
>
> Rene
>
> --
> Rene Brehmer
>
> This message was written on 100% recycled spam.
>
> Come see! My brand new site is now online!
> http://www.metalbunny.net



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



[PHP] chill out

2003-04-03 Thread Alberto Brea
May I grab this opportunity to thank you for the load I've learnt on the
list.
A little row every now and then is colorful and makes work less boring.
It also keeps you company if you are working alone.
Keep up any rude behavior, it's fun to watch.
The technical level is excellent and many contributions very generous
indeed, and I'm here to meet a group of programmers, not diplomats.
Cheers

Alberto Brea


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



[PHP] Select all that contains in MySql

2003-04-03 Thread Mike Tuller
I have built a search function that searches a table for all items that 
match what you enter into the search field. I would like it to return 
all items that contain a certain string rather that matches. For 
example, I want to have it so that if I enter M in the search field, it 
will return all items that start with M.

Here is what I have so far.

$query = "SELECT * FROM software_assets WHERE $searchType LIKE 
'$search' ";

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


Re: [PHP] Select all that contains in MySql

2003-04-03 Thread Adam Voigt
Try:

$query = "SELECT * FROM software_assets WHERE $searchType LIKE
'$search%' ";

Note the percent sign, this is equivalent to a wildcard (* for
instance).

On Thu, 2003-04-03 at 10:53, Mike Tuller wrote:
> I have built a search function that searches a table for all items that 
> match what you enter into the search field. I would like it to return 
> all items that contain a certain string rather that matches. For 
> example, I want to have it so that if I enter M in the search field, it 
> will return all items that start with M.
> 
> Here is what I have so far.
> 
> $query = "SELECT * FROM software_assets WHERE $searchType LIKE 
> '$search' ";
> 
> Thanks,
> Mike
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc


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



RE: [PHP] Submit Image Button

2003-04-03 Thread Ford, Mike [LSS]
> -Original Message-
> From: -{ Rene Brehmer }- [mailto:[EMAIL PROTECTED]
> Sent: 03 April 2003 15:28
> 
> On Wed, 2 Apr 2003 21:41:02 -0500, John Coggeshall wrote 
> about "RE: [PHP]
> Submit Image Button" what the universal translator turned into this:
> 
> >Well you can ignore it if you don't need the X/Y cord... But 
> you can use
> >it to make sure the button was clicked:
> >
> >If(!$_GET['sub_x'] || !_GET['sub_y']) {
> > // display form
> >} else {
> > // it was submitted
> 
> If you can't click the button without getting both a X and Y 
> coordinat,
> wouldn't it make more sense to use AND instead of OR in the 
> above logex??

Since clicking the button gives you both X and Y co-ordinates, and not clicking it 
gives you neither, why even bother checking both?  Just testing one or the other would 
be quite sufficient.  (And, if you insist on testing both, it makes no difference 
whether you use and or or -- just so long as you don't use xor!)

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



RE: [PHP] php 3 to 4.3

2003-04-03 Thread daniel
hey thats harsh , use $_POST['form_name'] , i am currently having to work with 
php3 even though i code for php4+ usually i hate 3 with a passion so limited.



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



RE: [PHP] php 3 to 4.3

2003-04-03 Thread daniel
if u need it to work for both versions use $HTTP_POST_VARS instead



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



Re: [PHP] Submit Image Button

2003-04-03 Thread Maciek Ruckgaber Bielecki
have a look on  tag in w3c.org mate

On Wed, Apr 02, 2003 at 09:27:01PM -0500, Thomas wrote:
> I have a problem with my php.
> 
> I have a form and in that form there is an image submit button.  When I
> click on it, it won't tell me if the submit button is clicked.
> It works fine with a normal one.
> 
> sample:
> 
>   if (!$submit) {
> ?>
> 
> 
> 
>  border="0" name="submit" value="Login" width="55" height="19" alt="Submit">
> 
> 
>  } else {
> echo "you clicked";
> }
> ?>
> 
> If I use   This works finedo I need to do
> something else with the code?
> Help is very appreciated.
> 
> Cheers.
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 

Maciek Ruckgaber Bielecki
Desarrollo
http://www.colegiosenlinea.com

"Perfection of means and confusion of ends seem to characterize our age."
--Albert Einstein--

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



[PHP] RE: [newbie] embed php in html file

2003-04-03 Thread Bobby Rahman


Hiya

I need advice for an optimum solution to display the username that is logged 
in on every html form page of my application.

I have a header.php :

session_start();
echo "Logged in as: 
".$_SESSION['curr_user']."";
?>

Now I have many html forms which user's see
What I want to know is how to include the header.php into every html form 
page.

One way is to rename the html file with extension .php
then

This seems a bit wasteful for one line of php to change all the forms to 
.php. Is there any other ways of embedding the header.php file in html 
forms.The reason I am so keen on keeping html and php files seperate is thus 
to make debugging easier and maintain a kinda three tier design.

Any suggestions will be much appreciated

Bob

_
Use MSN Messenger to send music and pics to your friends 
http://www.msn.co.uk/messenger

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


Re: [PHP] Self-filling login form

2003-04-03 Thread Henrik Hudson
On Thursday 03 April 2003 09:33, Alberto Brea wrote:
> A question please:
> I have a login form on (PHP 4.3.1 and Apache 1.3.27). When I click inside
> the ID box, you can glimpse at some of the user IDs inside it for a
> fraction of a second (similar to a drop-down menu), which shows an
> unauthorized visitor some of the id values.
> Worst of all, when you enter your ID the password automatically fills in,
> giving free access to the unauthorized user.
> Does anybody know why this happens? Something in the php.ini or httpd.conf
> files perhaps?
> Thanks for any comment
>
> Alberto Brea

Yeah, this is a IE and newer Mozilla browser "feature". Nothing to do with 
Apache or PHP. 

You can turn it off in IE by doing Tools -> Internet Options -> Content tab 
and then clicking on the "AutoComplete" button. 

In Mozila, Edit -> Preferences -> Privacy&Security -> Forms and also Passwords 
and uncheck the checkboxes.


Henrik

-- 
Henrik Hudson
[EMAIL PROTECTED]

"`If there's anything more important than my ego
around, I want it caught and shot now.'" 
--Hitchhikers Guide to the Galaxy

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



Re: [PHP] Apache SetHandler

2003-04-03 Thread Jason Wong
On Thursday 03 April 2003 22:38, Zoff wrote:

> that's not what I want.
> I want something where all the POST and GET data gets passed thru
> transparently. and where I can serve static and dynamic pages as well.
> mod_perl can do this.

In that case I really have no idea what you want. Could you give further 
details on what you're trying to do?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Chicago law prohibits eating in a place that is on fire.
*/


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



RE: [PHP] RE: [newbie] embed php in html file

2003-04-03 Thread Matt Schroebel
> -Original Message-
> From: Bobby Rahman [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, April 03, 2003 11:25 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] RE: [newbie] embed php in html file
> 
> I have a header.php :
>  session_start();
> echo " color=\"red\"size=\"3\">Logged in as: 
> ".$_SESSION['curr_user']."";
> ?>

Not your question, but in case you don't know the syntax of arrays in
double quotes, you can also write that as:
echo "Logged in
as: {$_SESSION['curr_user']}";

> 
> Now I have many html forms which user's see
> What I want to know is how to include the header.php into 
> every html form 
> page.
> 
> One way is to rename the html file with extension .php
> then
>  require_once("header.php")
> ?>
> 
> This seems a bit wasteful for one line of php to change all 
> the forms to 
> .php. Is there any other ways of embedding the header.php 
> file in html 
> forms.

Take a look at auto_prepend.  You'll need to change the config to parse
the file, so you might want to name the pages with the user name .htm,
and parse .htm as a php file.

http://www.php.net/manual/en/configuration.directives.php#AEN2371

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



Re: [PHP] Apache SetHandler

2003-04-03 Thread Erwin Kerk


Zoff wrote:
Hi Guys!

ich have a question with apache and mod_perl I can write a Handler in perl
which is called before anything else happens. this allows me to write 
all sorts of auth stuff.
is there something similar in PHP.

There is a topic in the php manual which describes something similar.

check: http://www.php.net/manual/en/features.file-upload.put-method.php

Maybe something is similar is possible for POST, and for GET your could 
use a rewrite rule in the httpd.conf file



Erwin Kerk
Web Architect


--
 ____
| __|_ ___ __ _(_)_ _
| _|| '_\ V  V / | ' \ @blixem.nl (work)
|___|_|  \_/\_/|_|_||_|@scoutingnederland.nl (private)


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


Re: [PHP] PHP Email Attachment problem

2003-04-03 Thread Jason Wong
On Thursday 03 April 2003 22:30, Michael Arena wrote:

> I just checked the directory that I specified for temporary uploads
> (/tmpuploads) and there is nothing there which leads me to believe the file
> isn't getting uploaded. 

I'm not sure *how* you're checking that there's nothing there but please read 
the chapter in the manual about file uploads (yes all of it) and note that 
uploaded files are deleted upon termination of the script.

> Does the PHP code look ok? I suspect there's
> something in there that's not right.

OK, you said on the RAQ server you don't get an attachment, have you checked 
that:

 if (is_uploaded_file($fileatt))

is true?

> I could email you a copy of my PHP.ini file 

No thank you.

> if you want to check that out
> as well because I didn't see anything in there called file_upload.

Make sure your php.ini has the following line

file_uploads = On

Also make sure you're not uploading any files that are exceeding the limits 
set in php.ini (see manual for the relevant config settings which governs 
this).

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
spagmumps, n.:
Any of the millions of Styrofoam wads that accompany mail-order items.
-- "Sniglets", Rich Hall & Friends
*/


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



Re: [PHP] Problem with PHP and MySQl after install

2003-04-03 Thread Jason Wong
On Thursday 03 April 2003 23:31, Don wrote:
> Hmmm...well the php libraries indicate that it is PHP 4 which is what I had
> originally (upgraded from 4.1.x to 4.3.1).  I did use the
> "i386-redhat'linux" configuration option.
>
> I am using the "--with-mysql=shared/usr" option.  Following your point
> below, I did a search on all instances of 'mysql' and found the following.
> However, any change I made to the mysql config. directory gives me the
> error:
>
> "error: Cannot find header file under "
>
> Please tell me what the directory should be in my mysql config option.

See if you can get it working with a plain and simple:

  --with-mysql

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
The biggest problem with communication is the illusion that it has occurred.
*/


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



RE: [PHP] php 3 to 4.3

2003-04-03 Thread Philip Olson
On Wed, 2 Apr 2003, daniel wrote:

> if u need it to work for both versions use $HTTP_POST_VARS instead

Keep in mind that the deprecated PHP directive
track_vars must be on for $HTTP_*_VARS type
variables to exist in PHP versions prior to
4.0.3

Regards,
Philip


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



[PHP] circumventing SAFE MODE Restriction

2003-04-03 Thread Henry Grech-Cini
Hi All,

I want to get a list of files in my own sub-directory from where my .php
file is.

If I use dir(".") then I can list the file in the current directory BUT

If I use dir("./subdirectory") or dir("subdirectory") I get the following
error:

Warning: SAFE MODE Restriction in effect. The script whose uid is 614 is not
allowed to access /home/currentdirectory owned by uid 0 in
/home/currentdirectory/download.php on line 12
Handle:
Path:

Fatal error: Call to a member function on a non-object in
/home/currentdirectory/download.php on line 15

The code looks like this.




Untitled Document




handle."\n";
echo "Path: ".$d->path."\n";
while (false !== ($entry = $d->read())) {
echo $entry."\n";
}
$d->close();

?>



Any ideas about how to get round this other than making a .php file to call
in the subdirectory?

TIA

Henry



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



Re: [PHP] chill out

2003-04-03 Thread Steve Keller
At 4/3/2003 01:14 PM, [EMAIL PROTECTED] wrote:

> We subscribe to a few email lists on various languages.

Why do people assume that because they subscribe to a mailing list with 
their work address that the mailing list must hold to their company's 
standards?

> This list would have to be the worst for anyone learning
> - the amount of sarcasm and flaming that goes on is huge.
If it's the worst, you haven't been on many mailing lists. A word of 
advice, stay off Usenet.

> Just try and remember - everyone has to learn,
> if you feel a question is off topic or stupid - ignore it,
> theres no need to make the poster feel like an idiot.
There is when the poster *is* an idiot.

When I first came on this list, I lurked for a few weeks because most of my 
n00b questions were already being answered in response to other n00bs. But 
I knew that there weren't people who did as I did because the same 
questions would be asked over and over again, no matter how many times 
they'd been answered. However, in my naivete, I actually posted a scathing 
reply to someone who had given an RTFM to someone asking a really dumb 
question. Fortunately, the regular I bit into was bright enough to gently 
brush me off and make me rethink my position.

As a result, it wasn't too long before I realized that RTFM is a perfectly 
appropriate response to many questions; a good number of the answers are 
already posted to the PHP.net manual, if not in the articles themselves, 
then in the comments below. This mailing list does not exist to do people's 
homework for them.

I agree that this list should cater only to the PHP elite. If it did, I'd 
be lost because the help I've gotten here has been invaluable. But I got a 
lot of that help by reading other people's questions, not ignoring the 
other posts here.

When someone posts a question that's just been answered, or asks, "How do I 
print a variable on a page?" then they do deserve a sarcastic response for 
not bothering to do the *minimal* amount of investigation on their own.

And if sarcasm bothers you, then I find it a wonder you can function in 
normal society at all. People are sarcastic, and this is an open mailing 
list, not a closed corporate list. It'd be nice if everyone were nice, but 
it's not a requirement, and just because your company forces you to wear a 
suit and tie doesn't mean everyone you come in contact with has to as well.

> if you feel a question is off topic or stupid -

^or sarcastic

> ignore it,

Sound advice. Take it.



--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: [EMAIL PROTECTED]
Web: www.healthtvchannel.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] excel 2 csv 2 mysql

2003-04-03 Thread jon roig
Pretty cool, man... I actually didn't know about xls2csv.

Learn something new every day -- this'll certainly come in handy.

'Course, it's not exactly standard with most distributions. For anyone
looking for it, you can download it here:
http://www.45.free.net/~vitus/ice/catdoc/

Or, depending on your distro, you might be able to find an RPM:
http://www.rpmfind.net/linux/rpm2html/search.php?query=catdoc

... sounds like this might make for a good web service of some kind... I'll
have to see if I can whip something up.
-- jon

-Original Message-
From: daniel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 1:26 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; daniel
Subject: RE: [PHP] excel 2 csv 2 mysql


ok i've built a class to acomplish this now

class Export_Excel {
var $command
function Export_Excel() {
$this->command = "/www_tools/apache/catdoc/bin/xls2csv";
}

function xls2csv($path,$xls_file,$short_name) {
$cmd = escapeshellcmd("$this->command -q 0 $path.$xls_file");
$cmd .= " > $path.$short_name.csv";
@exec($cmd,$stdout,$errocode);
unlink("$path.$xls_file");
if ($errorcode > 0) return $errocode;
}

}


and here is my db class function

function
insert_file($filename,$table,$col_terminator,$line_terminator,$cols=false,$o
pt
ions=false,$remove_file=false) {
if ($options) $option = "OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED 
BY
'\n'";
$this->query("LOAD DATA INFILE '$filename' INTO TABLE $table FIELDS
TERMINATED BY '$col_terminator' $option $cols");
if ($remove_files) unlink($filename);
}

its just a quicky, twiddling thumbs today i just had to find out how to do
it
:D

>= Original Message From daniel <[EMAIL PROTECTED]> =
>ok it works now
>
>/www_tools/apache/catdoc/bin/xls2csv -q 0 test.xls > test2.csv
>
>
>column1`,column2,column3
>faffafs,fsafsa,fsafs
>fssfa,fasfs,fasfs
>fasaf,fasfs,asffaf
>fafs,sfafsa,fasfas
>sfafs,fssfa,fassfa
>sfasfa,asfafs,fasfas
>asffas,sfaaf,sfafsa
>fssaf,asffsa,asffas
>sfasfa,sfasaf,fasasf
>
>then i can load that into mysql using load data into :D, aparantly there
are
>some bugs , gotta find them
>>= Original Message From daniel <[EMAIL PROTECTED]> =
>>ok guys are you ready ,
>>
>>/www_tools/apache/catdoc/bin/xls2csv test.xls > test2.csv
>>
>>gave me this
>>
>>
>>"column1`","column2","column3"
>>"faffafs","fsafsa","fsafs"
>>"fssfa","fasfs","fasfs"
>>"fasaf","fasfs","asffaf"
>>"fafs","sfafsa","fasfas"
>>"sfafs","fssfa","fassfa"
>>"sfasfa","asfafs","fasfas"
>>"asffas","sfaaf","sfafsa"
>>"fssaf","asffsa","asffas"
>>"sfasfa","sfasaf","fasasf"
>>
>>unfortunately its putting quotes in, have to strip them
>>
>>>= Original Message From <[EMAIL PROTECTED]> =
>>>Yeah... you're going to have to use COM or something similar on a windows
>>>server to get effective access to the server.
>>>
>>>Another option is dynamically adding at as an odbc datasource and
querying
>>>it. Again, this will only work on a windows server...
>>>
>>>It's all much easier if you can convince users to upload csv files.
>>>
>>> - jon
>>>
>>>-
>>>jon roig
>>>senior manager, online production
>>>epilepsy foundation
>>>http://jonroig.com
>>>
>>>
>>>-Original Message-
>>>From: daniel [mailto:[EMAIL PROTECTED]
>>>Sent: Monday, March 31, 2003 7:48 PM
>>>To: [EMAIL PROTECTED]
>>>Subject: [PHP] excel 2 csv 2 mysql
>>>
>>>
>>>hi guys i am trying to work out how to dynamically be able to upload an
>>>excel
>>>file , export it to csv to be able to import into mysql , is there any
>>>examples out there ? fopen gave me binary code :|
>>>
>>>
>>>
>>>--
>>>PHP General Mailing List (http://www.php.net/)
>>>To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>>
>>>
>>>--
>>>PHP General Mailing List (http://www.php.net/)
>>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php



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




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



RE: [PHP] chill out

2003-04-03 Thread daniel
lol , hey boyz and galz lets be professional now, we cant show the windoze ppl 
we are such a loose bunch now can we ? heh :D

>= Original Message From Kevin Waterson <[EMAIL PROTECTED]> =
>This one time, at band camp,
><[EMAIL PROTECTED]> wrote:
>
>> We subscribe to a few email lists on various languages.
>>
>> This list would have to be the worst for anyone learning
>> - the amount of sarcasm and flaming that goes on is huge.
>
>fu2
>
>--
> __
>(_ \
> _) )           
>|  /  / _  ) / _  | / ___) / _  )
>| |  ( (/ / ( ( | |( (___ ( (/ /
>|_|   \) \_||_| \) \)
>Kevin Waterson
>Port Macquarie, Australia
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php



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



RE: [PHP] uploading entire directory, with or without compression ...

2003-04-03 Thread Dan Rossi
i have looked into this , and the browser is only limited to single file
uploads , but yes a a java applet is prob the best options, i am considering
on learning java as it is similar to php OO or maybe the other way round, it
looks familiar so maye i can get my hed around it :D, maye there is an open
source java example , but frankly i've never seen one :|

-Original Message-
From: Burhan Khalid [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 7:50 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] uploading entire directory, with or without
compression ...


Jason Wong wrote:
> On Wednesday 02 April 2003 22:08, Kenn Murrah wrote:
>
>>yes, of course they can ... but i'm looking for a way to automate the
>>process for them (a method which may not exist) .. i suppose i can give
>>them the option to upload multiple files using multiple input fields, but
>>I'd really like to find a way to select an entire folder instead ...
>
>
> Can't be done.
>
> You can investigate the use of client-side scripting.
>

*can't* do it with PHP, but ...

If this is a real priority, you can write some sort of ActiveX component
that you can use to upload. However, you will have to ask the client for
security permissions, since client apps do not have access to the remote
file system (for good reason).

Either that, or you can write a Java applet to do it.

Bottom line, no way to do it with PHP, but if you really want it done,
look to other languages.

--
Burhan Khalid
phplist[at]meidomus[dot]com





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


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



Re: [PHP] chill out

2003-04-03 Thread bob parker
On Thu, 3 Apr 2003 16:39, daniel wrote:
> lol , hey boyz and galz lets be professional now, we cant show the windoze
> ppl we are such a loose bunch now can we ? heh :D
>
Actually a lot of these folk are using wonders sadly.
Bob

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



[PHP] imap mail() problems

2003-04-03 Thread Alec Wallis
Hi

I am experiencing problems with the mail functions, in that I can not send emails to 
multiple addresses in the to field, or send Cc's.  The multiple addresses show up in 
the email when it arrives to the first email address, but the other copies never 
arrive.

The code I use is:

mail($strTo, $strSubject, $strBody, $header);

with the optional header fields being:

$header = "Cc: [EMAIL PROTECTED]";

Any ideas welcome

Cheers

Alec



[PHP] datetime

2003-04-03 Thread Tim Haskins
How does one retrieve the date and time off a server in the following
format?

2003-04-03 11:11:38

I've read much on date and time regarding php and mysql but could not figure
out the above format...please help
--
Tim Haskins





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



[PHP] Creating Session Variables

2003-04-03 Thread Tom Rawson
Hmmm, this doesn't seem clear in the docs ...

Consider this:

function foo() {
$_SESSION['varname'] = "test";
.
}

At this point:

- Can I reference $varname inside the function?  If so, must it be 
declared global first?  Or can I only reference it via 
$_SESSION['varname']?

- Can I reference it outside the function (as $varname) after the 
function returns?

In other words if one creates a variable by adding it to the session 
array, does it then become a variable in either the global or (though I 
can't quite imagine this) current local scope?

Thanks,

 --
 Tom Rawson




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



[PHP] PHP with PDFlib installation on windows

2003-04-03 Thread Bill Hudspeth
Hello,



I am having problems getting the PDF extension to work with PHP on Windows.
I am running PHP 4.2.3 on Windows NT 4.0 using IIS as my internet server. I
have enabled the PDF extension in the php.ini file, with no apparent
success. When I try to load the page, I get an empty screen (i.e., no error
messages or undefined functions). It was my understanding that the Windows
module version of PHP had PDFLib libraries already built in. What might be
my problem?



Thanks, Bill




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



RE: [PHP] datetime

2003-04-03 Thread Matt Schroebel

> -Original Message-
> From: Tim Haskins [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, April 03, 2003 2:45 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] datetime
> 
> 
> How does one retrieve the date and time off a server in the following
> format?
> 
> 2003-04-03 11:11:38

Plenty of examples here:
http://www.php.net/manual/en/function.date.php

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



[PHP] Problem connecting to POP3 accounts

2003-04-03 Thread Alec Wallis
Hi

I am currently experiencing some problems connecting to POP3 accounts using imap_open.

I am using the following code:

$ArrayImap = imap_open ($strMailServer, $strUsername, $strPassword);

with the mail server being set to:

$strMailServer = "{domain.co.uk/pop3:110}INBOX";

It seems to connect ok, as if an incorrect username or password is entered incorrectly 
something different happens.  The error message I seem to get is:

Notice: (null)(): Mailbox is empty (errflg=1) in Unknown on line 0
PHP Notice: (null)(): Mailbox is empty (errflg=1) in Unknown on line 0 

When I view the mailbox in Outlook it has messages in it and so isn't empty.  Can 
anyone help me please?


Alec


RE: [PHP] Problem connecting to POP3 accounts

2003-04-03 Thread Danny Shepherd
Try:

$strMailServer = "{domain.co.uk:110/pop3}INBOX";

As per the manual.

HTH

Danny.

-Original Message-
From: Alec Wallis [mailto:[EMAIL PROTECTED] 
Sent: 03 April 2003 18:35
To: [EMAIL PROTECTED]

Hi

I am currently experiencing some problems connecting to POP3 accounts using
imap_open.

I am using the following code:

$ArrayImap = imap_open ($strMailServer, $strUsername, $strPassword);

with the mail server being set to:

$strMailServer = "{domain.co.uk/pop3:110}INBOX";

It seems to connect ok, as if an incorrect username or password is entered
incorrectly something different happens.  The error message I seem to get
is:

Notice: (null)(): Mailbox is empty (errflg=1) in Unknown on line 0
PHP Notice: (null)(): Mailbox is empty (errflg=1) in Unknown on line 0 

When I view the mailbox in Outlook it has messages in it and so isn't empty.
Can anyone help me please?


Alec



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



Re: [PHP] Creating Session Variables

2003-04-03 Thread Jason Wong
On Friday 04 April 2003 03:47, Tom Rawson wrote:
> Hmmm, this doesn't seem clear in the docs ...
>
> Consider this:
>
>   function foo() {
>   $_SESSION['varname'] = "test";
>   .
>   }
>
> At this point:
>
> - Can I reference $varname inside the function?  If so, must it be
> declared global first?  Or can I only reference it via
> $_SESSION['varname']?
>
> - Can I reference it outside the function (as $varname) after the
> function returns?
>
> In other words if one creates a variable by adding it to the session
> array, does it then become a variable in either the global or (though I
> can't quite imagine this) current local scope?

You should *always* refer to it as $_SESSION['varname'] regardless of whatever 
scope you're in.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Freedom is slavery.
Ignorance is strength.
War is peace.
-- George Orwell
*/


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



  1   2   >