[PHP] What's wrong with this code please?

2004-02-24 Thread Donpro
$emails = array([EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]); $addresses = explode(,,$emails); for ($i=0; $i count($addresses); $i++) { echo $i . ': ' . $addresses[$i] . 'br'; if ($i == count($addresses) - 1) $form['recipient'] .= $addresses[$i]; else

[PHP] Why doesn't PHP see my MySQL upgrade?

2004-02-17 Thread Donpro
Hi, Just installed a new RedHat 7.3 system. 1. I upgraded to PHP 4.3.4 2. I upgraded to MySQL 4.0.17 3. Restarted Apache; I even rebooted! When I run phpinfo() in my web browser, it shows: Client API version: 3.23.58 What's going on ??? Thanks, Don -- PHP General Mailing List

RE: [PHP] Why doesn't PHP see my MySQL upgrade?

2004-02-17 Thread Donpro
:1200 undefined reference to 'mysql_drop_db' What next??? Shall I wipe out my PHP directory, install the Tarball and try compiling from scratch? -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 17, 2004 11:46 AM To: Donpro; php list Subject: Re

[PHP] compile problem

2004-02-13 Thread Donpro
Hi, trying to compile PHP 4.3.4. on RedHat Linux 7.3 and getting the following error: checking for CURL support... yes checking for CURL in default path... found in /usr checking for cURL 7.9.8 or greater... configure: error: cURL version 7.9.8 or later is required to compile php with cURL

[PHP] uploaded files are corrupted

2004-02-11 Thread Donpro
Hi, I have a script that allows the user to browse his/her local hard drive for a file and email it as an attachment. Text files come through OK but any binary type file, e.g., JPEG or PDF arrive broken. JPEG will show as a red X in my browser and Adobe will complain about the PDF. I don't

[PHP] Sessions on Win2k

2004-02-11 Thread Donpro
Hi, I've searched the archives and note that many have probelms using session on a Win2K server. I am getting a Undefined index: sessions in D:\inetpub\mydomain\www\forms\formmail\formmail.php on line 768 error. Line 768 is: session_start(); It works Ok on Linux; is there any special

[PHP] Pausing in PHP

2003-11-10 Thread Donpro
Hi, Is there a PHP function that would allow the script execution to pause 'N' seconds? This is analogous to the dBase inkey() function. Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] How do I call a function in a Class from another function in the same class

2003-08-14 Thread Donpro
Hi, I have two functions in a class where one calls the other. When creating my object I get an error: Call to undefined function I dont understand why the function can't be seen? Thanks, Don --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system

[PHP] How do I manipulate a date variable to a specific date array?

2003-08-14 Thread Donpro
Hi, I use the getdate() function to return today's date in an array. I do this as I need to separate the day/month/year as to display them in a drop down combo box in my form. I would like to manipulate my array as such. 1) Find the next Monday (if not already Monday); set the array to this

[PHP] Adding days to a date

2003-08-14 Thread Donpro
I have a piece of code like so: $today =- getdate(); I am looking for a function that will add a variable number of days and return a valid date, i.e., the array elements for mday, mon and year are reset as needed. Is this possible? Thanks, Don --- Outgoing mail is certified Virus Free.

[PHP] Validating postal codes

2002-11-15 Thread DonPro
Hi, I'm trying to validate a Canadian postal code. I've already written a function; code as follows: if(!eregi('(^[a-z][0-9][a-z][0-9][a-z][0-9]$)',$form[authpstcode])) { $errors[] = 'You must input a valid Canadian postal code (A9A9A9) postal code if he/she resides in Canada'; $continue

[PHP] How do I check if a checkbox has been checked?

2002-11-01 Thread DonPro
Hi, I have a form with a checkbox like so: input type=checkbox value=ON name=shipper_save When I submit, the value is always shown as ON regardless of whether I've checked the checkbox or not. So this begets the question, How can I code my PHP form processing script to determine whether the

[PHP] Saving form input fields to MySQL br clicking on a button

2002-10-31 Thread DonPro
Hi, I have a form where the user enters some information. For a particular section of the form, I'd like the user to be able to save what he/she entered so that the next time they feel out the form, they can recall without the need to retype. This is not for the entire form but only for a few

[PHP] Re: Validating E-mail Accounts

2002-10-31 Thread DonPro
Most mail servers have the verify command disabled these days, so it makes almost impossible to validate. Blame spammers for ruining everything. But here's a class that will attempt to do what you wish: http://www.phpclasses.org/browse.html/package/13.html - Original Message - From:

Re: [PHP] Saving form input fields to MySQL br clicking on a button

2002-10-31 Thread DonPro
These two ideas, I really like. Saves me lots of coding Thanks, Don - Original Message - From: PHP List To: php ; DonPro Sent: Thursday, October 31, 2002 4:09 PM Subject: Re: [PHP] Saving form input fields to MySQL br clicking on a button Why not use the Memorize button

[PHP] How can I check for variances in spelling within form text input fields?

2002-10-02 Thread DonPro
Hi, I would like some ideas on how to perform the following. Any input from the PHP gurus would be appreciated. I have a form where my customer feels out certain information. Part of this information is the company name, address, city and state/province of their customer. I have to assign a

[PHP] counting number of records in a MySQL table; how do I get the result?

2002-10-02 Thread DonPro
Hi, I need to do either an insert or update into a MySQL table. Insert if there are 0 records or update if one record exist: This is my code snippet: if (mysql_query(SELECT COUNT(*) FROM AuthNum) == 0) { mysql_query(INSERT into AuthNum (FirstNum, LastNum, NextNum) VALUES (1,2,3),$dblink);

[PHP] Works from the command line but NOT from PHP

2002-10-01 Thread DonPro
Does anyone have any experience with FULLTEXT indexed MySQL tables? I've created such a key. When I type the following from the MySQL command line, I get the desired records returned, i.e., a subset of my entire table: SELECT HSCode, UOM, EDescript FROM HSCodes WHERE MATCH(EDescript) AGAINST

[PHP] checkbox objects returning false for isset() when submitted via a form.

2002-10-01 Thread DonPro
Hi, I have a form that submits to itself via: form name=hsform method=POST action=?=$_SERVER['PHP_SELF'] ? Within my form, I have some checkbox objects. If I check them and submit my form, isset(variable) returns true. However, if I do not check them and submit my form, isset(variable)

[PHP] Need help creating a mysql query in PHP

2002-09-30 Thread DonPro
Hi, I have a form containing a text field where the user types in a sentence. I need to search a mysql table, specifically a text field and display a list of found results. My criteria selections are: 1) return a record if all the words are contained in a record 2) return a record if all any

[PHP] How long do sessions last

2002-09-23 Thread DonPro
Hi, If I use sessions (not session cookies) by issuing a session_start() and then log in to an area of my web site, I understand that the session will last until either I close my browser or issue a session_unset() followed by a session_destroy(). If I log in and walk away from my PC, will the

[PHP] How do I keep a page from caching in I.E

2002-09-04 Thread DonPro
Hi, Using I.E. 5.5. I can't seem to keep a page from caching. When I click on the browser BACK button, I get the cached page so I have to click on Refresh to get the actual page content. I've placed the following at the top of the HTML file but it doesn't seem to do anything. Any help would be

[PHP] How do I get milliseconds?

2002-09-04 Thread DonPro
Using the following code, date(His) I get the hours, minutes and seconds. Is there a way to extend this so that I get the milliseconds too? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Question about sessions: how to force expiry

2002-08-22 Thread DonPro
Hi, I am using a session variable to create an area where customers can access certain pages via login/password. If they successfully login, I create a session variable and initialize it with their logon username. I also have a logout button which unregisters the session variables and issues a

[PHP] Forms and sessions

2002-08-15 Thread DonPro
Hi, How can I keep values in a from when using session_start() and later, the Back Button on my Browser after posting via POST? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Why don't my PHP variables get posted?

2002-08-15 Thread DonPro
Hi, I have a small form with checkbox objects. Below is the code: form method=POST action=doc_complete.html input type=checkbox name=b13 value=checked font size=3Export Declaration (B13)/fontbr input type=checkbox name=\cinvoice\ value=checked font size=3Commercial Invoice/font p align=left

[PHP] Can I perform a PHP script from a form but stay on the same page afterwards?

2002-08-09 Thread DonPro
Hi, I have a form where the user can change a value ion a text box and then click on a button which will update a table in a MySQL database. I assume that the only way to do this is to have the button POST the form value to my script which updates the MySQL table. However, once updated

[PHP] Form asking to refresh when I hit the back button

2002-08-01 Thread DonPro
Not sure if this is a PHP question but I've traced the problem to a PHP statement. I have a form that when submitted, displays a PDF document in the browser (using a PDF library). When I click on the back button, it should redisplay my form but instead, displays a warning that data has expired

[PHP] Can several different sessions coexist?

2002-08-01 Thread DonPro
Hi, I'd like to register a session and create several session variables. In another part of my site, I'd like to register another session again creating session variables. After a bit, I'd like to destroy this second registered session keeping the first intact. Thus far, whenever I issue:

[PHP] How can I get my session variable to pass to another page?

2002-07-26 Thread DonPro
Hi, I have a form that calls a PHP script which sets a session variable and redirects to anopther URL as such: session_start(); $HTTP_SESSION_VARS['userid'] = someidnumber; Header('Location: ' . 'http://www.mydomain.com/welcome.html'); On welcome.html, I have the following code: script

[PHP] Using PHP with MySQL - Can I supress MySQL errors?

2002-07-23 Thread DonPro
Hi, I'm using PHP to connect and perform queries with a MySQL database. I've noticed that it there is an error performing certain commands like 'mysql_connect()', I'll get a warning message in the browser. I'd like to suppress these messages as I am storing the error, mysql_error(), in an

[PHP] Can a form submit to two PHP form processers in succession?

2002-07-22 Thread DonPro
Hi, I'm not sure how to do this but I have a form which I wish to do the following. When the uses clicks the submit button, I wish to perform a check where I look for a value in a MySQL database. If found, I need to return an error page telling the user that the value already exists. I

[PHP] Confused about the list() function

2002-07-17 Thread DonPro
Hi, I have the following situation. I have an array of colors that I would like to print out. My first course of action would be to convert the array to a string so that I can parse it. My command would be: $color_list = explode(,, $color); Now that I have a string of colors delimited by