[PHP] Imap functions (imap_fetchstructure)

2004-03-26 Thread Daryl Meese
Ok, here it goes When I began developing in PHP a call to the imap_fetchstructure function on an email with attachments created a 'parts' array that was indexed numerically. Meaning I could say: if (count($message-parts) 0) for ($x = 0; $x count($message_parts); $x++) // do some

[PHP] re: an if statement

2004-03-26 Thread David Robley
[EMAIL PROTECTED] (Andy B) wrote in news:[EMAIL PROTECTED]: although that'll generally work, why not use if(empty($name) || empty($comments)) { dosomething(); } -- ---John Holmes... because for some odd reason on any of the versions of php i am writing for (4.0.6-4.1.3) it always

[PHP] Re: Local sysadmin DFW needed

2004-03-26 Thread David Robley
[EMAIL PROTECTED] (Frank Tudor) wrote in news:[EMAIL PROTECTED]: Hi folks, Sorry for the inturruption. I'm looking for a part time sysadmin in the DFW area. Just out of curiosity, where the hell is DFW? I gather it's not near Ridgehaven. -- PHP General Mailing List

[PHP] Re: PHP and GD

2004-03-26 Thread Patrik Fomin
After uploading the picture, so the program should first upload the picture, then open it, cut it in like 6 pieces and save all the pieces and remove the original uploaded file. regards patrick - Edwin - [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Hi, On Thu, 25 Mar 2004

RE: [PHP] Header Redirect POST

2004-03-26 Thread Ford, Mike [LSS]
On 25 March 2004 20:17, Chris Thomas wrote: I am not sure if this was designed like this, or if its just something im doing wrong. Im posting some data to a processing page, where i handle it then use Header('Location: other.php') to direct me to another page. The problem that im running

RE: [PHP] $_POST not working with str_replace

2004-03-26 Thread Ford, Mike [LSS]
On 24 March 2004 22:28, PHP Email List wrote: And ? #2 are there any settings within PHP that would limit my ability to visually display the contents of a POST variable on a .rtf document as opposed to being displayed on the browser? Yes -- take a look at the variables_order directive

[PHP] curl problem

2004-03-26 Thread Hodicska Gergely
Hi! I try to compile PHP 4.3.4 with curl support on Debian Woody 3.0. I downloaded the http://curl.haxx.se/download/curl-7.11.1.tar.bz2, and compiled it. ./configure was succesfull. But make generate an error: usr/src/install/php-4.3.4/ext/curl/curl.c: In function `curl_free_post':

[PHP] Re: question about M. Lemos's HTML forms generation and validation

2004-03-26 Thread dr. zoidberg
Manuel Lemos wrote: Hello, On 03/25/2004 10:19 PM, Dr. Zoidberg wrote: I'm creating registration service with this great form script for creating forms within Smarty. Question is how can I validate 'username' against allready registered users in MySQL so that someone cannot register him self

Re: [PHP] Re: Local sysadmin DFW needed

2004-03-26 Thread Roger Spears
David Robley wrote: [EMAIL PROTECTED] (Frank Tudor) wrote in news:[EMAIL PROTECTED]: Hi folks, Sorry for the inturruption. I'm looking for a part time sysadmin in the DFW area. Just out of curiosity, where the hell is DFW? I gather it's not near Ridgehaven. I'm going to guess DFW is just

RE: [PHP] Re: Ereg problems

2004-03-26 Thread Jeff McKeon
-Original Message- From: Curt Zirzow [mailto:[EMAIL PROTECTED] Sent: Thursday, March 25, 2004 6:55 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Ereg problems On Thu, 25 Mar 2004 18:31:02 -0500, Jeff McKeon [EMAIL PROTECTED] wrote: Having some problems with ereg()

[PHP] problem with archives zip

2004-03-26 Thread German
Hello, the problem that I have is that I need to decompress archives zip under php. that for this one is used libreria that is due to install it in the servant but the problem which I have is that I cannot install in that servant. If somebody knows a way different to decompress a file please

[PHP] saving as .XLS

2004-03-26 Thread jon
Hi, I am looking for some information about the way of saving the result of my php script (html table) with .XLS (ms excel) format. Do you know where could I get info about this? Thanks, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] sprintf troubles

2004-03-26 Thread Chris Thomas
Hey, Im trying to use sprintf to format a number and left pad it with spaces, but it doesnt want to add the spaces I can pad it with anyother char using sprintf(%'_8.2f, $val) which will left-pad the number with underscores Has anyone had any luck padding with spaces?? or is there a better way

RE: [PHP] saving as .XLS

2004-03-26 Thread Daniel Purdy
[snip] Hi, I am looking for some information about the way of saving the result of my php script (html table) with .XLS (ms excel) format. Do you know where could I get info about this? Thanks, [/snip] Take a look at the write excel class, there is a php version of it, however most of the

[PHP] Connection with MS-SQL

2004-03-26 Thread edwardspl
Dear All, Except for --with-mssql options ( configure command ) , which any other options ( configure commands ) must be compiled with php also, then the php will be good for working with MS-SQL ? BTW, --with-mssql is better than --with-sybase ? Thank for your help ! Edward. -- PHP General

[PHP] Can't to insert data ( via variable ) into MS-SQL

2004-03-26 Thread edwardspl
Dear All, There is a sample that can't to insert any data ( via variable ) in MS-SQL : insert.php: form action=save.php method=post table border=0 align=center input type=text size=20 name=name maxlength=8 value=? echo $GBName ?br Jobinput type=text size=16 name=jobbr Subjectinput type=text

[PHP] check for special characters...

2004-03-26 Thread Chris Mach
How would I check if a variable has special characters in it like [EMAIL PROTECTED] etc ? and give an error if it contains one of them.

[PHP] multi-dim array from text file

2004-03-26 Thread Larry Pisani
Hi, I need to do some text file manipulation of a text file from an html interface. I have a file with multiple lines where each line has 2 fields each (a mac address and an associated vlan). Here's an example of rht text file: /tmp/TEST: a1b2.c3d4.e5cc VLAN3

[PHP] Apache 2 w/ PHP database sessions

2004-03-26 Thread Christopher Ditty
I recently upgraded to apache 2.0 from 1.23.x on my server. Previously, I had sessions working using the database to store session information. I recently noticed that this is no longer working as it did. The sessions are still working, however, the session information is not being transfered via

Re: [PHP] Apache 2 w/ PHP database sessions

2004-03-26 Thread Chris Shiflett
--- Christopher Ditty [EMAIL PROTECTED] wrote: I recently upgraded to apache 2.0 from 1.23.x on my server. 1.3.x you mean? :-) The sessions are still working, however, the session information is not being transfered via the url. [snip] session.use_trans_sid = 0 There's your answer. Hope

Re: [PHP] check for special characters...

2004-03-26 Thread John W. Holmes
Chris Mach wrote: How would I check if a variable has special characters in it like [EMAIL PROTECTED] etc ? and give an error if it contains one of them. if(preg_match('/[^a-z0-9]/i',$value)) { echo special characters present!; } -- ---John Holmes... Amazon Wishlist:

[PHP] Re: saving as .XLS

2004-03-26 Thread Justin Patrin
Jon wrote: Hi, I am looking for some information about the way of saving the result of my php script (html table) with .XLS (ms excel) format. Do you know where could I get info about this? Thanks, http://pear.php.net/package/Spreadsheet_Excel_Writer -- paperCrane Justin Patrin -- PHP General

php-general Digest 26 Mar 2004 17:09:53 -0000 Issue 2669

2004-03-26 Thread php-general-digest-help
php-general Digest 26 Mar 2004 17:09:53 - Issue 2669 Topics (messages 181542 through 181565): Re: Methods for creating HTML with PHP 181542 by: electroteque Imap functions (imap_fetchstructure) 181543 by: Daryl Meese Re: an if statement 181544 by: David Robley Re:

[PHP] Access Database

2004-03-26 Thread Maxi Yedid
Hello I need data from a Microsoft Access database; however my hosting does not allow ODBC connections with php; so I was wondering if there is a way to import the access database to Mysql by a process in the server (like for example someone uploads the database thru a form, and after the

Re: [PHP] Apache 2 w/ PHP database sessions

2004-03-26 Thread Christopher Ditty
Thanks Chris. I just compared the trans_sid on the dev box and it is set to 1. I'll make that change and report in. Many thanks. Owe you another beer if that was it. ;) Chris Chris Shiflett [EMAIL PROTECTED] 03/26/04 10:41AM --- Christopher Ditty [EMAIL PROTECTED] wrote: I recently

[PHP] script problem with authorization

2004-03-26 Thread Chip Wiegand
I am trying to get a script to work that will protect individual files, not just a directory. The script I am using is this - ? if($auth == yes) { $file = downloads/2004_February_PB_File1.pdf; $len = filesize($file); header(Cache-Control: no-store, no-cache, must-revalidate); // HTTP/1.1

[PHP] Re: Can't to insert data ( via variable ) into MS-SQL

2004-03-26 Thread Chris Thomas
Do you have register_globals on? If not ayou have to get the POST information manually. ie.. $job = $_POST['job'] Also are you sure that you are connecting to the database successfully? add: or die('could not connect') to the end of your mssql_pconnect and mssql_select_db statements. So your

[PHP] write a custom file wrapper or use error_log

2004-03-26 Thread Andy B
is it better overall to write a custom file wrapper (write my own log functions) or use the error_log/syslog that php already gives??

[PHP] Re: Can't to insert data ( via variable ) into MS-SQL

2004-03-26 Thread Rob Adams
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] $str = INSERT INTO staff (name,job,subject) 1 2 3 VALUES('$name','$job','$date','$subject',); 1 2 - 3 -- Rob --

[PHP] isset() and !=NULL

2004-03-26 Thread Marcjon Louwersheimer
Is there an easier way to do isset($variable) AND $variable != NULL ? I use this alot in my if statements, and I was wondering if there's an easier way to do it, maybe with a single function? Oh and another question... how does if ($variable) work? When does it evaluate true? -- Marcjon --

[PHP] performance with looping and count()ing

2004-03-26 Thread Chris W. Parker
hi. ok, so i've always been under the impression that count()ing during the expression of a loop was much inefficient when compared to count()ing just before the loop expression. GOOD: ?php $the_array_cnt = count($the_array); for($i = 0; $i $the_array_cnt; $i++) { ... } ? BAD:

Re: [PHP] isset() and !=NULL

2004-03-26 Thread Rasmus Lerdorf
if(!empty($variable)) On Fri, 26 Mar 2004, Marcjon Louwersheimer wrote: Is there an easier way to do isset($variable) AND $variable != NULL ? I use this alot in my if statements, and I was wondering if there's an easier way to do it, maybe with a single function? Oh and another question...

[PHP] mysql_fetch_array

2004-03-26 Thread Chris Mach
I have this query to select the date from my table... SELECT DATE_FORMAT(date1, '%W %M %Y') FROM table How do I know what name mysql_fetch_array assigned to the date_format ?

Re: [PHP] mysql_fetch_array

2004-03-26 Thread Adam Voigt
It would be position 0 in the array, or in your query after the date format function you could put AS blah and then it would come out as blah. On Fri, 2004-03-26 at 13:50, Chris Mach wrote: I have this query to select the date from my table... SELECT DATE_FORMAT(date1, '%W %M %Y') FROM table

Re: [PHP] mysql_fetch_array

2004-03-26 Thread John W. Holmes
From: Adam Voigt [EMAIL PROTECTED] On Fri, 2004-03-26 at 13:50, Chris Mach wrote: I have this query to select the date from my table... SELECT DATE_FORMAT(date1, '%W %M %Y') FROM table How do I know what name mysql_fetch_array assigned to the date_format ? It would be position 0 in

Re: [PHP] isset() and !=NULL

2004-03-26 Thread Robert Cummings
On Fri, 2004-03-26 at 13:46, Rasmus Lerdorf wrote: if(!empty($variable)) This will return false positives for cases where the variable has not been set to null but HAS been set to the empty string or to a 0? This isn't really the same as the OP requested. However, isset() also returns false for

Re: [PHP] isset() and !=NULL

2004-03-26 Thread David Risner
On Fri, 26 Mar 2004 10:40:43 -0800, Marcjon Louwersheimer [EMAIL PROTECTED] said: Is there an easier way to do isset($variable) AND $variable != NULL ? I use this alot in my if statements, and I was wondering if there's an easier way to do it, maybe with a single function? Oh and another

[PHP] Re: saving as .XLS

2004-03-26 Thread Gerben
just save as an csv-file (comma seperated values) Jon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I am looking for some information about the way of saving the result of my php script (html table) with .XLS (ms excel) format. Do you know where could I get info about this?

RE: [PHP] Methods for creating HTML with PHP

2004-03-26 Thread PHP Email List
-Original Message- From: Jason Giangrande [mailto:[EMAIL PROTECTED] I'm looking for an easy way to write all my HTML using PHP. Jason, Sorry this is late and not even sure if you found your answer to this question that you ask, however I think in the end it's going to be up to you on

Re: [PHP] write a custom file wrapper or use error_log

2004-03-26 Thread John W. Holmes
From: Andy B [EMAIL PROTECTED] is it better overall to write a custom file wrapper (write my own log functions) or use the error_log/syslog that php already gives?? Define better. Which one suits your needs? Obviously, if error_log does what you need it to do, then use it. Why write

[PHP] simple, but missing something?

2004-03-26 Thread Jas
Not sure why I am not able to get this to work, but to make my stuff easier to configure for different environments I am trying to re-code some of my stuff to work with options from an array. $cfg['hostname'] = www.server.com; // Server domain or ip address $cfg['username'] = username;

[PHP] php_mssql

2004-03-26 Thread Edward Peloke
Hello, I am attempting to connect to a mssql db so I have the php_mssql.dll in my extensions folder and have uncommented it from my php.ini file yet still get an error that it can't find the module when apache starts. Does I need to add it somewhere in my apache conf file? Thanks, Eddie

RE: [PHP] simple, but missing something?

2004-03-26 Thread Jay Blanchard
[snip] $cfg['hostname'] = www.server.com; // Server domain or ip address $cfg['username'] = username;// Database user name $cfg['password'] = password;// Database password $cfg['bugemail'] = [EMAIL PROTECTED]; The do something like this: function database_connection() {

Re: [PHP] simple, but missing something?

2004-03-26 Thread Jas
Jay Blanchard wrote: [snip] $cfg['hostname'] = www.server.com; // Server domain or ip address $cfg['username'] = username;// Database user name $cfg['password'] = password;// Database password $cfg['bugemail'] = [EMAIL PROTECTED]; The do something like this: function

[PHP] Re: simple, but missing something?

2004-03-26 Thread Geir Pedersen - Activio AS
$cfg['hostname'] = www.server.com; // Server domain or ip address $cfg['username'] = username;// Database user name $cfg['password'] = password;// Database password $cfg['bugemail'] = [EMAIL PROTECTED]; Then do something like this: function database_connection() {

[PHP] Re: simple, but missing something?

2004-03-26 Thread Jas
So something like this? function database_connection() { global = $cfg['hostname'],$cfg['username'],$cfg['password']; @mysql_connect($cfg['hostname'],$cfg['username'],$cfg['password']); @mysql_select_database($cfg['database']); } Or could I do an entire array like so... function

RE: [PHP] Re: simple, but missing something?

2004-03-26 Thread Chris W. Parker
Geir Pedersen - Activio AS mailto:[EMAIL PROTECTED] on Friday, March 26, 2004 2:05 PM said: 1) You have to declare $cfg as a global variable in your data_connection() function. PHP differs from C with respect to how you access global variables from within functions. Read about

[PHP] Sessions and PHP

2004-03-26 Thread Patrik Fomin
Let me rephrase it, i got a login page, once logged in you you got the session $_SESSION['in'] = true; i want to be able to count the number of people that are logged in atm, so when they logout with either logout button or close the window, i want to then decrese the number. In asp, you just

[PHP] Re: simple, but missing something?

2004-03-26 Thread Rob Adams
Jas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] So something like this? function database_connection() { global = $cfg['hostname'],$cfg['username'],$cfg['password']; global = $cfg; From that page that was linked in the previous post: ?php $a = 1; $b = 2; function Sum() {

[PHP] PHP and GD

2004-03-26 Thread Patrik Fomin
After uploading the picture, so the program should first upload the picture, then open it, cut it in like 6 pieces and save all the pieces and remove the original uploaded file. regards patrick - Edwin - [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Hi, On Thu, 25 Mar 2004

Re: [PHP] Sessions and PHP

2004-03-26 Thread John W. Holmes
Patrik Fomin wrote: Let me rephrase it, i got a login page, once logged in you you got the session $_SESSION['in'] = true; i want to be able to count the number of people that are logged in atm, so when they logout with either logout button or close the window, i want to then decrese the number.

[PHP] RE:[PHP] write a custom file wrapper or use error_log

2004-03-26 Thread Andy B
Define better. 1. check the file size. if it is larger than a certain size then rename the current log and roll over to a new filename 2. if something fatal happens during normal program use shutdown the program/website section and display a page that says unavaliable or something of that sort...

Re: [PHP] Sessions and PHP

2004-03-26 Thread Patrik Fomin
how do i determine if a session has been destroyed/created ? patrick John W. Holmes [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Patrik Fomin wrote: Let me rephrase it, i got a login page, once logged in you you got the session $_SESSION['in'] = true; i want to be

Re: [PHP] Re: Can't to insert data ( via variable ) into MS-SQL

2004-03-26 Thread edwardspl
Rob Adams wrote: [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] $str = INSERT INTO staff (name,job,subject) 1 2 3 VALUES('$name','$job','$date','$subject',); 1 2 -

Re: [PHP] mysql_fetch_array

2004-03-26 Thread Tom Rogers
Hi, Saturday, March 27, 2004, 4:50:27 AM, you wrote: CM I have this query to select the date from my table... CM SELECT DATE_FORMAT(date1, '%W %M %Y') FROM table CM How do I know what name mysql_fetch_array assigned to the date_format ? SELECT DATE_FORMAT(date1, '%W %M %Y') AS date_formatted

Re: [PHP] performance with looping and count()ing

2004-03-26 Thread Tom Rogers
Hi, Saturday, March 27, 2004, 4:45:38 AM, you wrote: CWP hi. CWP ok, so i've always been under the impression that count()ing during the CWP expression of a loop was much inefficient when compared to count()ing CWP just before the loop expression. CWP GOOD: CWP ?php CWP $the_array_cnt =

[PHP] knowing which file is including

2004-03-26 Thread Ryan A
Hi, A bit of a weird problem, am just curious if this can be done... I have a file called config.inc.php which has a require_once in it for lang_a.php and lang_b.php config.inc.php is being included by a.php and b.php presently config.inc.php is doing a require_once for both lang_a and lang_b,

Re: [PHP] sprintf troubles

2004-03-26 Thread Tom Rogers
Hi, Saturday, March 27, 2004, 1:31:33 AM, you wrote: CT Hey, CT Im trying to use sprintf to format a number and left pad it with spaces, but CT it doesnt want to add the spaces CT I can pad it with anyother char using sprintf(%'_8.2f, $val) which will CT left-pad the number with underscores

[PHP] PHP 4.3.5 Released

2004-03-26 Thread Ilia Alshanetsky
PHP Development Team is proud to announce the release of PHP 4.3.5. This is primarily a bug fix release, without any new features or additions.PHP 4.3.5 is by far the most stable release of PHP to date and it is recommended that all users upgrade to this release whenever possible. The major fixes

Re: [PHP] PHP 4.3.5 Released

2004-03-26 Thread The Doctor
On Fri, Mar 26, 2004 at 08:55:52AM -0500, Ilia Alshanetsky wrote: PHP Development Team is proud to announce the release of PHP 4.3.5. This is primarily a bug fix release, without any new features or additions.PHP 4.3.5 is by far the most stable release of PHP to date and it is recommended that

[PHP] Re: PHP 4.3.5 Released

2004-03-26 Thread Thomas Seifert
Hi folks, thanks for another great php-release. Are there any important changes since the last RC? TIA, thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Ereg problems

2004-03-26 Thread Curt Zirzow
* Thus wrote Jeff McKeon ([EMAIL PROTECTED]): preg_match_all('($-?[0-9]+\.[0-9]+)', $string, $found); print_r($found); That produces: Array ( [0] = Array ( ) ) 0 , Array Sorry that should be: preg_match_all('/(\$-?[0-9]+\.[0-9]+)/', $string, $found); Curt -- I used to

[PHP] Re: knowing which file is including

2004-03-26 Thread David Robley
[EMAIL PROTECTED] (Ryan A) wrote in news:[EMAIL PROTECTED]: Hi, A bit of a weird problem, am just curious if this can be done... I have a file called config.inc.php which has a require_once in it for lang_a.php and lang_b.php config.inc.php is being included by a.php and b.php

[PHP] REsource Identifier( PHP_MYSQL)

2004-03-26 Thread Gimic
Hey y'all, I'm having problems trying to get the MySql_Query() function to return the resource ID when using a $string as the argument to pass to it. It returns when I hard code the argument but not the string. Any ideas? here is what the function looks like: function GetVals() { $db =

[PHP] Re: REsource Identifier( PHP_MYSQL)

2004-03-26 Thread David Robley
[EMAIL PROTECTED] (Gimic) wrote in news:[EMAIL PROTECTED]: Hey y'all, I'm having problems trying to get the MySql_Query() function to return the resource ID when using a $string as the argument to pass to it. It returns when I hard code the argument but not the string. Any ideas? here is

Re: [PHP] REsource Identifier( PHP_MYSQL)

2004-03-26 Thread Burhan Khalid
Gimic wrote: Hey y'all, I'm having problems trying to get the MySql_Query() function to return the resource ID when using a $string as the argument to pass to it. It returns when I hard code the argument but not the string. Any ideas? here is what the function looks like: function GetVals() {

Re: [PHP] simple, but missing something?

2004-03-26 Thread Burhan Khalid
Jas wrote: Not sure why I am not able to get this to work, but to make my stuff easier to configure for different environments I am trying to re-code some of my stuff to work with options from an array. $cfg['hostname'] = www.server.com; // Server domain or ip address $cfg['username'] =

[PHP] Re: REsource Identifier( PHP_MYSQL)

2004-03-26 Thread Gimic
The entire script looks like this: ?php if ($_POST[Subject] != NULL) { echo results for . $_POST[Subject]; $subject = $_POST[Subject]; $qry = (select * from . $subject); $sqlQry = (string) $qry; GetVals(); } function GetVals() { $db = mysql_connect(localhost, root);