[PHP] imap trouble

2003-03-19 Thread Niklas Saers Mailinglistaccount
Hi, I'm running FreeBSD 4.8RC, c-client 2002, imap-uw 2002 and PHP 4.3.1 (tried a couple of other versions, but they give me the same error). Whenever I use imap_open() to localhost, I get the following error: Mar 20 00:20:29 doriath imapd[43632]: Command stream end of file, while reading line

[PHP] Mac IE File download problem - any solutions?

2003-03-19 Thread Daniel Leighton
I know this has been addressed before, but I'm wondering if anyone has ever found a solution. The code: header('Content-Type: application/octet-stream'); header('Content-Length: '. filesize($file_info['full_file_path'])); header('Content-Disposition: attachment;

Re: [PHP] Zip Way of life.

2003-03-19 Thread David T-G
Vincent -- ...and then Vincent M. said... % % David T-G wrote: % % ...and then Vincent M. said... % % ... % % No, it works with .zip files too, I just don't know how to manage it :-( % ... % AFAIK gunzip can unzip an archive containing a single file, but if you % have more than one in there

[PHP] Dynamic variables (with method=post)

2003-03-19 Thread Fabio Bot
Hi, How do i receive dynamic variables with POST ? Please, see the code fragment. $ped_item = mysql_result($result, $j, 0); form name=form_$ped_item method=post action=pedido.php input type=hidden name=upd_item value='$ped_item' input type=text size=7 maxlength=7 value=$ped_qtde

Re: [PHP] PHP and IIS - More info

2003-03-19 Thread Beauford.2002
PHP and MySQL, which I am using in this project are the same on all three platforms - the only difference is IIS - which is why I think it is a IIS problem. Problems, Problems... - Original Message - From: Chris Hewitt [EMAIL PROTECTED] To: 'PHP General' [EMAIL PROTECTED] Sent:

[PHP] Eliminating space between HR and Image

2003-03-19 Thread Andre Dubuc
Hi, I've added an animated gif in the banner area of my site, and just above it, a horizontal rule to give added emphasis. The problem is, no matter what I do, I cannot get rid of an extra space that appears between the two. Is this a natural function? Is there some way of eliminating the

[PHP] Cleaning user data

2003-03-19 Thread rotsky
I'd like to canvas opinions about what's needed to clean user input. I'm using an HTML form where users enter simple things like name and phone number, but also a couple of small text areas for address and a message (up to 50 words or so). How would people recommend cleaning this data when it's

Re: [PHP] Eliminating space between HR and Image

2003-03-19 Thread Leif K-Brooks
What the heck does this have to do with PHP?! Andre Dubuc wrote: Hi, I've added an animated gif in the banner area of my site, and just above it, a horizontal rule to give added emphasis. The problem is, no matter what I do, I cannot get rid of an extra space that appears between the two. Is

[PHP] Re: Eliminating space between HR and Image

2003-03-19 Thread Michiel van Heusden
this is an HTML-problem, not php..but anyway i have no clue why the extra space would appear, but I'd try to add absolute positiong to the HR and IMAGE as well, that should solve the problem like: style type=text/css !-- hr { position: absolute; top: 0px; } img { position: absolute; top:

Re: [PHP] Re: Eliminating space between HR and Image

2003-03-19 Thread Richard Whitney
Here is your code: First, make a one pixel png the color you want your HR img src=images/color.png width=100% height=1br img src=images/yourbanner.gif width=468 height=60 Et, Voila! Quoting Michiel van Heusden [EMAIL PROTECTED]: ### this is an HTML-problem, not php..but anyway ### ### i

Re: [PHP] Re: Eliminating space between HR and Image

2003-03-19 Thread Andre Dubuc
Thanks Michiel, After sending the message, I realized that it was an html question -- I've been so absorbed with coding, it all looks the same after a while. My apologies to the list. Thanks for the suggestion. I think it'll work. Otherwise, I'll leave it as is. Thanks for taking the trouble

Re: [PHP] Re: Eliminating space between HR and Image

2003-03-19 Thread Andre Dubuc
Thanks Richard, The obvious escaped me. Regards, Andre On Wednesday 19 March 2003 07:39 pm, you wrote: Here is your code: First, make a one pixel png the color you want your HR img src=images/color.png width=100% height=1br img src=images/yourbanner.gif width=468 height=60 Et, Voila!

[PHP] convert VARCHAR 10 to DATETIME

2003-03-19 Thread freaky deaky
this question is not strictly php related, but i thought possibly someone on this list might have dealt with this type of problem before. i am exporting a database out of filemakerpro 5 as a comma delimited file, and importing the data into a mysql database most of the information transfer

Re: [PHP] Eliminating space between HR and Image

2003-03-19 Thread Leif K-Brooks
Maybe so, but all PHP does is output HTML to the browser. Your question had nothing to do with PHP, and should be sent to an HTML list. Andre Dubuc wrote: About as much as your 'gentle' answer. Aside from this entry, everything is PHP on my site. And sorry I forgot the print .; -- The

[PHP] imap problem

2003-03-19 Thread Niklas Saers Mailinglistaccount
When contacting the imap-uw server I've built with plaintext and ssl support, I get Certificate failure for localhost: self signed certificate: /C=NO/ST=Oslo/L=Oslo/O=religion.no/OU=religion.no/CN=doriath/CN=localhost when contacting it through php. How can I make php accept my certificate? And if

Re: [PHP] Cleaning user data

2003-03-19 Thread Pete James
It really depends on what you what to do with the data. For instance, if you want to insert into a database, you'll want to run addslashes() on it, or some other such quoting. If you wnat to use the data as a forum post or comment, etc, you'll want to strip the html out of it with strip_tags()

Re: [PHP] convert VARCHAR 10 to DATETIME

2003-03-19 Thread Pete James
Could you use a function like strtotime()? freaky deaky wrote: this question is not strictly php related, but i thought possibly someone on this list might have dealt with this type of problem before. i am exporting a database out of filemakerpro 5 as a comma delimited file, and importing

[PHP] session variables

2003-03-19 Thread Pag
HI, Am trying to give controlled access to who logs in to my site. Have a quick doubt: I register a session var named $tu (value is taken from the DB) when a user logs in, how can i reference to that var? I mean, if i want to check its value, if i do print($tu);, it doesnt seem to work.

Re: [PHP] - IIS - More info

2003-03-19 Thread Beauford.2002
After many grueling hours of screwing around with this, it's working. Not sure of the exact problem - but for those that want to knowI uninstalled PHP and cleaned the registry of any remnents of PHP and then installed PHP manually (instead of using the PHP installer). Then I had to tweak the

RE: [PHP] session variables

2003-03-19 Thread daniel
u have to start the session first then check with $_SESSION['tu']; = Original Message From Pag [EMAIL PROTECTED] = HI, Am trying to give controlled access to who logs in to my site. Have a quick doubt: I register a session var named $tu (value is taken from the DB)

[PHP] dynamically splitting a paragraph for a preview of content

2003-03-19 Thread daniel
hi guys , i assumed i had this working but i stand corrected, it basically will get the first dot in content which should denote a end of paragraph and show that as a preview, although say i put g.w bush in it will split off there which i dont want , is there a way i can do this with a

[PHP] PHP and file extensions

2003-03-19 Thread Beauford.2002
Still working on this authentication script and have a small question. Each page on the site needs to have one line of code on it so it can't be accessed unless you log in - is there a way to have this line in an html file without changing the extension to .php? On the same note, there is a small

[PHP] Help with sum of items

2003-03-19 Thread Jim Greene
Hi All, I have the following for data: 03/14/2003,09:56:17,PTLD-TC1-HARC1,Stop,63.164.60.116,200,jsmith,9,24 3,271,15,User Request,2072280717,2073369937,4BPS 03/15/2003,09:56:17,PTLD-TC1-HARC1,Stop,63.164.60.116,200,jsmith,9,24 3,271,15,User Request,2072280717,2073369937,4BPS

[PHP] Apache + PHP - when using as module, can one have PHPs run as

2003-03-19 Thread ADFH
specific user? Message-Id: [EMAIL PROTECTED] X-Newsreader: Sylpheed version 0.8.9 (GTK+ 1.2.10; i386-debian-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Tried posting this earlier - it wouldn't take.. Unmunged my email address hoping

[PHP] strip single quotes

2003-03-19 Thread Daniel McCullough
I'm trying to query the database using a string pulled out of the database and compare and get the id. I can do it to a certain point and what kills my query is single quotes. I CANNOT figure out how to escape it. I DID THIS: $address2 = str_replace(', , $address); that worked on some, but

RE: [PHP] convert VARCHAR 10 to DATETIME

2003-03-19 Thread John W. Holmes
i am exporting a database out of filemakerpro 5 as a comma delimited file, and importing the data into a mysql database most of the information transfer over ok, the one big problem i have is filemaker's date/time format. in the filemaker pro database, it looks like the timestamp is

RE: [PHP] strip single quotes

2003-03-19 Thread Martin Towell
try this $address2 = str_replace(', '', $address) -Original Message- From: Daniel McCullough [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2003 1:48 PM To: [EMAIL PROTECTED] Subject: [PHP] strip single quotes I'm trying to query the database using a string pulled out of the

RE: [PHP] strip single quotes

2003-03-19 Thread John W. Holmes
I'm trying to query the database using a string pulled out of the database and compare and get the id. I can do it to a certain point and what kills my query is single quotes. I CANNOT figure out how to escape it. I DID THIS: $address2 = str_replace(', , $address); that worked on some,

RE: [PHP] Cleaning user data

2003-03-19 Thread John W. Holmes
I'd like to canvas opinions about what's needed to clean user input. I'm using an HTML form where users enter simple things like name and phone number, but also a couple of small text areas for address and a message (up to 50 words or so). How would people recommend cleaning this data when

RE: [PHP] Dynamic variables (with method=post)

2003-03-19 Thread John W. Holmes
How do i receive dynamic variables with POST ? Please, see the code fragment. $ped_item = mysql_result($result, $j, 0); form name=form_$ped_item method=post action=pedido.php input type=hidden name=upd_item value='$ped_item' input type=text size=7 maxlength=7 value=$ped_qtde

RE: [PHP] Date Conversion

2003-03-19 Thread John W. Holmes
when retrieving a date from MySQL in n/MM/DD, how can I present this to the user of a site in readable format i.e. 19th March 2003? SELECT DATE_FORMAT(column,' ... ') AS f_date FROM table WHERE ... Look up DATE_FORMAT in the MySQL manual, Chapter 6. It works almost the same as the PHP

RE: [PHP] convert VARCHAR 10 to DATETIME

2003-03-19 Thread freaky deaky
thanks. this was the quickest way to accomplish the task strtotime(); also works. both are useful to know... - Original Message - From: John W. Holmes [EMAIL PROTECTED] Date: Wed, 19 Mar 2003 21:47:23 -0500 To: 'freaky deaky' [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP]

Re: [PHP] Cleaning user data

2003-03-19 Thread olinux
You can also use basic functions like is_numeric() [to make sure the value is numeric - duh] or a custom function to do something like check for a valid email address format. I have a news site that explodes the URL to get values for the directory/article it is supposed to display. since the

Re: [PHP] Cleaning user data

2003-03-19 Thread Justin French
The first rule is to NEVER rely on anything that they give you, or any of the security precautions in your form code, because someone can always creat a less-secure form which posts to the same script. So, whilst maxlength='4' for a year select thing is great, you should check at the other end

RE: [PHP] Cleaning user data

2003-03-19 Thread John W. Holmes
And yes, definitely striptags(), and follow the advice on the rest of the thread. I disagree. I think stripping HTML from my text is a horrible thing. If I want to put a b in my text, then use htmlentities() and show me a b when I look at it. Obviously you don't want to evaluate HTML, but the

Re: [PHP] Cleaning user data

2003-03-19 Thread Justin French
on 20/03/03 3:53 PM, John W. Holmes ([EMAIL PROTECTED]) wrote: And yes, definitely striptags(), and follow the advice on the rest of the thread. I disagree. I think stripping HTML from my text is a horrible thing. If I want to put a b in my text, then use htmlentities() and show me a b

RE: [PHP] Cleaning user data

2003-03-19 Thread Chris Shiflett
--- John W. Holmes [EMAIL PROTECTED] wrote: I disagree. I think stripping HTML from my text is a horrible thing. If I want to put a b in my text, then use htmlentities() and show me a b when I look at it. Obviously you don't want to evaluate HTML, but the end result should be that I should see

[PHP] test for associative or numerically indexed array

2003-03-19 Thread cpaul
Is there a method to test whether or not an array is associative? I'm trying to make a function that can deal with whatever type of array (associative or numeric) that is thrown at it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] test for associative or numerically indexed array

2003-03-19 Thread Chris Shiflett
--- cpaul [EMAIL PROTECTED] wrote: Is there a method to test whether or not an array is associative? I'm trying to make a function that can deal with whatever type of array (associative or numeric) that is thrown at it. It's all the same. An enumerated array is really an associative array

[PHP] Fw: Parse Error

2003-03-19 Thread Manjunath H N
Hi, This is the one which I am getting in the website after the item has been posted. parse error, expecting `')'' Please send me the views how to rectify it. This is my Php // $Mymail is of type CDONTS.NEWMAIL file://mail(,,,From: .$Body=$mybody);

[PHP] persistent of LDAP connections across invocations?

2003-03-19 Thread Scott McDermott
How persistent are LDAP connections which are not closed with ldap_close() or ldap_unbind()? I am trying to re-use an LDAP link identifier by doing an open, binding as something, saving the LID in a $_SESSION variable, *not* closing the LDAP link, and then using the LID in another script

Re: [PHP] test for associative or numerically indexed array

2003-03-19 Thread cpaul
--- cpaul [EMAIL PROTECTED] wrote: Is there a method to test whether or not an array is associative? [EMAIL PROTECTED] wrote: It's all the same. An enumerated array is really an associative array where every key is an integer. Just treat them all like associative arrays, and you'll be

[PHP] Making tree menu

2003-03-19 Thread Daniel Harik
Hello guys I make following query: mysql SELECT b.type, a.link AS parent_link, b.link AS child_link FROM bookmarks AS a, bookmarks AS b WHERE a.id = b.parentid order by parent_link; and here is result ++-++ | type | parent_link | child_link

Re: [PHP] Sessions on win32, PHP and IIS

2003-03-19 Thread Diego Fulgueira
For session variables to work: Use the $_SESSION array instead of $HTTP_SESSION_VARS. Also, check your session_path (defined in php.ini, which should be under /WINNT). session_path should point to a directory where user IUSR_MYHOST has writing permissions. There, you should see a file created

[PHP] - IIS - More info

2003-03-19 Thread Diego Fulgueira
Did you checked my last message? Was it helpful? PHP under Apache exposes diferent global variables than PHP under IIS. It will be impossible for you to correct your errors without changing your code. Run phpinfo() to see what variables are available under IIS. About session variables... I

<    1   2