Re: [PHP] Exporting Data to Excel
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 session_start
[PHP] Opening Files via PHP
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 be
Re: [PHP] setlocale Q
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 wi
Re: [PHP] Opening Files via PHP
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
$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
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 fo
[PHP] Re: Create Popup Window using PHP
need a little bit of "Javascript" Here's a cut and paste from one of my projects
function confirmEdit()
{
var f = document.frmEdit;
if(confirm('Are you sure you want to save the changes. This operation CANNOT BE REVERSED'))
{
f.submit();
}
Re: [PHP] Create Popup Window using PHP
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 a
Re: [PHP] Newbie - Can't get sessions to work
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 sav
Re: [PHP] Newbie - Can't get sessions to work
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 thi
Re: [PHP] Create Popup Window using PHP
I use something like:
function myconfirm(str, href) { if(!confirm(str)) { return false; } else { document.location.href=href + "&confirm=1"; } }
In delete.php check for $_GET['confirm'], if set, delete, if not,
Re: [PHP] Screwing up my results...please help
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. Is
Re: [PHP] Newbie - Can't get sessions to work
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 use
[PHP] Is it worth $49? - codeSECURE 1.0 released - - Protecting PHP code
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 prod
Re: [PHP] PHP scripts are not executed
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
[PHP] Problem with SELECT statement and reference material wanted..
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..
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 ret
Re: [PHP] Problem with SELECT statement and reference material wanted..
$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..
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] Pr
Re: [PHP] Problem with SELECT statement and reference material wanted..
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 = mysq
Re: [PHP] fsock sending bad request
$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> $heade
Re: note: [PHP] ob_get_length() returns uncompressed buffer length (after ob_start('ob_gzhandler'))
One option I can think of would be to handle the compression in your code: print "aa"; // 30 a's print "bb"; // 30 b's print "aa"; // 30 a's $output=gzcompress(ob_get_contents()); $ob_get_length=length($output); h
[PHP] Page Reload with after POST request
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 unders
Re: note: [PHP] ob_get_length() returns uncompressed buffer length (after ob_start('ob_gzhandler'))
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: print "aa"; // 30 a's print "bb"; // 30 b's print "aa"; //
Re: [PHP] Page Reload with after POST request
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 browser
Re: [PHP] Email Body
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()
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 certifie
Re: [PHP] is_uploaded_file() security
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 www
Re: [PHP] fsock sending bad request
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
Re: [PHP] is_uploaded_file() security
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 htt
[PHP] Re: Page Reload with after POST request
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... >
Re: [PHP] is_uploaded_file() security
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 f
Re: [PHP] is_uploaded_file() security
I tried: Fake: $_FILES superglobal still wasn't poisoned. 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 form) What would happen in this case? The given filename would
Re: [PHP] Newbie - Can't get sessions to work
* 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
Re: [PHP] is_uploaded_file() security
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 shou
Re: [PHP] Attachments with Mail()
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.">\
[PHP] Array Hell
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
* 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 name]/Library/WebServer/Documents/orders/or
[PHP] array of java-objects
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); s
Re: [PHP] is_uploaded_file() security
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 result in global variables like userfile_name etc the global variables don't get populated unless you send the correct enctype. best regards Alexand
[PHP] Re: link question
nextpage.php?recordset= 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 mySQL database. What I
[PHP] problem with intval and !=
Can somebody explain me why is this happening? $value = "12.3"; $number = intval($value); echo "Number: $number, Value: $value"; // echoes: Number: 12, Value: 12.3 if ($number != $value) { echo "Bad"; } else { echo "Good"; // echoes Good!! } The previous should be echoing "Bad
Re: [PHP] Array Hell
* 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 a
Re[2]: [PHP] fsock sending bad request
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 unsubscrib
Re: [PHP] problem with intval and !=
* Thus wrote Cesar Cordovez ([EMAIL PROTECTED]): > Can somebody explain me why is this happening? > > $value = "12.3"; > $number = intval($value); > > echo "Number: $number, Value: $value"; > // echoes: Number: 12, Value: 12.3 I'm guessing you wondering why the .3 is removed. Thats because 12.3
Re: [PHP] problem with intval and !=
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: $value"; // echoes: Number: 12, Value: 12.3 if ($number != $value) { echo "Bad"; } else { echo "Go
Re: [PHP] array of java-objects
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
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 illustrat
Re: [PHP] fsock sending bad request
* 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
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 !=
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 profesion
Re: [PHP] problem with intval and !=
* 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 me
Re: [PHP] there has to be a better way...
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
[PHP] sql query/displaying results question
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 n
Re: [PHP] array of java-objects
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(
Re: [PHP] problem with intval and !=
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++, fortr
Re: [PHP] problem with intval and !=
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 !=
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 !== $v
Re: [PHP] German Date - GMDATE Function
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
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 !=
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 !=
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
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 !=
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 !=
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 !=
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 real
Re: [PHP] problem with intval and !=
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,
Re: [PHP] Email Body
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 e
RE: [PHP] Images being uploaded in ASCII format
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 !=
* 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 !=
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") ret
Re: [PHP] problem with intval and !=
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 !=
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. Jone
Re: [PHP] problem with intval and !=
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 $n
Re: [PHP] problem with intval and !=
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: if(
Re: [PHP] problem with intval and !=
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. C
Re: [PHP] problem with intval and !=
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 - http://ww
Re: [PHP] problem with intval and !=
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
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
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 PHP
Re: [PHP] problem with intval and !=
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: $value"; // echoes: Number: 12, Value: 12.3 if ($number != $value) { echo "Bad"; } else { echo "Good"; // echoes Good!!
Re: [PHP] Images being uploaded in ASCII format
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 ment
Re: [PHP] problem with intval and !=
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 fixe
Re: [PHP] fsock sending bad request
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 ? $h
RE: [PHP] Images being uploaded in ASCII format
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: http://web.unbc.c
Re: [PHP] Images being uploaded in ASCII format
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 af
Re: [PHP] problem with intval [CONCLUSION]
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, $val
RE: [PHP] Images being uploaded in ASCII format
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 ha
RE: [PHP] Images being uploaded in ASCII format
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 !=
I got the error again: http://bugs.php.net/search.php?search_for=&boolean=0&limit=10&order_by=&direction=ASC&cmd=display&status=All&bug_type%5B%5D=Scripting+Engine+problem&php_os=windows&phpver=&assign=&author_email=&bug_age=0 Curt Zirzow wrote: * Thus wrote Marek Kilimajer ([EMAIL PROTECTED]): T
Re: [PHP] problem with intval and !=
* Thus wrote Marek Kilimajer ([EMAIL PROTECTED]): > I got the error again: > http://bugs.php.net/search.php?search_for=&boolean=0&limit=10&order_by=&direction=ASC&cmd=display&status=All&bug_type%5B%5D=Scripting+Engine+problem&php_os=windows&phpver=&assign=&author_email=&bug_age=0 That reminds me o
[PHP] get user attributes php/ldap/win2k active directory
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 connection
[PHP] Avoiding blank lines in HTML when field is empty
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... , , Phone: Email: Here's the problem. Some of the fields are empty (for instance 'Address') an
Re: [PHP] Avoiding blank lines in HTML when field is empty
--- 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 co
Re: [PHP] Avoiding blank lines in HTML when field is empty
Robb, You pretty much have it.. Here is what you will most likely want: if (!empty($row_rsVandyDivAddresses['Address']) && strlen (trim ($row_rsVandyDivAddresses['Address'])) > 0) { echo $row_rsVandyDivAddresses['Address']) . ''; } ?> Feel free to format as you wish. Jordan S. Jones Robb
Re: [PHP] Avoiding blank lines in HTML when field is empty
On Thu, Oct 23, 2003 at 12:46:29PM -0500, Robb Kerr wrote: : : 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... : : :, : : : : , : : Phone: : :
Re: [PHP] Age from birthdate?
Yes, but think about all the presents, hangovers, etc. they miss. On Thursday 23 Oct 2003 2:12 am, Mike Migurski wrote: > >> >I do wonder what the rule for those born on Feb 29'th. Do they > >> >celebrate they're birthday before or after it on non leap years? > >> > >>Neither. They celebrat
[PHP] PHP not remembering sessions
Hi All, I have a problem with PHP not remembering sessions. for example: in page1.php: in page2.php what I see above is only data for loopCount. I am not able to see the "Please help" on page2 I noticed that 2 cookies were created one for each session s
[PHP] Re: get user attributes php/ldap/win2k active directory
I've been getting entries from an Active Directory server through LDAP for a while now. Here's some example code: //connect and bind //$ds should be the handle returned from ldap_connect //Search LDAP for all users // note, your OU entries may differ $sr = ldap_search($ds, 'OU=Employees,OU=Active
Re: [PHP] PHP not remembering sessions
Use $_SESSION['var'] instead of $_SESSION["var"] --- "Golawala, Moiz M (IndSys, GE Interlogix)" <[EMAIL PROTECTED]> wrote: > Hi All, > > I have a problem with PHP not remembering sessions. > for example: > > in page1.php: > > $_SESSION["var"] = "Please help"; ?> > >maxleng