RE: [PHP] there has to be a better way...

2003-10-23 Thread Walter Torres
-Original Message- From: Colin Kettenacker [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2003 12:53 AM To: jsWalter; [EMAIL PROTECTED] Subject: Re: [PHP] there has to be a better way... Hi Walter, You may want to look into PEAR's config package. It does pretty much all

[PHP] problem in 2 dimensional Array

2003-10-23 Thread khuram noman
Dear Members i have 2 problems in 2 dimensional array 1. how to declare global 2 dimensional array in php 2. how to pass 2 dimensional array in function as an arrgument waiting for ur soon reply Khuram Noman __ Do you Yahoo!? The New Yahoo! Shopping - with

RE: [PHP] problem in 2 dimensional Array

2003-10-23 Thread Martin Towell
Dear Members i have 2 problems in 2 dimensional array 1. how to declare global 2 dimensional array in php 2. how to pass 2 dimensional array in function as an arrgument waiting for ur soon reply Khuram Noman 1. $myvar = array(); $myvar[0] = array(); $myvar[0][0] = myval;

[PHP] Exporting Data to Excel

2003-10-23 Thread Ben C.
I am using the code below to export my data into an excel file. The code is located in a password protected area which is checked against saved session variables. However when I put session_start(); the download errors out. Does any one have any suggestions? Please help. ? session_start();

Re: [PHP] Re: PHP3 files compatibilty with PHP4

2003-10-23 Thread Burhan Khalid
Tian, Simon (Contractor) (DSCP) wrote: Hi all, I have a website written in php3 , but the isp just did a upgrade of PHP 4.3.3. it was a php 4 and it worked fine with my php3 progarm Read this http://www.php.net/reserved.variables -- Burhan Khalid phplist[at]meidomus[dot]com

Re: [PHP] Exporting Data to Excel

2003-10-23 Thread Marek Kilimajer
Damn exploder, use session_cache_limiter('private_no_expire'); before session_start() Ben C. wrote: I am using the code below to export my data into an excel file. The code is located in a password protected area which is checked against saved session variables. However when I put

[PHP] Opening Files via PHP

2003-10-23 Thread Stephen Tiano
Anyone familiar with PHP AND MYSQL WEB DEVELOPMENT, 2nd edition, by Luke Welling and Laura Thomson? And perhaps working on the Macintosh-UNIX side of things via OS X.whatever? If so, I ask for your indulgence and assistance. Following advice given me a coupla weeks ago--on this very list, I

Re: [PHP] setlocale Q

2003-10-23 Thread Christophe Chisogne
jsWalter wrote: setlocale(LC_TIME, de_GR); gives me 'October'? setlocale(LC_TIME, de); gives me 'October'? setlocale(LC_TIME, d); gives me 'oktober'? I'm on a Win 2k box. Because locales are really system dependant, as you could clearly see using gettext translations. (I did fight with it

Re: [PHP] Opening Files via PHP

2003-10-23 Thread Marek Kilimajer
Stephen Tiano wrote: And the code the book uses to write to this file is: // open file for appending $fp = fopen($DOCUMENT_ROOT/../orders/orders.txt, 'a'); This is what is in the book, you need to change the path to suit your setup. Or move the file, it seems moving ./orders/ directory

[PHP] Re: Simple array question

2003-10-23 Thread pete M
$array = array( 'fruit1' = 'apple', 'fruit2' = 'orange', 'fruit3' = 'grape', 'fruit4' = 'apple', 'fruit5' = 'apple'); // this cycle echoes all associative array // key where value equals apple while ($fruit_name = current($array)) { if ($fruit_name == 'apple') {

[PHP] Create Popup Window using PHP

2003-10-23 Thread irinchiang
Hi all, I have a Delete function here whereby when I click on Delete it will actually have some kinda popup window to prompt user whether they are sure to delete the following data.So, anyone have any idea how to create this popup window using PHP?? Appreciate very much for any

[PHP] Re: Create Popup Window using PHP

2003-10-23 Thread pete M
need a little bit of Javascript Here's a cut and paste from one of my projects script language=JavaScript function confirmEdit() { var f = document.frmEdit; if(confirm('Are you sure you want to save the changes. This operation CANNOT BE REVERSED')) { f.submit(); } } /script and then a

Re: [PHP] Create Popup Window using PHP

2003-10-23 Thread Brad Bonkoski
Impossible, PHP is server side, look into javascript of some other client side language to create pop-up windows. - Original Message - From: [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Thursday, October 23, 2003 3:00 AM Subject: [PHP] Create Popup Window using PHP Hi all,

Re: [PHP] Newbie - Can't get sessions to work

2003-10-23 Thread Shaun Campbell
I've tried the suggested code changes and no difference :( I just don't think sessions are working for me at all. I said in my original posting that the second page was creating an empty file in my session.save_path directory as though the second page has no reference to the first one. In my

Re: [PHP] Newbie - Can't get sessions to work

2003-10-23 Thread Marek Kilimajer
If you want to check for cookie add echo cookie = .$_COOKIE[session_name()]; to the second page. To check if transparent sessions are enabled look into phpinfo() output - session.use_trans_sid Shaun Campbell wrote: I've tried the suggested code changes and no difference :( I just don't think

Re: [PHP] Create Popup Window using PHP

2003-10-23 Thread Marek Kilimajer
I use something like: a href=delete.php?id=123 onclick=return myconfirm('Do you ... ?',this.href) script function myconfirm(str, href) { if(!confirm(str)) { return false; } else { document.location.href=href + confirm=1; } } /script In delete.php check for

Re: [PHP] Screwing up my results...please help

2003-10-23 Thread Marek Kilimajer
Wait, I think I got you. You want company with the best offer listed first toghether with the company's other offers - and these offers should be ignored in the next comparation. So now should be listed another company with second best offer - without using the offers from the first company.

Re: [PHP] Newbie - Can't get sessions to work

2003-10-23 Thread Shaun Campbell
That's it. Setting use_trans_sid to 1 got sessions working. I'm now getting PHPSESSID=7398a182a64f0b2603e369812e130727 appended to the end of the page2.php URL and only one session file in my temp directory. One final question. In the php.ini file it says that Use of trans sid may risk your

[PHP] Is it worth $49? - codeSECURE 1.0 released - - Protecting PHP code

2003-10-23 Thread aka MacGuru
Hi, I have read announcement about CodeSecure. I am sorry to say, but I am not sure this product is worth $49. The problem is not $49, which is very small amount indeed, but the features available with other Open Source software. 1) If someone need just PHP obfuscator - here is proven GPL

Re: [PHP] PHP scripts are not executed

2003-10-23 Thread Bas
You can now try it again, on http://212.120.120.108:3/forumBT/index.php. I have installed as module now... Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] favicon.ico is not the problem. The problem is The specified network name is no longer available. Check out

[PHP] Problem with SELECT statement and reference material wanted..

2003-10-23 Thread P M
Hi all! I'm having trouble retrieving a selection of my database contents. The problem is when I search for entries that exactly match a search criteria, see below: (database connection established successfully here..) $result = mysql_query(select * from complete where authorf = '$authorf');

Re: [PHP] Problem with SELECT statement and reference material wanted..

2003-10-23 Thread Binay
remove ' '(single quotes) around variable name.. cheers binay - Original Message - From: P M [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 23, 2003 5:27 PM Subject: [PHP] Problem with SELECT statement and reference material wanted.. Hi all! I'm having trouble

Re: [PHP] Problem with SELECT statement and reference material wanted..

2003-10-23 Thread Marek Kilimajer
$authorf is empty, I guess register_globals is off, you should use select * from complete where authorf = '$_POST[authorf]' or select * from complete where authorf = '$_GET[authorf]' depending if you use get or post variable. P M wrote: Hi all! I'm having trouble retrieving a selection of my

Re: [PHP] Problem with SELECT statement and reference material wanted..

2003-10-23 Thread Binay
Sorry for my previous post .. no need of removing ' '(single quotes) echo you query and then run it on mysql and see u getting the desired result.. Binay - Original Message - From: P M [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 23, 2003 5:27 PM Subject: [PHP] Problem

Re: [PHP] Problem with SELECT statement and reference material wanted..

2003-10-23 Thread Eugene Lee
On Thu, Oct 23, 2003 at 01:57:38PM +0200, P M wrote: : : I'm having trouble retrieving a selection of my database contents. The : problem is when I search for entries that exactly match a search : criteria, see below: : : (database connection established successfully here..) : : $result =

Re: [PHP] fsock sending bad request

2003-10-23 Thread daniel
$req = field=1; its the data i need to post Hi, Thursday, October 23, 2003, 7:58:19 AM, you wrote: deo Hi there the following code doesnt seem to work, i am getting a bad request deo sent back from the server, what could be the problem of something so deo simple ? deo $header .= POST

Re: note: [PHP] ob_get_length() returns uncompressed buffer length (after ob_start('ob_gzhandler'))

2003-10-23 Thread Marek Kilimajer
One option I can think of would be to handle the compression in your code: ?php ob_start(); print aa; // 30 a's print bb; // 30 b's print aa; // 30 a's $output=gzcompress(ob_get_contents());

[PHP] Page Reload with after POST request

2003-10-23 Thread Alexander Mueller
I am doing most of my data transfers by POST requests and found it to be problematic when I want to browse the history with the browser's navigation buttons. Although it works without problems in Opera (I didnt try it with Netscape) it leads to a Warning: Page has Expired message in IE. I

Re: note: [PHP] ob_get_length() returns uncompressed buffer length (after ob_start('ob_gzhandler'))

2003-10-23 Thread Marek Kilimajer
I forgot the obvious: echo $output; after header(...) Marek Kilimajer wrote: One option I can think of would be to handle the compression in your code: ?php ob_start(); print aa; // 30 a's print bb; // 30 b's print

Re: [PHP] Page Reload with after POST request

2003-10-23 Thread Marek Kilimajer
After handling the post request and taking the necessery actions (update db...), redirect the browser using header('Location: ..'); Alexander Mueller wrote: I am doing most of my data transfers by POST requests and found it to be problematic when I want to browse the history with the

Re: [PHP] Email Body

2003-10-23 Thread Marek Kilimajer
I use str_pad() for this, it can handle strings that vary in length much better then tabs: tab way: echo long long name\t1000\t200.00\n; echo name\t10\t2.00\n; output: long long name 1000200.00 name10 2.00 str_pad way: echo str_pad('long long name', 20,' '). str_pad('1000',

[PHP] Attachments with Mail()

2003-10-23 Thread Don Mc Nair
Hi Can anyone tell me how to add a file as an attachment to an email sent with something like the following ? $headers = From: .$fromaddress.\r\n; $headers .= Reply-To: $fromaddress\r\n; mail($toaddress, $subject, $mailcontent, $headers); Thanks Don --- Outgoing mail is certified Virus

Re: [PHP] is_uploaded_file() security

2003-10-23 Thread Raditha Dissanayake
I don't think so. Test this, but I think you can just type /etc/passwd into the file name box (instead of using the browse button) and have that value submitted in the form. May be dependent upon the browser on how it's handled, though. This does not work with multipart/form-data you need

Re: [PHP] fsock sending bad request

2003-10-23 Thread Raditha Dissanayake
hi, deo $header.= $req\n; Tom is right but as usual IIS is wrong and expects it :-( so better to use it anyway. deo $fp = fsockopen(host, 80, $errno, $errstr, $timeout = 30); errno and errstr will not be set unless you pass it by reference. deo $header.= Host: host\r\n; Host header is

Re: [PHP] is_uploaded_file() security

2003-10-23 Thread Alexander Mueller
Raditha Dissanayake wrote: This does not work with multipart/form-data you need www-urlencoded (or just don't set an enctype attribute in your form) What would happen in this case? The given filename would be passed to the script?! Alexander -- PINO - The free Chatsystem! Available at

[PHP] Re: Page Reload with after POST request

2003-10-23 Thread Alexander Mueller
Robert Sedlacek wrote: I don't know such a script, but my preferred way would be to make a 'header(Location: $site);' statement right after processing the POST-request and lead the user to the site where the changes can be seen. This also avoids duplicate db-entries and stuff... Robert

Re: [PHP] is_uploaded_file() security

2003-10-23 Thread Raditha Dissanayake
Hi, Multipart/form-data sends the entire file, if you don't use that enctype yes, just the file name is sent. best regards Alexander Mueller wrote: Raditha Dissanayake wrote: This does not work with multipart/form-data you need www-urlencoded (or just don't set an enctype attribute in your

Re: [PHP] is_uploaded_file() security

2003-10-23 Thread Marek Kilimajer
I tried: form action=phpinfo.php?_FILES[fake][tmp_name]=/etc/passwd method=post enctype=multipart/form-data Fake: input type=text name=_FILES[fake][tmp_name] value=/etc/passwdbr input type=file name=suborbr input type=submit /form $_FILES superglobal still wasn't poisoned. Alexander Mueller

Re: [PHP] Newbie - Can't get sessions to work

2003-10-23 Thread Curt Zirzow
* Thus wrote Shaun Campbell ([EMAIL PROTECTED]): That's it. Setting use_trans_sid to 1 got sessions working. I'm now getting PHPSESSID=7398a182a64f0b2603e369812e130727 appended to the end of the page2.php URL and only one session file in my temp directory. One final question. In the php.ini

Re: [PHP] is_uploaded_file() security

2003-10-23 Thread Alexander Mueller
Raditha Dissanayake wrote: Hi, Multipart/form-data sends the entire file, if you don't use that enctype yes, just the file name is sent. best regards I see, but then $_FILES is probably not set. So it wouldnt be necessary to use is_uploaded_file() if one solely uses $_FILES (but should

Re: [PHP] Attachments with Mail()

2003-10-23 Thread Evan Nemerson
PEAR has a class which may be helpful. http://pear.php.net/package/Mail_Mime On Thursday 23 October 2003 04:13 am, Don Mc Nair wrote: Hi Can anyone tell me how to add a file as an attachment to an email sent with something like the following ? $headers = From: .$fromaddress.\r\n;

[PHP] Array Hell

2003-10-23 Thread Richard Cook
Hi All, Im having a headache trying to sort this out... I have my array which is created each time a user adds an item to my basket, this all works fine. The problem im having is that when the user adds the item to the cart they have the option of selecting '0' as the quantity which in effect

Re: [PHP] Opening Files via PHP

2003-10-23 Thread Curt Zirzow
* Thus wrote Stephen Tiano ([EMAIL PROTECTED]): A file to read and write to has been provided on the book's CD. I've copied this file, named oders.txt, in a folder (directory) on my hard drive, the path which runs like so: [hard drive

[PHP] array of java-objects

2003-10-23 Thread Helke Schröder
Hi, I'm trying to use our java-code in php. But strange things happens Maybe I did a simple mistake.. $MyInf=new Java(myUtil.myInfo); This is inside of a loop through 3 items: $MyAttributes=array(); $MyAttributes=$MyInf-MyAttrReader($v, ,, $item); $c=null; $c=count($MyAttributes); so far

Re: [PHP] is_uploaded_file() security

2003-10-23 Thread Raditha Dissanayake
hi, I think marek's recent message has answered this already, but i also believe that even in the older system where you have form fields like input type=file name=userfile result in global variables like userfile_name etc the global variables don't get populated unless you send the correct

[PHP] Re: link question

2003-10-23 Thread Richard Cook
nextpage.php?recordset=?php echo $recordset[id];? then use the value of recordset to link back to that information on the next page. Is that what you mean? Regards R Davy Campano [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have a php page that makes a table from data in a

[PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
Can somebody explain me why is this happening? $value = 12.3; $number = intval($value); echo Number: $number, Value: $valuebr; // echoes: Number: 12, Value: 12.3 if ($number != $value) { echo Bad; } else { echo Good; // echoes Good!! } The previous should be echoing Bad. (I

Re: [PHP] Array Hell

2003-10-23 Thread Curt Zirzow
* Thus wrote Richard Cook ([EMAIL PROTECTED]): Hi All, Im having a headache trying to sort this out... If the customer inputs the value 0 into quantity the array looks like this: $array[0][0] = 22 $array[0][1] = 0 The question is who can i filter the array removing any values

Re[2]: [PHP] fsock sending bad request

2003-10-23 Thread Tom Rogers
Hi, Thursday, October 23, 2003, 10:32:18 PM, you wrote: deo $req = field=1; deo its the data i need to post But you are sending it twice, and there has to be a cr/lf between the header and the data I think. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] problem with intval and !=

2003-10-23 Thread Curt Zirzow
* Thus wrote Cesar Cordovez ([EMAIL PROTECTED]): Can somebody explain me why is this happening? $value = 12.3; $number = intval($value); echo Number: $number, Value: $valuebr; // echoes: Number: 12, Value: 12.3 I'm guessing you wondering why the .3 is removed. Thats because 12.3 isn't

Re: [PHP] problem with intval and !=

2003-10-23 Thread Marek Kilimajer
What versio of php? I get Bad (which is good ;) Cesar Cordovez wrote: Can somebody explain me why is this happening? $value = 12.3; $number = intval($value); echo Number: $number, Value: $valuebr; // echoes: Number: 12, Value: 12.3 if ($number != $value) { echo Bad; } else { echo Good;

Re: [PHP] array of java-objects

2003-10-23 Thread Raditha Dissanayake
Hi, please post your full code Helke Schröder wrote: Hi, I'm trying to use our java-code in php. But strange things happens Maybe I did a simple mistake.. $MyInf=new Java(myUtil.myInfo); This is inside of a loop through 3 items: $MyAttributes=array(); $MyAttributes=$MyInf-MyAttrReader($v,

[PHP] in_array()/finding page Problem

2003-10-23 Thread Ben G. McCullough
I think I have a flaw of logic in trying to find the correct page in a mutli-page sql result. Goal - find the correct page [results.php?page=x] when linking from another page. Current method - loop through a pagination function looking for the matching $id in an array [simplified for

Re: [PHP] fsock sending bad request

2003-10-23 Thread Curt Zirzow
* Thus wrote [EMAIL PROTECTED] ([EMAIL PROTECTED]): Hi there the following code doesnt seem to work, i am getting a bad request sent back from the server, what could be the problem of something so simple ? $header .= POST test.php HTTP/1.0\r\n; $header.= Host: host\r\n; $header .=

Re: [PHP] in_array()/finding page Problem

2003-10-23 Thread Marek Kilimajer
You solution is quite resource expensive. I would do: [find $maxpages] SELECT COUNT(*)/12 FROM table WHERE id = $real_id; list($maxpages) = fetch_row() In result.php use ORDER BY id Ben G. McCullough wrote: I think I have a flaw of logic in trying to find the correct page in a mutli-page sql

Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
Curt: My fault! You are right, but thats not what I want. $value comes from a form filled by a user. I want $value to be an integer. Not a float. So if the user types 12.3 the system has to send an error msg. Therefore the procedure. By-the-way, Im using PHP 4.3.3 (on windows XP

Re: [PHP] problem with intval and !=

2003-10-23 Thread Curt Zirzow
* Thus wrote Cesar Cordovez ([EMAIL PROTECTED]): Curt: My fault! You are right, but thats not what I want. $value comes from a form filled by a user. I want $value to be an integer. Not a float. So if the user types 12.3 the system has to send an error msg. Yeah, after reading merek's

Re: [PHP] there has to be a better way...

2003-10-23 Thread Raquel Rice
On Thu, 23 Oct 2003 01:04:55 -0500 Walter Torres [EMAIL PROTECTED] wrote: -Original Message- From: Colin Kettenacker [mailto:[EMAIL PROTECTED] Hi Walter, You may want to look into PEAR's config package. It does pretty much all you have listed here and a lot more. I just

[PHP] sql query/displaying results question

2003-10-23 Thread Adam Williams
I have a php page I am writing with an SQL query. I am going to query the database for a couple of fields. One of the fields I am querying is the title oh the document someone is searching for. The title will be used at the top of the html page and will say: you are searching for document

Re: [PHP] array of java-objects

2003-10-23 Thread Helke Schröder
Hi, thanks for the replay the var_dump on the array of java-objects looks interesting: the first, which is ok: array(8) { [0]= object(java)(1) { [0]= int(3) } [1]= object(java)(1) [0]= int(4) } [2]= object(java)(1) { [0]= int(5) } [3]= object(java)(1) { [0]= int(6) } [4]= object(java)(1) {

Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
The other purpose of this procedure is if the user types 12asdasd into $value, $number will be assigned 12 so $value and $number are not the same, meaning $value is not a number. Which is correct, but the procedure is not working correctly in PHP when it should. (It works in c, c++, fortran

Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
This is getting weird by the minute. I changed the script: if ($number != $value) { echo Bad; } else { echo Good; // echoes Good!! } to: ($number != $value) ($number !== $value) ($number === $value) and I get the Good stuff... At this point, I think I have to change the

Re: [PHP] problem with intval and !=

2003-10-23 Thread Andrea Pinnisi
why don't you use this?? http://it.php.net/manual/it/function.is-integer.php Cesar Cordovez ha scritto: This is getting weird by the minute. I changed the script: if ($number != $value) { echo Bad; } else { echo Good; // echoes Good!! } to: ($number != $value) ($number !==

Re: [PHP] German Date - GMDATE Function

2003-10-23 Thread Don Read
On 22-Oct-2003 Steve Vernon wrote: Hello, When I use the gmdate function, I get the English date, e.g. October. Is it possible to get the date in German or another language? I really need the server setting up so that it can handle different languages. $locale='de_CH.ISO_8859-1'; //

Re: [PHP] in_array()/finding page Problem

2003-10-23 Thread Marek Kilimajer
Ben G. McCullough wrote: I agree - my solution is VERY resource intensive, but I think I may have over simplified my question. Each item is listed by two categories, $medium and $period. Users can get to the item via a 'browse' of either category. I want to user to be able to get back to the

Re: [PHP] problem with intval and !=

2003-10-23 Thread Marek Kilimajer
This should be reported as a bug. I tried few searches and I got Warning: mysql_fetch_array(): 9 is not a valid MySQL result resource in /local/Web/sites/php-bugs-web/search.php on line 182 on bugs.php.net Cesar Cordovez wrote: This is getting weird by the minute. I changed the script: if

Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
Because is_integer(12thisisnotanumber) retuns true. Andrea Pinnisi wrote: why don't you use this?? http://it.php.net/manual/it/function.is-integer.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] sql query/displaying results question

2003-10-23 Thread Jason Wong
On Thursday 23 October 2003 22:06, Adam Williams wrote: So I will have 1 query that needs to print the document $title at the top of the page and then when it starts showing results. I won't know what the document title is until the database is queried (because they are doing a query for

Re: [PHP] problem with intval and !=

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 11:41, Cesar Cordovez wrote: Because is_integer(12thisisnotanumber) retuns true. Not for me it doesn't. Returns false. Prolly because it's a string. Even the following returns false for me: is_integer(12) Cheers, Rob. --

Re: [PHP] problem with intval and !=

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 11:21, Cesar Cordovez wrote: At this point, I think I have to change the procedure. This is not good. Any sugestions on how to now if the user types an integer number in a field? Here's a really simple way: if( ereg( '^[[:space:]]*[[:digit:]]+[[:space:]]*',

Re: [PHP] problem with intval and !=

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 11:51, Robert Cummings wrote: On Thu, 2003-10-23 at 11:21, Cesar Cordovez wrote: At this point, I think I have to change the procedure. This is not good. Any sugestions on how to now if the user types an integer number in a field? Here's a really simple

Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
Sorry, typo, this is what I meant, !is_integer(12thisisnotanumber) retuns true. but also, is_integer(12) return false. therefore, is_integer(12) return true. So, how can I check if what ever the user writes is an integer or not, knowing that he will write it in a string field. Any how, I

Re: [PHP] Email Body

2003-10-23 Thread Don Read
On 22-Oct-2003 micro brew wrote: I am sending an email using mail() and it works fine. But the formatting of the body of the email is wrong. I want to format part of it in columns sort of like this: Name Quantity Price Can this be done neatly without using an html email?

RE: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Pablo Gosse
Hi Tom. make sure you have ENCTYPE=multipart/form-data in the form tag Thanks for the tip, but that's not the problem. My code is below, and as you can see there is nothing in the code that would be causing this. It has to be something in the server, and while there have been a few posts to

Re: [PHP] problem with intval and !=

2003-10-23 Thread Curt Zirzow
* Thus wrote Marek Kilimajer ([EMAIL PROTECTED]): This should be reported as a bug. I tried few searches and I got Warning: mysql_fetch_array(): 9 is not a valid MySQL result resource in /local/Web/sites/php-bugs-web/search.php on line 182 The search seems to work now, what did you

Re: [PHP] problem with intval and !=

2003-10-23 Thread Greg Beaver
Hello all, http://www.php.net/is_numeric is the function you are looking for. No need for fancy regexps. Regards, Greg -- phpDocumentor http://www.phpdoc.org Cesar Cordovez wrote: Sorry, typo, this is what I meant, !is_integer(12thisisnotanumber) retuns true. but also, is_integer(12) return

Re: [PHP] problem with intval and !=

2003-10-23 Thread Marek Kilimajer
Status: All Return only bugs in categories: Scripting Engine Problem Return bugs with operating system: windows But it is ok now. Curt Zirzow wrote: * Thus wrote Marek Kilimajer ([EMAIL PROTECTED]): This should be reported as a bug. I tried few searches and I got Warning: mysql_fetch_array():

Re: [PHP] problem with intval and !=

2003-10-23 Thread Jordan S. Jones
Cesar, You can take a look into is_numeric () (http://www.php.net/is_numeric). It will tell you whether the value is a number or a numeric string, but it will also return true if the value is a float. However, at that point you know your working with the right type of variable. Jordan S.

Re: [PHP] problem with intval and !=

2003-10-23 Thread John W. Holmes
Greg Beaver wrote: http://www.php.net/is_numeric is the function you are looking for. No need for fancy regexps. The OP is looking for an integer, but is_numeric() will return true for float values and also for numbers in scientific notation. So 12.3 and 12E3 will be TRUE. The original

Re: [PHP] problem with intval and !=

2003-10-23 Thread Marek Kilimajer
These are all workarounds around the real problem. If php gets it wrong fix php. Robert Sedlacek wrote: On Thu, 23 Oct 2003 11:59:44 -0400, Cesar Cordovez wrote: So, how can I check if what ever the user writes is an integer or not, knowing that he will write it in a string field. Idea:

Re: [PHP] problem with intval and !=

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 12:28, Greg Beaver wrote: Hello all, http://www.php.net/is_numeric is the function you are looking for. No need for fancy regexps. Sorry, that doesn't cut it. He want's integers not floats, and I'm also sure he doesn't want exponential notation to pass either.

Re: [PHP] problem with intval and !=

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 12:43, Marek Kilimajer wrote: These are all workarounds around the real problem. If php gets it wrong fix php. Could you explain how PHP has it wrong? Rob. -- .. | InterJinn Application Framework -

Re: [PHP] problem with intval and !=

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 12:41, John W. Holmes wrote: Greg Beaver wrote: http://www.php.net/is_numeric is the function you are looking for. No need for fancy regexps. The OP is looking for an integer, but is_numeric() will return true for float values and also for numbers in

[PHP] Array in SQL-table

2003-10-23 Thread Reidar
I want to store an ARRAY in a SQL-table but don't know how to define it in the table. The PHP-stuff is working OK but the DB-thing isn't. Anyone tried this? Hopefully it is Reidar Solberg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Array in SQL-table

2003-10-23 Thread Jordan S. Jones
If the field isn't required to be searchable, you could just serialize the array and shove that into a VARCHAR column.. Then unserialize the return value for that column. Jordan S. Jones Reidar wrote: I want to store an ARRAY in a SQL-table but don't know how to define it in the table. The

Re: [PHP] problem with intval and !=

2003-10-23 Thread Marek Kilimajer
This echoes out Bad on my LAMP server as it should, but Good on Cesar's windows server: $value = 12.3; $number = intval($value); echo Number: $number, Value: $valuebr; // echoes: Number: 12, Value: 12.3 if ($number != $value) { echo Bad; } else { echo Good; // echoes Good!! }

Re: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Raditha Dissanayake
Hi Pablo, Could you explain what exactly you mean by transferred in ASCII mode? do you find that cr/lf combinations are translated (there by corrupting your image) or some other corruption takes place? Have you opened the files with a hex editor to see the contents? I am sorry if you have

Re: [PHP] problem with intval and !=

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 13:01, Marek Kilimajer wrote: This echoes out Bad on my LAMP server as it should, but Good on Cesar's windows server: Aaaah how true. I wasn't following this much earlier so I don't know if he is using the most up to date version, in which case it may already be fixed.

Re: [PHP] fsock sending bad request

2003-10-23 Thread Raditha Dissanayake
Hi hey Curt, I missed that one. Daniel have you looked at RFC 2616? Curt Zirzow wrote: * Thus wrote [EMAIL PROTECTED] ([EMAIL PROTECTED]): Hi there the following code doesnt seem to work, i am getting a bad request sent back from the server, what could be the problem of something so simple ?

RE: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Pablo Gosse
Hi Raditha. Thanks very much for your reply. I've not been having much luck with this one. This is how the images should appear: http://web.unbc.ca/~gossep/sample_images/1.gif http://web.unbc.ca/~gossep/sample_images/nav-02.jpg And here is how they appear after being uploaded:

Re: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Raditha Dissanayake
Hi Pablo Pablo Gosse wrote: Hi Raditha. Thanks very much for your reply. I've not been having much luck with this one. welcome This is how the images should appear: http://web.unbc.ca/~gossep/sample_images/1.gif http://web.unbc.ca/~gossep/sample_images/nav-02.jpg And here is how they appear

Re: [PHP] problem with intval [CONCLUSION]

2003-10-23 Thread Cesar Cordovez
Everybody: This problem solved. It is not PHP's fault, It is mine. When I fixed some problems that I thought where non intrusive in this problem, everything started working as a charm. Here is the finished function, it is part of a class called xValidate. function integer($msg, $prompt,

RE: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Ricardo C. Fernandez de C.
Something wrong is with your uploader program... look at this: Content-Disposition: form-data; name=upload; filename=C:\Documents and Settin gs\gossep\Desktop\ewimages\1.gif And if you look closer to the data in the file, you will see it has 2 GIF or something (GIF8 twice)... so yep, you have

RE: [PHP] Images being uploaded in ASCII format

2003-10-23 Thread Pablo Gosse
Thanks Raditha. At least now I know I've been looking in the wrong place! I'll look forward to the perl script to see if it sheds any more light on this situation. I'm currently running Windoze, but when I boot to Linux later I'll try Khexedit to see what I can come up with. Cheers, Pablo

Re: [PHP] problem with intval and !=

2003-10-23 Thread Marek Kilimajer
I got the error again: http://bugs.php.net/search.php?search_for=boolean=0limit=10order_by=direction=ASCcmd=displaystatus=Allbug_type%5B%5D=Scripting+Engine+problemphp_os=windowsphpver=assign=author_email=bug_age=0 Curt Zirzow wrote: * Thus wrote Marek Kilimajer ([EMAIL PROTECTED]): This should

Re: [PHP] problem with intval and !=

2003-10-23 Thread Curt Zirzow
* Thus wrote Marek Kilimajer ([EMAIL PROTECTED]): I got the error again: http://bugs.php.net/search.php?search_for=boolean=0limit=10order_by=direction=ASCcmd=displaystatus=Allbug_type%5B%5D=Scripting+Engine+problemphp_os=windowsphpver=assign=author_email=bug_age=0 That reminds me of the time

[PHP] get user attributes php/ldap/win2k active directory

2003-10-23 Thread Redmond Militante
hi all my first email to the list re: php/ldap/win2k AD garnered no responses. i've got most of the problem solved, however i can't get attributes from the ldap server. i have a login script that authenticates against our win2k active directory domain controller. i'm able to open a

[PHP] Avoiding blank lines in HTML when field is empty

2003-10-23 Thread Robb Kerr
I'm a PhP /MySQL newbie so please excuse the simple question. I'm returning results from a MySQL query on a webpage. My code includes... td valign=top ?php echo $row_rsVandyDivAddresses['First_Name']; ? ?php echo $row_rsVandyDivAddresses['Last_Name'];?, ?php echo

Re: [PHP] Avoiding blank lines in HTML when field is empty

2003-10-23 Thread Chris Shiflett
--- Robb Kerr [EMAIL PROTECTED] wrote: Here's the problem. Some of the fields are empty (for instance 'Address') and the way my code is configured a blank line appears in the returned data when the field is empty. How do I change this code to add a conditional that only echos the field

Re: [PHP] Avoiding blank lines in HTML when field is empty

2003-10-23 Thread Jordan S. Jones
Robb, You pretty much have it.. Here is what you will most likely want: ?php if (!empty($row_rsVandyDivAddresses['Address']) strlen (trim ($row_rsVandyDivAddresses['Address'])) 0) { echo $row_rsVandyDivAddresses['Address']) . 'br'; } ? Feel free to format as you wish. Jordan S. Jones

  1   2   >