[PHP] Is there a GoTo Page Function?

2002-03-05 Thread Andre Dubuc
As a complete newbie to PHP, and relative novice to html, this one has me stumped. Rather than wade through volumes of documentation, I thought I'd risk asking it here. After inserting variables from a fill-out html form into my database, I would like the form to goto the next html page, but

Re: [PHP] Re: Is there a GoTo Page Function?

2002-03-05 Thread Andre Dubuc
On Tuesday 05 March 2002 16:15, you wrote: Andre Dubuc wrote: As a complete newbie to PHP, and relative novice to html, this one has me stumped. Rather than wade through volumes of documentation, I thought I'd risk asking it here. After inserting variables from a fill-out html form

Re: [PHP] Is there a GoTo Page Function?

2002-03-05 Thread Andre Dubuc
On Tuesday 05 March 2002 17:43, you wrote: On Tuesday, March 5, 2002, at 04:06 PM, Andre Dubuc wrote: After inserting variables from a fill-out html form into my database, I would like the form to goto the next html page, but I cannot figure out how to do this basic function. I assume

Re: [PHP] Re: Is there a GoTo Page Function?

2002-03-05 Thread Andre Dubuc
]; [EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 1:15 PM Subject: [PHP] Re: Is there a GoTo Page Function? Andre Dubuc wrote: As a complete newbie to PHP, and relative novice to html, this one has me stumped. Rather than wade through volumes of documentation, I thought I'd risk asking

Re: [PHP] Is there a GoTo Page Function?

2002-03-05 Thread Andre Dubuc
On Tuesday 05 March 2002 19:20, you wrote: On Tuesday, March 5, 2002, at 07:01 PM, Andre Dubuc wrote: Now that makes sense. I'm getting a better idea of how it works together. I figured there must be a way to control the Submit button's behaviour, but I didn't know where to look

Re: [PHP] Is there a GoTo Page Function?

2002-03-05 Thread Andre Dubuc
, and it got me off the ground. The online manuals for php and mysql have also been invaluable. Save your money, buy food instead. Hope this helps, Hugh - Original Message - From: Andre Dubuc [EMAIL PROTECTED] To: hugh danaher [EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 6:35 PM

Re: [PHP] Is there a GoTo Page Function?

2002-03-06 Thread Andre Dubuc
06 March 2002 00:43, you wrote: Whack your text and input boxes in different cells of a table,.. use align (or nowadays an appropriate style setting) and that should get your things lined up :-) Andre Dubuc [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

[PHP] Selecting a Queried Row

2002-03-09 Thread Andre Dubuc
As a newbie at PHP (and relative newcomer to HTML and web design) I've been wading through documentation trying to accomplish various tasks. However, I'm stumped on how to proceed with the following: I would like a web vistor to be able to select a row from a table that has been generated

Re: [PHP] Selecting a Queried Row

2002-03-11 Thread Andre Dubuc
; ? - Original Message - From: Andre Dubuc [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 09, 2002 4:12 PM Subject: [PHP] Selecting a Queried Row As a newbie at PHP (and relative newcomer to HTML and web design) I've been wading through documentation trying

[PHP] Using Switch to control form action . .

2002-03-15 Thread Andre Dubuc
I'd like to control which php file is called when clicking two buttons on the bottom of a form; one called Add Names, the other Submit I've tried the following with no success: *** form action= switch ($name) { case add:

Re: [PHP] Using Switch to control form action . .

2002-03-15 Thread Andre Dubuc
. Regards, Andre On Friday 15 March 2002 19:41, you wrote: On Fri, 15 Mar 2002, Andre Dubuc wrote: I'd like to control which php file is called when clicking two buttons on the bottom of a form; one called Add Names, the other Submit I've tried the following with no success

Re: [PHP] Using Switch to control form action . .

2002-03-15 Thread Andre Dubuc
around the PHP, but it might be psuedo code. Good luck, Justin French Andre Dubuc wrote: I'd like to control which php file is called when clicking two buttons on the bottom of a form; one called Add Names, the other Submit I've tried the following with no success

[PHP] Formatting input text?

2002-03-16 Thread Andre Dubuc
I wonder whether this is possible? I would like to format a text input so that the first letter of the input (as the user is typing it in) would automatically be converted to Uppercase (capitals). Furthermore, if it is possible, I would like to pre-format the date input type=text so that

Re: [PHP] Formatting input text?

2002-03-16 Thread Andre Dubuc
- From: Andre Dubuc [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 16, 2002 4:44 PM Subject: [PHP] Formatting input text? I wonder whether this is possible? I would like to format a text input so that the first letter of the input (as the user is typing it in) would

[PHP] Trap CR or Enter possible?

2002-03-21 Thread Andre Dubuc
In one of my php pages, I have a form that requires the user to click Search for Surname. If however they press Enter, undesirable effects occur. I've successfully trapped if an empty string is in the input type=text, but Enter eludes my efforts to trap it for an appropriate Educational

Re: [PHP] Trap CR or Enter possible?

2002-03-21 Thread Andre Dubuc
/; method=get onSubmit=return (this.okay.value != 'no'); input type=hidden name=okay value=no input type=text input type=submit onClick=this.form.okay.value = 'yes'; /form -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 1:39 PM To: [EMAIL

[PHP] Adding Text Input in a SELECT drop-down list

2002-03-23 Thread Andre Dubuc
I have written, in an html form, a drop-downlist that uses SELECT: i.e. SELECT NAME=state OPTION SELECTEDState OPTIONAL OPTIONAZ OPTION// and so on I would like a text input as the last option so that a user

Re: [PHP] Adding Text Input in a SELECT drop-down list

2002-03-23 Thread Andre Dubuc
On Saturday 23 March 2002 19:45, you wrote: On Sat, 23 Mar 2002, Andre Dubuc wrote: I have written, in an html form, a drop-downlist that uses SELECT: i.e. SELECT NAME=state OPTION SELECTEDState OPTIONAL OPTIONAZ OPTION

Re: [PHP] Adding Text Input in a SELECT drop-down list

2002-03-23 Thread Andre Dubuc
On Saturday 23 March 2002 19:57, you wrote: If you've seen it on other sites (I can't see how, since there's no support for it in the HTML spec), then why not just look at the source? Too bad, since a few sites seem to have that capability. Oh well . . Regards, Andre --

[PHP] Switching from Register_Globals=On

2002-04-13 Thread Andre Dubuc
To prototype my site, I've used register_globals=on, and track_vars=on. I'm at the point where I would like to switch the globals off', and prepare the site for production use. My problem is that I don't know how to implement the use of $HTTP_SESSION_VARS or $_SESSION in my webapages (or

Re: [PHP] Switching from Register_Globals=On

2002-04-13 Thread Andre Dubuc
Thanks Matt, Actually, at this point, I've reverted back to register_globals=on until I figure out what's the best way to do this. So far, I have no references to session_register() on any page. In your opinion, should I go with $_SESSION or use the other approach, $HTTP_SESSION_VARS. I

Re: [PHP] Switching from Register_Globals=On

2002-04-13 Thread Andre Dubuc
Thanks Matt. Well, I guess the best time to start is now. I'll use $_SESSION -- sounds like less work. Wish I had used them to begin with . . . but back then, I only had two pages -- I sort of forgot to switch over while coding. Thanks for your advice, Regards, Andre On Saturday 13 April

[PHP] Modifying the sort order of a query

2002-06-05 Thread Andre Dubuc
Apache 1.3.23 + PHP 4.1.2 + PostgreSQL 7.2 I have a query that sorts by name, country, and city, then pages in groups of 30 records. Originally, I had also coded two buttons: Sort by Country', 'Sort by City' since I wanted to offer users the options of these choices. Unfortunately, these

Re: [PHP] Modifying the sort order of a query

2002-06-05 Thread Andre Dubuc
: SELECT * FROM (SELECT * FROM rap ORDER BY rcountry,rcity,rsname,rfname DESC LIMIT 30 OFFSET 30) ORDER BY whatever; miguel On Wed, 5 Jun 2002, Andre Dubuc wrote: Apache 1.3.23 + PHP 4.1.2 + PostgreSQL 7.2 I have a query that sorts by name, country, and city, then pages in groups

Re: [PHP] Modifying the sort order of a query

2002-06-05 Thread Andre Dubuc
DESC LIMIT 30 OFFSET 30) ORDER BY whatever; miguel On Wed, 5 Jun 2002, Andre Dubuc wrote: Apache 1.3.23 + PHP 4.1.2 + PostgreSQL 7.2 I have a query that sorts by name, country, and city, then pages in groups of 30 records. Originally, I had also coded two buttons

Re: [PHP] Modifying the sort order of a query

2002-06-05 Thread Andre Dubuc
rap ORDER BY rcountry,rcity,rsname,rfname DESC LIMIT 30 OFFSET 30) ORDER BY whatever; miguel On Wed, 5 Jun 2002, Andre Dubuc wrote: Apache 1.3.23 + PHP 4.1.2 + PostgreSQL 7.2 I have a query that sorts by name, country, and city, then pages in groups

Re: [PHP] Modifying the sort order of a query

2002-06-05 Thread Andre Dubuc
to page 4 (well, you can, but it's going to be a whole new page four because of the new sort order). Example page will really help here; maybe I'm just slow in visualizing this. We can take this off the list if necessary, too. ---John Holmes... -Original Message- From: Andre Dubuc

Re: [PHP] Modifying the sort order of a query

2002-06-05 Thread Andre Dubuc
but not always use the queries ... so that you can have it sorted by any and everything you want... any way just a thought cheers Peter -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Thursday, 6 June 2002 1:27 PM To: [EMAIL PROTECTED] Subject: Re: [PHP

Re: [PHP] Modifying the sort order of a query

2002-06-06 Thread Andre Dubuc
Thanks Jay, Well, I went back to work on it, and with the combined suggestions from the list, it's working now. I just had to insert the sub-select on the called page as well. That seemed to be the problem. Thanks for your suggestion -- I used part of it. Regards, Andre On Thursday 06 June

[PHP] Switching from HTTPS to HTTP using PHP?

2002-06-10 Thread Andre Dubuc
After completing most of the coding for my site, I would like to use https for restricted areas that require login. In short tests, I've discovered that, yes, I can engage the encrypted mode while calling these pages, but I've also discovered that it stays in the https mode even when it passes

Re: [PHP] Switching from HTTPS to HTTP using PHP?

2002-06-10 Thread Andre Dubuc
: Regards, Andre On Monday 10 June 2002 02:28 pm, you wrote: Isn't it just an issue of whether you call http: or https: ? -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 11:27 AM To: [EMAIL PROTECTED] Subject: [PHP] Switching from HTTPS

Re: [PHP] Switching from HTTPS to HTTP using PHP?

2002-06-10 Thread Andre Dubuc
Thanks Ed, As you mentioned in your last lines, I'll have to specify the http protocol for the ordinary pages -- I hadn't done that yet. I assumed it would default to http; but, if I had thought about it, that wouldn't make sense. Unless told otherwise, https would not know that another

[PHP] Extracting from an Array

2002-06-12 Thread Andre Dubuc
I have a db field, type varchar, that is actually a 'date' string formatted as dd-mm-. I used type 'varchar' (rather than type 'date') since I had to accomplish other things with it. Now, however, I do need to extract the Year (the last four digits in the array). I've tried to access the

Re: [PHP] Extracting from an Array

2002-06-12 Thread Andre Dubuc
tablename; $Results = mysql_query($sql, $DBLink); $Row = mysql_fetch_array($Results); $fieldname = $Row[fieldname]; $Date = explode(-, $fieldname); $Year = $Date[2]; -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 4:11 PM To: [EMAIL

Re: [PHP] Extracting from an Array

2002-06-12 Thread Andre Dubuc
to sort by this column, you'd be all messed up? It'll sort as a string, where 10 is less than 2. Do you realize what I'm trying to say?? ---John Holmes... -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 8:15 PM To: Lazor, Ed Cc

Re: [PHP] Extracting from an Array

2002-06-12 Thread Andre Dubuc
this: SELECT date_column FROM table ORDER BY RIGHT(date_column,4) ASC ---John Holmes... -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 9:32 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Extracting from an Array Hi John, Yup

Re: [PHP] Extracting from an Array

2002-06-14 Thread Andre Dubuc
. What value does $rexpiry have? What do you see when you do print_r($Date) ?? Troubleshoot... ---John Holmes... -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 10:36 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re

Re: [PHP] Checking for NULL value in Database

2002-06-18 Thread Andre Dubuc
the database, everything worked as expected. I guess I should vacuum more frequently? Btw, you wouldn't happen to know any 'timer' script that I can program for seconds? Regards, Andre On Tuesday 18 June 2002 03:58 pm, you wrote: On Mon, Jun 17, 2002 at 10:46:27AM -0400, Andre Dubuc wrote

[PHP] Limiting text inputs by character count?

2002-06-23 Thread Andre Dubuc
Is there a way to limit the number of characters that may be inputed into: a) a input type=text . . . input b) a textarea . . . input I would like to control the maximum number of characters for each of these inputs. Any suggestions of where to look, or how to do it, if it's

Re: [PHP] Limiting text inputs by character count?

2002-06-23 Thread Andre Dubuc
: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Monday, 24 June 2002 11:53 AM To: [EMAIL PROTECTED] Subject: [PHP] Limiting text inputs by character count? Is there a way to limit the number of characters that may be inputed into: a) a input type=text . . . input b) a textarea

[PHP] Word Count function?

2002-06-24 Thread Andre Dubuc
Is there a function that counts the number of words in a string? I checked through the manual and archives using 'word count', and found nothing. I suppose it is possible to generate code that will accomplish this, using 'space' as the delimiting separator. But before I re-invent the wheel .

Re: [PHP] Word Count function?

2002-06-24 Thread Andre Dubuc
Thanks Dan, Does the job neatly! Regards, Andre On Monday 24 June 2002 06:01 pm, you wrote: Andre: On Mon, Jun 24, 2002 at 05:29:16PM -0400, Andre Dubuc wrote: Is there a function that counts the number of words in a string? I don't recall there being one. But, you could do

Re: [PHP] ./configure with register_globals turned on?

2002-07-05 Thread Andre Dubuc
Hi Scott, I've come to this post a little late, but I had exactly the same problem. No matter what I set php.ini, phpinfo() would not show changes. If I recall correctly, the problem sort of 'disappeared' by itself. I finally resolved it by rebooting immediately after setting the new php.ini

[PHP] How to set focus in a form field

2002-07-11 Thread Andre Dubuc
I have an annoying 'glitch' in the forms on my site: When a page loads, if it has a form on it, I would like the cursor to move to the first field, be 'set' - that is, I should see a cursor or blinking cursor in the first field. As it is now, on some pages, I either have to 'tab' to the first

Re: [PHP] How to set focus in a form field

2002-07-11 Thread Andre Dubuc
Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 11, 2002 11:26 AM To: [EMAIL PROTECTED] Subject: [PHP] How to set focus in a form field I have an annoying 'glitch' in the forms on my site: When a page loads, if it has a form on it, I would like the cursor to move

Re: [PHP] Strong Web Hosts in Canada?

2002-07-17 Thread Andre Dubuc
Hi Dan, Try http://www.hub.org. Hth, Andre On Wednesday 17 July 2002 02:23 am, you wrote: Hi Folks: A client of mine has a large series of high traffic, PHP/MySQL intensive websites. They're looking for dedicated hosting in Canada. Any recommendations? Enjoy, --Dan -- PHP General

Re: [PHP] Loading a File into Variable - How??

2002-07-18 Thread Andre Dubuc
Hi Monty, I've been trying to do the same thing with no success. Would you be so kind as to show me how you finally did it? I'm not too clear what you meant by: So, if I replace the filesize($filename) command with a hard-coded number, it works. Tia, Andre On Thursday 18 July 2002 04:28 pm,

[PHP] Sorting db entries by Year-Month

2002-07-23 Thread Andre Dubuc
Apache 1.3.23 + PHP 4.1.2 + PostgreSQl 7.2 I have a guestbook that I would like to display the current month's entries. I can display all the entries before the current month, but i can't seem to figure out how to extract the currrent month's. Although the code below is a db issue, I don't

Re: [PHP] Sorting db entries by Year-Month

2002-07-23 Thread Andre Dubuc
2002 16:26 pm, Andre Dubuc wrote: Apache 1.3.23 + PHP 4.1.2 + PostgreSQl 7.2 snipped -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sorting db entries by Year-Month

2002-07-23 Thread Andre Dubuc
extract the month from the column and compare them?? ---John Holmes... -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 7:26 PM To: [EMAIL PROTECTED] Subject: [PHP] Sorting db entries by Year-Month Apache 1.3.23 + PHP 4.1.2

[PHP] RE: Sorting db Entries by Year-Month -- Solved

2002-07-23 Thread Andre Dubuc
Thanks to BigDog and John Holmes for their suggestions. I figured it out: it was rather easy, in hindsight, of course: ?php $today = getdate(); $month = $today['mon']; . . . $query = SELECT * FROM guest WHERE pdate ~ '{$month}'; . . . ? Works as expected. Regards, Andre -- PHP General

Re: [PHP] Sorting db entries by Year-Month

2002-07-23 Thread Andre Dubuc
time might pass for the new PHP to stabilize. Regards, Andre On Tuesday 23 July 2002 08:47 pm, you wrote: What do you guys think? Should we tell him he's running a vulnerable version of PHP _and_ of Apache??? On Tuesday 23 July 2002 16:26 pm, Andre Dubuc wrote: Apache

[PHP] Accessing variables: $_POST and $foo

2002-04-15 Thread Andre Dubuc
While prototyping my db-driven website using Apache 1.3.23 + PPHP 4.1.2 + PostgreSQL 7.2 under the rpm distribution of Mandrake 8.2, I used the default register_globals=on setting. As I'm nearing the end of protyping, I decided to switch register_globals=off by ediuting the php.ini file.

[PHP] Tabs + SELECTED

2002-04-18 Thread Andre Dubuc
An interesting problem has surfaced while finishing the coding for an input form. The usual text inputs fields are in place for first name, surname, address etc. However, I've created a drop-down list for state and country. Since these drop-down lists have OPTION SELECTEDIn USA/Canada ,

Re: [PHP] Tabs + SELECTED

2002-04-18 Thread Andre Dubuc
On Thursday 18 April 2002 02:31 pm, you wrote: On Thursday, April 18, 2002, at 12:33 PM, Andre Dubuc wrote: Since these drop-down lists have OPTION SELECTEDIn USA/Canada , tabbing in the form jumps over these drop-downs [simply becuase they're filled]. I would like them

[PHP] Empty $_SESSION and $_POST ??

2002-04-19 Thread Andre Dubuc
I've switched register_globals=off and register_argc_argv=off in php.ini to use $_SESSION and/or $_POST. All my code had been written using $var Unfortunately, I cannot seem to access the arrays in either $_SESSION and $_POST. I've set each page to start with ?php session_start(); ob_start();

Re: [PHP] Empty $_SESSION and $_POST ??

2002-04-19 Thread Andre Dubuc
On Friday 19 April 2002 08:13 pm, you wrote: On Fri, 19 Apr 2002, Andre Dubuc wrote: Whenever I try: print($_SESSION['sfname']); or print($_POST['scity'] I get a parse error expecting 'T_STRING' . . . -- obviously there's nothing in the array or I haven't set it. You just have

Re: [PHP] Empty $_SESSION and $_POST ??

2002-04-19 Thread Andre Dubuc
wrote: On Fri, 19 Apr 2002, Andre Dubuc wrote: Whenever I try: print($_SESSION['sfname']); or print($_POST['scity'] I get a parse error expecting 'T_STRING' . . . -- obviously there's nothing in the array or I haven't set it. You just have a simple syntax error. You can

[PHP] Re: [PHP-INST] can't view PHP

2002-04-19 Thread Andre Dubuc
Hi Joey, Don't know whetehr I can help, but I ran into the same problem with my Linux box. In Mozilla et al, I had to change in Preferences Advanced Proxies Manual Proxy Config No proxy for: Localhost. I haven't followed your thead, and I'm no familair with networking, butthta might

Re: [PHP] Empty $_SESSION and $_POST ??

2002-04-22 Thread Andre Dubuc
On Monday 22 April 2002 09:50 am, you wrote: On Friday, April 19, 2002, at 09:41 PM, Andre Dubuc wrote: Is there a way I can verify that (a) globals are off and (b) $_SESSION or $_POST are on? This probably what's happening -- I can't access the arrays at all -- so, I think that might

Re: [PHP] Empty $_SESSION and $_POST ??

2002-04-22 Thread Andre Dubuc
On Monday 22 April 2002 05:34 pm, you wrote: On Monday, April 22, 2002, at 03:47 PM, Andre Dubuc wrote: I tried what you suggested, and indeed globals are off. Perhaps my problem stems from my use of the $_GET[] with $vars. I guess I don't really understand what I'm doing. If you would

[PHP] Re: {PHP] Empty $_SESSION and $_POST??

2002-04-23 Thread Andre Dubuc
Hi Eric, First off, my apologies for the bloat replies, and for the re-write of this thread -- your last reply accidentally was deleted. My actual INSERT command (for page 1): $query = INSERT INTO sponsor (sid, sfname, ssname, sinit, saddr1, saddr2, scity, sprov, scountry, scode, sstatus,

Re: [PHP] Empty $_SESSION and $_POST??

2002-04-23 Thread Andre Dubuc
Hi Eric, First off, my apologies for the bloat replies, and for the re-write of this thread -- your last reply accidentally was deleted. My actual INSERT command (for page 1): $query = INSERT INTO sponsor (sid, sfname, ssname, sinit, saddr1, saddr2, scity, sprov, scountry, scode, sstatus,

Re: [PHP] Empty $_SESSION and $_POST ??

2002-04-24 Thread Andre Dubuc
On Wednesday 24 April 2002 09:18 am, you wrote: Have you tried doing phpinfo() and seeing what values are coming up? I finally got everything working, thanks to Erik Price's excellent help and for all the others who offered their suggestions. Thanks for your suggestion! Regards, Andre --

[PHP] E-mail Confirmation script?

2002-05-12 Thread Andre Dubuc
I've looked about for an 'Email Confirmation' script that many sites use for verifcation of wannabee new members. That is, the person subscribes, is sent a 'confirmation' number to which they must have in the 'Subject' area of their reply. I would like to implement this on my site, but I

Re: [PHP] E-mail Confirmation script?

2002-05-12 Thread Andre Dubuc
confirming, you could send a welcome user email and include another link that they can use for all other account management like unsubscribing, changing password, changing personal info ... http://www.mysite.com/account.php -Original Message- From: Andre Dubuc [mailto:[EMAIL

[PHP] Uploading JPEG's - Security Issues?

2002-05-14 Thread Andre Dubuc
My question will probably expose my woeful lack understanding of security breaches, but perhaps someone can enlighten me. On my site, registered members will be allowed to upload jpg/jpeg pictures. I'm concerned about possible security problems. First, is there a way to ensure that a picture

Re: [PHP] Uploading JPEG's - Security Issues?

2002-05-15 Thread Andre Dubuc
change (for protyping) to php.ini using /var/www/html as the upload_temp_dir, but I don't know how or where it should go in production. Any suggestions? Tia, Andre On Wednesday 15 May 2002 02:36 pm, you wrote: On Tue, 14 May 2002, Andre Dubuc wrote: My question will probably expose my woeful

[PHP] Uploading JPEG's - Security Issues?

2002-05-16 Thread Andre Dubuc
My question will probably expose my woeful lack understanding of security breaches, but perhaps someone can enlighten me. On my site, registered members will be allowed to upload jpg/jpeg pictures. I'm concerned about possible security problems. First, is there a way to ensure that a picture

Re: [PHP] Uploading JPEG's - Security Issues?

2002-05-16 Thread Andre Dubuc
there. It is then your job to perform the check and copy the file to some appropriate directory on your server. If you don't do anything with the file, PHP will automatically delete it at the end of the request. -Rasmus On Tue, 14 May 2002, Andre Dubuc wrote: My question will probably expose my woeful lack

[PHP] Augmenting an old date

2002-05-18 Thread Andre Dubuc
Two columns in my PostgreSQL db are type 'date' (formatted '-mm-dd'): 'start_date' and 'expiry_date'. What I cannot seem to figure out is how to augment the 'expiry_date' either by 30 days, 60 days, or 1 year. I've tried the date function in PHP (getdate) but the problem is that it

Re: [PHP] Augmenting an old date

2002-05-19 Thread Andre Dubuc
At 02:03 PM 19/05/2002, Andre Dubuc wrote: Two columns in my PostgreSQL db are type 'date' (formatted '-mm-dd'): 'start_date' and 'expiry_date'. What I cannot seem to figure out is how to augment the 'expiry_date' either by 30 days, 60 days, or 1 year. I've tried the date function in PHP

[PHP] Annoying display problem

2002-05-23 Thread Andre Dubuc
PHP 4.1.2 + Apache 1.3.23 + PostgreSQL 7.2 I've put off trying to figure out how to accomplish a fairly simple display problem. It's probably so simple, that I keep missing it. Here's what I'd like to accomplish: I want an image (aligned on the left side) with text beside it (aligned in the

Re: [PHP] Annoying display problem

2002-05-23 Thread Andre Dubuc
Miguel, It's been a long day - thanks. (Duh at this end!) Regards, Andre On Thursday 23 May 2002 04:54 pm, you wrote: The obvious answer would be a table. miguel On Thu, 23 May 2002, Andre Dubuc wrote: PHP 4.1.2 + Apache 1.3.23 + PostgreSQL 7.2 I've put off trying to figure out how

Re: [PHP] Annoying display problem

2002-05-23 Thread Andre Dubuc
Thanks Dave, I tried that one, and the results were interesting. I reverted to the table method (I should have thought of it earlier, seeing that I had just used it in the lines just before [go figure!], but my mind was too frazzled to see it. Now I've got the text sitting nicely beside the

Re: [PHP] Annoying display problem

2002-05-23 Thread Andre Dubuc
Hi Dave, Well, I sort of solved it by adding: tdnbsp;nbsp;/td in a few judicious places. Renders well in Konqueror, Mozilla, and Galeon. Btw, I've been using CSS, and thought of doing it there, but it's a lot of trouble for only one table. Thanks, Andre On Thursday 23 May 2002 11:00 pm,

[PHP] 'ucfirst' function for text area strings?

2002-05-28 Thread Andre Dubuc
Is there a way to get a function similar to 'ucfirst' to work with the first letters of a set of strings in textarea strings? ** Inputted strings: hi. i hope there is one. any ideas? Should appear: Hi. I hope there is one. Any ideas?

Re: [PHP] 'ucfirst' function for text area strings?

2002-05-28 Thread Andre Dubuc
is evaluated though. ---John Holmes... -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 5:37 PM To: Miguel Cruz Cc: [EMAIL PROTECTED] Subject: Re: [PHP] 'ucfirst' function for text area strings? On Tuesday 28 May 2002 02:19 pm, you

[PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Andre Dubuc
I've noticed that many people on the list code in 'pure' php, i.e. ? print input type='text' name='fname' size='50'; // etc ? Since most of my code is a mixture (the early stuff is 'mixed' html + php), I've been wondering why code in 'pure' php? Is there some compelling reason (that I'm

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Andre Dubuc
php as you call it due to the first reason. Bogdan Andre Dubuc wrote: I've noticed that many people on the list code in 'pure' php, i.e. ? print input type='text' name='fname' size='50'; // etc ? Since most of my code is a mixture (the early stuff is 'mixed' html + php), I've been

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Andre Dubuc
On Sunday 02 June 2002 08:13 pm, you wrote: On Sun, Jun 02, 2002 at 07:55:09PM -0400, Andre Dubuc wrote: I've noticed that many people on the list code in 'pure' php, i.e. ? print input type='text' name='fname' size='50'; // etc ? Since most of my code is a mixture (the early

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Andre Dubuc
June 2002 08:32 pm, you wrote: I'm not sure what you mean... Is it checking that you fill in the correct values via PHP or that the submission works - or something else? Bogdan Andre Dubuc wrote: Thanks Bogdan, That's what I thought, but I was beginning to feel 'guilty' the more I

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Andre Dubuc
n't know if that's true and try to write pure php as you call it due to the first reason. Bogdan Andre Dubuc wrote: I've noticed that many people on the list code in 'pure' php, i.e. ? print input type='text' name='fname' size='50'; // etc ? Since most of my code is a

Re: [PHP] Re: 'Pure' php vs 'mixed' (html + php)

2002-06-03 Thread Andre Dubuc
On Monday 03 June 2002 01:00 pm, you wrote: Sunday, June 02, 2002, 7:55:09 PM, Andre wrote: AD I've been wondering why code in 'pure' php? Is there some compelling reason AD (that I'm unaware of) for doing so? Should I rewrite all my earlier code into Andre, Sorry to chime in so

[PHP] Session problem with https

2002-08-03 Thread Andre Dubuc
I've followed the threads on sessions, and discovered, to my horror, that I was passing the session id through cookies. Attempting to repair this 'problem' has been fun (with 200+ files). Somehow, the session variables are not passing through once they encounter an https page. I'm using the

[PHP] Session problem with https

2002-08-04 Thread Andre Dubuc
I've followed the threads on sessions, and discovered, to my horror, that I was passing the session id through cookies. Attempting to repair this 'problem' has been fun (with 200+ files). Somehow, the session variables are not passing through once they encounter an https page. I'm using the

[PHP] Code for db connection errors

2002-08-15 Thread Andre Dubuc
Suppose, during an attempted connection to a database, an error condition occurs, where the connection cannot be made. ?php . . . $db = pg_connect(dbname=rap user=postgres) die (Connection failed - please try again.); . . . . ? Is it advisable for such a message to be displayed to the User,

Re: [PHP] Code for db connection errors

2002-08-15 Thread Andre Dubuc
On Thursday 15 August 2002 10:20 pm, Jason Wong wrote: It's probably not very user friendly to display the raw error. You could redirect the user to a generic error page saying something like The site is down for maintenance or whatever. That's what I thought. So with your other idea of

Re: [PHP] Re: Code for db connection errors

2002-08-15 Thread Andre Dubuc
) { switch ($code) { case 0 : reportErrMsg($error[$code]); break; ... } } ? i think ive would have done something like that... but im not the greatest expert on php :) regards patrick Andre Dubuc [EMAIL PROTECTED] skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL P

[PHP] NS4.x / IE3.0 Browser Detection

2002-08-20 Thread Andre Dubuc
I need to differentiate between different versions of NS4, particularly the ones that are used by Mac. So far, I've used the following to detect variants: if(eregi((Mozilla/4.[0-8][0-9]),$_SERVER['HTTP_USER_AGENT'])) However, I'm aware that it will not distinguish between PC and Mac-based

Re: [PHP] NS4.x / IE3.0 Browser Detection

2002-08-20 Thread Andre Dubuc
On Tuesday 20 August 2002 10:57 am, Lowell Allen wrote: From: Andre Dubuc [EMAIL PROTECTED] I need to differentiate between different versions of NS4, particularly the ones that are used by Mac. So far, I've used the following to detect variants: if(eregi((Mozilla/4.[0-8][0-9

[PHP] Simple Security Clarification

2002-08-21 Thread Andre Dubuc
In another thread [How do you protect individual files], Justin French stated: In real short, you want to store the files outside your htdocs root (so they can't be served by http) . . . My PHP setup serves files from DOCUMENT_ROOT=/var/www/html. If I place files in '/var/www/html/secure'

[PHP] Code for off-site Maintenance?

2002-08-21 Thread Andre Dubuc
Soon, I will be transferring my site to go on-line with my IP. Since I've never managed anything off-site, I have a very fundamental question: What are the usual procedures with respect to maintaining a site, that is, accessing the PostgreSQL database for corrections, deletions, etc? One idea

Re: [PHP] Simple Security Clarification

2002-08-21 Thread Andre Dubuc
On Wednesday 21 August 2002 08:15 am, Jay Blanchard wrote: [snip] In another thread [How do you protect individual files], Justin French stated: In real short, you want to store the files outside your htdocs root (so they can't be served by http) . . . My PHP setup serves files from

Re: [PHP] Code for off-site Maintenance?

2002-08-21 Thread Andre Dubuc
) to add / edit / delete / arrange some content... End of the day, it's each to their own -- but I know that I wouldn't want to be directly editing live code, data or modules on the fly. I like to work on a mirror, test, test, test, upload, test. Justin French on 21/08/02 10:11 PM, Andre

[PHP] Further Security Clarifications [was: Simple Security Clarifcation]

2002-08-21 Thread Andre Dubuc
My main files are located in /var/www/html (the 'DOCUMENT_ROOT' in Apache, according to php.ini). All sensitive files have been moved to '/var/www/secure', but now I can't access them! (According to php.ini, the PHP core 'doc_root=none'). I'm totally confused. If I understand this correctly,

Re: [PHP] Further Security Clarifications [was: Simple Security Clarifcation]

2002-08-21 Thread Andre Dubuc
including them? I use a require(/pathtofile/filename.php); Works for me assuming I have the right permissions. Best Regards Bob Irwin Server Admin Web Programmer Planet Netcom - Original Message - From: Andre Dubuc [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August

Re: [PHP] Further Security Clarifications [was: Simple Security Clarifcation]

2002-08-21 Thread Andre Dubuc
Thanks again Bob, First off, the site is still being debugged off-line, and part of the problem, as you suggested is my confusion over UNIX SERVER and the Apache Server. OK. Got that. What I'm trying to do: Any file that utilizes $_SESSION variables accessed through username/password

[PHP] Apostrophe in preg_match?

2002-08-27 Thread Andre Dubuc
I'm trying to get an apostrophe (and a dash, as well) to be included in a preg_match expression, but I don't know how to escape the characters. ?php if (preg_match(^[!a-zA-Z-/\\\'/]^, $_POST['ssname'])) die (h5Numbers and special characters not allowed in 'Surname'brbr Click 'Back' on your

Re: [PHP] Apostrophe in preg_match?

2002-08-28 Thread Andre Dubuc
Thanks DL, I've read that part of the manual. My original syntax was as you suggested [^a-zA-Z-'], but the PostgreSQl query barfed on the apostrophe. The preg_match works, but the db refuses to accept the apostrophe. Reading the postgresql docs, they suggest escaping the character, but since

  1   2   3   >