Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread ma...@behnke.biz
> Ninad hat am 4. April 2013 um 13:11 geschrieben: > > > yes yes I tried that also... > > I have restarted apache as well as my entire system also... > again I have cleared all the cache of my browser & restarted it also. > but I am getting same result Could you take a look at the output of

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread ma...@behnke.biz
> Ashley Sheridan hat am 4. April 2013 um 13:02 > geschrieben: > > I've noticed the first line looks a little odd. It might be valid, just > probably not the way I've ever done it. For my own sanity, could you try > changing it to: > > if (isset($_POST['lastname']) && isset($_POST['lastname']))

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Jim Giner
On 4/4/2013 7:02 AM, Ashley Sheridan wrote: I've noticed the first line looks a little odd. It might be valid, just probably not the way I've ever done it. For my own sanity, could you try changing it to: if (isset($_POST['lastname']) && isset($_POST['lastname'])) Thanks, Ash http://www.ash

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Carsten Jensen
On 04/04/2013 01:19 PM, Ashley Sheridan wrote: On Thu, 2013-04-04 at 16:41 +0530, Ninad wrote: Have you tried a different browser? Just thinking of anything which might narrow down the location of the problem. Thanks, Ash http://www.ashleysheridan.co.uk does PHP work at all? what do you ge

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Ninad
yes I tried on Firefox 3.5 & firefox 19 & chrome. On 04/04/2013 04:49 PM, Ashley Sheridan wrote: On Thu, 2013-04-04 at 16:41 +0530, Ninad wrote: yes yes I tried that also... I have restarted apache as well as my entire system also... again I have cleared all the cache of my browser & restar

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Ashley Sheridan
On Thu, 2013-04-04 at 16:41 +0530, Ninad wrote: > yes yes I tried that also... > > I have restarted apache as well as my entire system also... > again I have cleared all the cache of my browser & restarted it also. > but I am getting same result > > Regards, > Ninad. > > On 04/04/2013 04:41

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Ninad
yes yes I tried that also... I have restarted apache as well as my entire system also... again I have cleared all the cache of my browser & restarted it also. but I am getting same result Regards, Ninad. On 04/04/2013 04:41 PM, Ashley Sheridan wrote: On Thu, 2013-04-04 at 16:33 +0530, Nina

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Sorin Badea
I've tried the same code on a instance with fedora 17 and php 5.4.13. It seems to work fine. Can you provide us a link with the url to your page ? On 04/04/2013 01:59 PM, Ninad wrote: yes you are right On 04/04/2013 04:23 PM, Sorin Badea wrote: So you have a single php file with the cod

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Ashley Sheridan
On Thu, 2013-04-04 at 16:33 +0530, Ninad wrote: > I tried that already but same result ... no output... > > > On 04/04/2013 04:32 PM, Ashley Sheridan wrote: > > On Thu, 2013-04-04 at 13:53 +0300, Sorin Badea wrote: > >> So you have a single php file with the code from the first email and the > >

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Ninad
I tried that already but same result ... no output... On 04/04/2013 04:32 PM, Ashley Sheridan wrote: On Thu, 2013-04-04 at 13:53 +0300, Sorin Badea wrote: So you have a single php file with the code from the first email and the $_POST var is empty. Am I right ? On Thu, Apr 4, 2013 at 1:49 P

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Ninad
yes you are right On 04/04/2013 04:23 PM, Sorin Badea wrote: So you have a single php file with the code from the first email and the $_POST var is empty. Am I right ? On Thu, Apr 4, 2013 at 1:49 PM, Ninad > wrote: Hi, I am using httpd as a web

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Ashley Sheridan
On Thu, 2013-04-04 at 13:53 +0300, Sorin Badea wrote: > So you have a single php file with the code from the first email and the > $_POST var is empty. Am I right ? > > > On Thu, Apr 4, 2013 at 1:49 PM, Ninad wrote: > > > Hi, > > > > I am using httpd as a web server with default configuration

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Sorin Badea
So you have a single php file with the code from the first email and the $_POST var is empty. Am I right ? On Thu, Apr 4, 2013 at 1:49 PM, Ninad wrote: > Hi, > > I am using httpd as a web server with default configuration. > > Regards, > Ninad. > > > On 04/04/2013 04:11 PM, Sorin Badea wrote:

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Ninad
Hi, I tried using Firebug & got below response. Parametersapplication/x-www-form-urlencoded firstname |test| lastname|111| submit |Submit| Source |firstname=test&lastname=111&submit=Submit| Regards, Ninad On 04/04/2013 04:14 PM, Ashley Sheridan wrote:

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Ninad
Hi, I am using httpd as a web server with default configuration. Regards, Ninad. On 04/04/2013 04:11 PM, Sorin Badea wrote: What are you using on the server for http ? nginx or apache ? can you give us more details about your configuration (mods, configuration, htaccess ) ? On Thu, Apr 4,

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Sorin Badea
What are you using on the server for http ? nginx or apache ? can you give us more details about your configuration (mods, configuration, htaccess ) ? On Thu, Apr 4, 2013 at 1:25 PM, Ninad wrote: > Hello, > > Thanks for such a fast response. > > Yes I tried bellow things but result is same ---

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Ashley Sheridan
On Thu, 2013-04-04 at 15:55 +0530, Ninad wrote: > Hello, > > Thanks for such a fast response. > > Yes I tried bellow things but result is same --- no output.. > > $postdata = file_get_contents('php://input'); > var_dump($postdata); > var_dump($_POST); > > Regards, > Ninad. > > On 04/04/2013 0

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Ninad
Hello, Thanks for such a fast response. Yes I tried bellow things but result is same --- no output.. $postdata = file_get_contents('php://input'); var_dump($postdata); var_dump($_POST); Regards, Ninad. On 04/04/2013 03:50 PM, Sorin Badea wrote: Hi, Did you tried a print_r($_POST) or a var_du

Re: [PHP] Empty $_POST after submit.

2013-04-04 Thread Sorin Badea
Hi, Did you tried a print_r($_POST) or a var_dump ? On Thu, Apr 4, 2013 at 1:10 PM, Ninad wrote: > Dear all, > > I am having 2 servers. One is running fedora 10 with php 5.2.6-5 and > second one is running > fedora17 with php 5.4.13. > Below given code is working absolutely fine on fedora10 wit

[PHP] Empty $_POST after submit.

2013-04-04 Thread Ninad
Dear all, I am having 2 servers. One is running fedora 10 with php 5.2.6-5 and second one is running fedora17 with php 5.4.13. Below given code is working absolutely fine on fedora10 with php5.2 But the same code is not working on fedora17 with php 5.4.13. After submit I am getting $_POST var

Re: [PHP] empty() in email message

2010-12-22 Thread Ravi Gehlot
y > >> To: php-general@lists.php.net > >> Date: Monday, December 13, 2010, 7:47:49 PM > >> Subject: [PHP] empty() in email message > >> > >> I have an email message > >> > >> $msg = 'Name: $fname ' . ' $lname\n'

Re: [PHP] empty() in email message

2010-12-13 Thread Gary
""Daevid Vincent"" wrote in message news:7d7c84d94dd24035a620e68b5b937...@mascorp.com... >> - Original message - >> From: Gary >> To: php-general@lists.php.net >> Date: Monday, December 13, 2010, 7:47:49 PM >> Subject: [PHP] empt

Re: [PHP] empty() in email message

2010-12-13 Thread Gary
> > -- > With best regards from Ukraine, > Andre > Skype: Francophile > Twitter: http://twitter.com/m_elensule > Facebook: http://facebook.com/menelion > > - Original message - > From: Gary > To: php-general@lists.php.net > Date: Monday, December 13, 2010, 7:47

Re: [PHP] empty() in email message

2010-12-13 Thread Gary
"Paul M Foster" wrote in message news:20101213181124.gq21...@quillandmouse.com... > On Mon, Dec 13, 2010 at 12:47:49PM -0500, Gary wrote: > >> I have an email message >> >> $msg = 'Name: $fname ' . ' $lname\n' >> . "Phone: $phone\n" >> . "Email: $email\n" >> >> and it works fine, however in thi

Re: [PHP] empty() in email message

2010-12-13 Thread Gary
""Daniel P. Brown"" wrote in message news:aanlktikw+h1nvf6tcg5hgh-2xsubtuosvgkwaynb=...@mail.gmail.com... On Mon, Dec 13, 2010 at 12:47, Gary wrote: > I have an email message > > $msg = 'Name: $fname ' . ' $lname\n' > . "Phone: $phone\n" > . "Email: $email\n" > > and it works fine, however in t

Re: [PHP] empty() in email message

2010-12-13 Thread Gary
"Bastien Koert" wrote in message news:aanlktimimt6h+g+zg4a_78wls4bu09zzsa3jvdujj...@mail.gmail.com... On Mon, Dec 13, 2010 at 12:47 PM, Gary wrote: > I have an email message > > $msg = 'Name: $fname ' . ' $lname\n' > . "Phone: $phone\n" > . "Email: $email\n" > > and it works fine, however in th

RE: [PHP] empty() in email message

2010-12-13 Thread Daevid Vincent
> - Original message - > From: Gary > To: php-general@lists.php.net > Date: Monday, December 13, 2010, 7:47:49 PM > Subject: [PHP] empty() in email message > > I have an email message > > $msg = 'Name: $fname ' . ' $lname\n' > . &

Re: [PHP] empty() in email message

2010-12-13 Thread Andre Polykanine
k.com/menelion - Original message - From: Gary To: php-general@lists.php.net Date: Monday, December 13, 2010, 7:47:49 PM Subject: [PHP] empty() in email message I have an email message $msg = 'Name: $fname ' . ' $lname\n' . "Phone: $phone\n" . "Email: $ema

Re: [PHP] empty() in email message

2010-12-13 Thread Daniel P. Brown
On Mon, Dec 13, 2010 at 12:47, Gary wrote: > I have an email message > > $msg =  'Name: $fname ' . ' $lname\n' > . "Phone: $phone\n" > . "Email: $email\n" > > and it works fine, however in this message there are about 30 variables that > are being called...as such > > . "Order: beefschnitzel $beef

Re: [PHP] empty() in email message

2010-12-13 Thread Paul M Foster
On Mon, Dec 13, 2010 at 12:47:49PM -0500, Gary wrote: > I have an email message > > $msg = 'Name: $fname ' . ' $lname\n' > . "Phone: $phone\n" > . "Email: $email\n" > > and it works fine, however in this message there are about 30 variables that > are being called...as such > > . "Order: beefs

Re: [PHP] empty() in email message

2010-12-13 Thread a...@ashleysheridan.co.uk
to happen. Get the values from $_GET or $_POST and treat each one as malicious until you know its within the bounds of your application as a real value. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Gary" Date: Mon, Dec 13, 2010 17:47 Subject: [P

Re: [PHP] empty() in email message

2010-12-13 Thread Bastien Koert
On Mon, Dec 13, 2010 at 12:47 PM, Gary wrote: > I have an email message > > $msg =  'Name: $fname ' . ' $lname\n' > . "Phone: $phone\n" > . "Email: $email\n" > > and it works fine, however in this message there are about 30 variables that > are being called...as such > > . "Order: beefschnitzel $b

[PHP] empty() in email message

2010-12-13 Thread Gary
I have an email message $msg = 'Name: $fname ' . ' $lname\n' . "Phone: $phone\n" . "Email: $email\n" and it works fine, however in this message there are about 30 variables that are being called...as such . "Order: beefschnitzel $beefschnitzel\n" . "Order: beefstrips $beefstrips\n" . "Order: c

Re: [PHP] empty() and method return values

2010-06-07 Thread Tanel Tammik
"Peter Lind" wrote in message news:aanlktinmvaqv-hdgjlq_dwoquvojbbmbfrixnxvqk...@mail.gmail.com... On 7 June 2010 21:52, Ashley Sheridan wrote: > On Mon, 2010-06-07 at 22:40 +0300, Tanel Tammik wrote: > >> Hi, >> >> empty() cannot check the return value of the method or function. which >> woul

Re: [PHP] empty() and method return values

2010-06-07 Thread Peter Lind
On 7 June 2010 21:52, Ashley Sheridan wrote: > On Mon, 2010-06-07 at 22:40 +0300, Tanel Tammik wrote: > >> Hi, >> >> empty() cannot check the return value of the method or function. which would >> be the best workaround? >> >> empty($class->method())   // gets an error >> >> i could do >> >> $meth

Re: [PHP] empty() and method return values

2010-06-07 Thread Tanel Tammik
"Ashley Sheridan" wrote in message news:1275940320.2248.40.ca...@localhost... > On Mon, 2010-06-07 at 22:40 +0300, Tanel Tammik wrote: > >> Hi, >> >> empty() cannot check the return value of the method or function. which >> would >> be the best workaround? >> >> empty($class->method()) // get

Re: [PHP] empty() and method return values

2010-06-07 Thread Ashley Sheridan
On Mon, 2010-06-07 at 22:40 +0300, Tanel Tammik wrote: > Hi, > > empty() cannot check the return value of the method or function. which would > be the best workaround? > > empty($class->method()) // gets an error > > i could do > > $method_return_value = $class->method() and then run empty(

[PHP] empty() and method return values

2010-06-07 Thread Tanel Tammik
Hi, empty() cannot check the return value of the method or function. which would be the best workaround? empty($class->method()) // gets an error i could do $method_return_value = $class->method() and then run empty() on $method_return_value or is there an better option? i would like to do

Re: [PHP] Empty $_REQUEST

2009-01-27 Thread Robert Paulsen
On Tuesday 27 January 2009 2:25 pm, Alpár Török wrote: > php has an md5 function built in. so you can jsut do > > $hash = md5($passwd); Works like a champ. Thanks. Bob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Empty $_REQUEST

2009-01-27 Thread Jim Lucas
Robert Paulsen wrote: > On Tuesday 27 January 2009 12:16 pm, Daniel Brown wrote: >> On Tue, Jan 27, 2009 at 13:12, Robert Paulsen > wrote: >>> When I run the app I find that $_REQUEST is almost empty. it contains >>> PHPSESSID but none of the data submitted through an html form. >> Bring on t

Re: [PHP] Empty $_REQUEST

2009-01-27 Thread Alpár Török
2009/1/27 Robert Paulsen > On Tuesday 27 January 2009 2:13 pm, Alpár Török wrote: > > > why don't you just use phps md5() function ? you might mess up something > in > > that process of hashing that you use and you create another, probably > > useless trip to the db. > > > > I just don't know a

Re: [PHP] Empty $_REQUEST

2009-01-27 Thread Robert Paulsen
On Tuesday 27 January 2009 2:13 pm, Alpár Török wrote: > why don't you just use phps md5() function ? you might mess up something in > that process of hashing that you use and you create another, probably > useless trip to the db. > I just don't know any better! I'll look it up. Thanks, Bob -

Re: [PHP] Empty $_REQUEST

2009-01-27 Thread Alpár Török
2009/1/27 Robert Paulsen > On Tuesday 27 January 2009 12:16 pm, Daniel Brown wrote: > > On Tue, Jan 27, 2009 at 13:12, Robert Paulsen > wrote: > > > When I run the app I find that $_REQUEST is almost empty. it contains > > > PHPSESSID but none of the data submitted through an html form. > > > >

Re: [PHP] Empty $_REQUEST

2009-01-27 Thread Robert Paulsen
On Tuesday 27 January 2009 12:16 pm, Daniel Brown wrote: > On Tue, Jan 27, 2009 at 13:12, Robert Paulsen wrote: > > When I run the app I find that $_REQUEST is almost empty. it contains > > PHPSESSID but none of the data submitted through an html form. > > Bring on the code, Rob. Daniel, I

Re: [PHP] Empty $_REQUEST

2009-01-27 Thread Daniel Brown
On Tue, Jan 27, 2009 at 13:12, Robert Paulsen wrote: > > When I run the app I find that $_REQUEST is almost empty. it contains > PHPSESSID but none of the data submitted through an html form. Bring on the code, Rob. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/

[PHP] Empty $_REQUEST

2009-01-27 Thread Robert Paulsen
Hi, I have a apache2/php app written for php version 4 and have moved it to a system running php version 5: Old: PHP 4.3.10 New: PHP 5.2.6 with Suhosin-Patch 0.9.6.2 When I run the app I find that $_REQUEST is almost empty. it contains PHPSESSID but none of the data submitted through an

Re: [PHP] EMPTY??

2007-10-24 Thread Chen Lei
Can you show us the form tag of your php file(html code)? Dan Shirah 写道: doing a var_dump($_POST['comments']; returns string(0) "" So the value of $comments in $comments = $_POST['comments']; SHOULD be equal to 0 or "", right? In which case when I do my original: if (!empty($comments)) {

Re: [PHP] EMPTY??

2007-10-23 Thread tedd
I then submit my page and on the following page I put the posted value into two variables. $comments = strtoupper($_POST['comments']); $check_comments = $_POST['comments']; I made two variables for the same posted value because I believe empty() does not work with strtoupper in front of the

Re: [PHP] EMPTY??

2007-10-23 Thread Philip Thompson
On 10/23/07, Dan Shirah <[EMAIL PROTECTED]> wrote: O M G! I am a tard! my "Do Something" was a series of insert statements, > each of them having the or die ("Query failed: />".mssql_get_last_message()); at the end. My very last "or die" message > was OUTSIDE of the closing curly brace! And as

Re: [PHP] EMPTY??

2007-10-23 Thread Dan Shirah
Nathan, I do not have a hard coded string for "Changed database context to Database." It is simply the get_last_message function like below: if (!empty($check_comments)) { echo "Do Something"; } or die ("Query failed: ".mssql_get_last_message()); O M G! I am a tard! my "Do Something" was a se

Re: [PHP] EMPTY??

2007-10-23 Thread Nathan Nobbe
On 10/23/07, Dan Shirah <[EMAIL PROTECTED]> wrote: > > Correct, which is why in my original post I set two variables. > > $comments = strtoupper($_POST['comments']); //This is the value I want > saved > in my database. > $check_comments = $_POST['comments']; //This is the value I am using to > dete

Re: [PHP] EMPTY??

2007-10-23 Thread Nathan Hawks
Wow, OK... Can you get this same error reducing a copy of the the script down to just core PHP, and that scenario? If so, what version of PHP on what OS is giving you this error? I have seen PHP give some incredibly wonky errors and sometimes they had nothing at all to do with the part of the cod

Re: [PHP] EMPTY??

2007-10-23 Thread Nathan Nobbe
On 10/23/07, Dan Shirah <[EMAIL PROTECTED]> wrote: > > doing a var_dump($_POST['comments']; > > returns string(0) "" > > So the value of $comments in $comments = $_POST['comments']; SHOULD be > equal to 0 or "", right? > > In which case when I do my original: > > if (!empty($comments)) { > echo

Re: [PHP] EMPTY??

2007-10-23 Thread Dan Shirah
> > > > > "Does it look the same way if you view source?" > Yes. > > >

Re: [PHP] EMPTY??

2007-10-23 Thread Dan Shirah
Correct, which is why in my original post I set two variables. $comments = strtoupper($_POST['comments']); //This is the value I want saved in my database. $check_comments = $_POST['comments']; //This is the value I am using to determine if there were any comments entered. On 10/23/07, Nathan Ha

Re: [PHP] EMPTY??

2007-10-23 Thread David Giragosian
On 10/23/07, Dan Shirah <[EMAIL PROTECTED]> wrote: > > I did a simple test like this on my save page: > > $comments = $_POST['comments']; > echo "".$comments.""; > ?> > > And it returns > > So, that should show me that there are no place holders, no characters, > and no carriage r

Re: [PHP] EMPTY??

2007-10-23 Thread Dan Shirah
doing a var_dump($_POST['comments']; returns string(0) "" So the value of $comments in $comments = $_POST['comments']; SHOULD be equal to 0 or "", right? In which case when I do my original: if (!empty($comments)) { echo "Do Something"; } It SHOULD just bypass that and continue with my code

Re: [PHP] EMPTY??

2007-10-23 Thread Nathan Hawks
Note: empty() only checks variables as anything else will result in a parse error. In other words, the following will not work: empty(trim($name)). http://www.php.net/manual/en/function.empty.php On Tue, 2007-10-23 at 13:20 -0400, Dan Shirah wrote: > I am having some issues with empty(). >

Re: [PHP] EMPTY??

2007-10-23 Thread Nathan Nobbe
On 10/23/07, Dan Shirah <[EMAIL PROTECTED]> wrote: > > I made two variables for the same posted value because I believe empty() > does not work with strtoupper in front of the value. It only works with a > standalone variable, correct? no; strtoupper modifies its argument, that is all. empty eval

Re: [PHP] EMPTY??

2007-10-23 Thread Dan Shirah
I did a simple test like this on my save page: And it returns So, that should show me that there are no place holders, no characters, and no carriage returns for the value of $comments, correct? On 10/23/07, David Giragosian <[EMAIL PROTECTED]> wrote: > > On 10/23/07, Dan Shirah <[E

Re: [PHP] EMPTY??

2007-10-23 Thread David Giragosian
On 10/23/07, Dan Shirah <[EMAIL PROTECTED]> wrote: > > I am having some issues with empty(). > > On my page I have a text area: > > width="680"> > > Comments: > wrap="soft"> > > > > > I then submit my page and on the following page I put the posted value > into > two variables. > >

[PHP] EMPTY??

2007-10-23 Thread Dan Shirah
I am having some issues with empty(). On my page I have a text area: Comments: I then submit my page and on the following page I put the posted value into two variables. $comments = strtoupper($_POST['comments']); $check_comments = $_POST['comments']; I made two varia

Re: [PHP] Empty Array?

2007-10-06 Thread tedd
At 10:33 AM -0400 10/5/07, marek wrote: Even better: SQL injection? Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Empty Array?

2007-10-05 Thread mike
> At 7:43 AM -0400 10/5/07, Dan Shirah wrote: > >Ah, what a lovely case of the Friday morning brain farts! > > > >I have a query that selects some data from a table based on the current ID > >selected. > > > >If the query does not return any results, I want it to continue to another > >query that w

Re: [PHP] Empty Array?

2007-10-05 Thread tedd
At 7:43 AM -0400 10/5/07, Dan Shirah wrote: Ah, what a lovely case of the Friday morning brain farts! I have a query that selects some data from a table based on the current ID selected. If the query does not return any results, I want it to continue to another query that will insert a record i

Re: [PHP] Empty Array?

2007-10-05 Thread Jim Lucas
Dan Shirah wrote: Ah, what a lovely case of the Friday morning brain farts! I have a query that selects some data from a table based on the current ID selected. If the query does not return any results, I want it to continue to another query that will insert a record into the table. Below is w

Re: [PHP] Empty Array?

2007-10-05 Thread marek
I would advise against using intval if the sql data type is anything greater and/or equal to "int unsigned". PHP on 32 bit systems: intval can only handle values up to 2147483647. sql unsigned int can go up to |4294967295 and bigints even higher This could cause serious problems ... Marek

Re: [PHP] Empty Array?

2007-10-05 Thread marek
Even better: ".mssql_get_last_message()); } ?> Dan Shirah wrote: Okay, gotcha! I changed it to this and it works: ".mssql_get_last_message()); } ?> Thanks! :) On 10/5/07, Aleksandar Vojnovic <[EMAIL PROTECTED]> wrote: I think the $lock_result is just a resource #id you haven't fetche

Re: [PHP] Empty Array?

2007-10-05 Thread Aleksandar Vojnovic
$request_id = $_GET['id']; <--- I suppose this would be an int. True? If so then add: Aleksandar marek wrote: Even better: ".mssql_get_last_message()); } ?> Dan Shirah wrote: Okay, gotcha! I changed it to this and it works: $lock_result = mssql_query($lock_query) or die(mssql_get_la

Re: [PHP] Empty Array?

2007-10-05 Thread M. Sokolewicz
I'll just put my comments inline for you... Dan Shirah wrote: Okay, gotcha! I changed it to this and it works: You can't trust this info. $lock_query = "SELECT id, locked_by_user FROM locked_payments WHERE id = '$request_id'"; WARNING :: SQL INJECTION :: WARNING $lock_result = mssql_quer

Re: [PHP] Empty Array?

2007-10-05 Thread Dan Shirah
Okay, gotcha! I changed it to this and it works: ".mssql_get_last_message()); } ?> Thanks! :) On 10/5/07, Aleksandar Vojnovic <[EMAIL PROTECTED]> wrote: > > I think the $lock_result is just a resource #id you haven't fetched any > data yet. True? > > Aleksander > > Dan Shirah wrote: > > Ah, wh

Re: [PHP] Empty Array?

2007-10-05 Thread Aleksandar Vojnovic
I think the $lock_result is just a resource #id you haven't fetched any data yet. True? Aleksander Dan Shirah wrote: Ah, what a lovely case of the Friday morning brain farts! I have a query that selects some data from a table based on the current ID selected. If the query does not return any

[PHP] Empty Array?

2007-10-05 Thread Dan Shirah
Ah, what a lovely case of the Friday morning brain farts! I have a query that selects some data from a table based on the current ID selected. If the query does not return any results, I want it to continue to another query that will insert a record into the table. Below is what I have...but it

Re: [PHP] Empty super globals

2007-08-07 Thread Richard Lynch
On Tue, August 7, 2007 10:02 am, Brian Dunning wrote: > A friends asked me the following and I have no clue: > >> There are variables in php called the super globals. Specifically >> the >> $_SERVER super globals are coming back as an empty array. The >> shopping >> cart that pixami supplied to us

Re: [PHP] Empty super globals

2007-08-07 Thread Zoltán Németh
2007. 08. 7, kedd keltezéssel 11.02-kor Brian Dunning ezt írta: > A friends asked me the following and I have no clue: > > > There are variables in php called the super globals. Specifically the > > $_SERVER super globals are coming back as an empty array. The shopping > > cart that pixami supplie

[PHP] Empty super globals

2007-08-07 Thread Brian Dunning
A friends asked me the following and I have no clue: There are variables in php called the super globals. Specifically the $_SERVER super globals are coming back as an empty array. The shopping cart that pixami supplied to us requires the $_SERVER super globals. -- PHP General Mailing List (ht

Re: [PHP] Empty string problem

2005-05-20 Thread Rasmus Lerdorf
Kristen G. Thorson wrote: > Following is a snippet of code that I am trying to debug. Most of the > time, the variable $sn (set on the last line), correctly contains the > variable $this_customer_num. On some occasions, however, it does not > contain $this_customer_num. I cannot figure out what

[PHP] Empty string problem

2005-05-19 Thread Kristen G. Thorson
Following is a snippet of code that I am trying to debug. Most of the time, the variable $sn (set on the last line), correctly contains the variable $this_customer_num. On some occasions, however, it does not contain $this_customer_num. I cannot figure out what may be happening that this val

Re: [PHP] empty function and array indices

2005-05-01 Thread Richard Lynch
On Sun, May 1, 2005 1:47 pm, Gabriel Birke said: > Is empty() some kind of special function where the validity > of indices is not checked? Bingo! That's rather the whole point of empty and isset. :-) The behaviour of empty has changed over time, with various releases. isset seems more "stable"

Re: [PHP] empty function and array indices

2005-05-01 Thread Mark Cain
cho array_key_exists('c', $a)? 'empty':'not empty'; Mark Cain - Original Message - From: "Gabriel Birke" <[EMAIL PROTECTED]> To: Sent: Sunday, May 01, 2005 4:47 PM Subject: [PHP] empty function and array indices > Hello! > > Suppos

Re: [PHP] empty function and array indices

2005-05-01 Thread Rasmus Lerdorf
Gabriel Birke wrote: Hello! Suppose I have the following code: $a = array('a'=>1, 'b'=>2); echo empty($a['c'])?'empty':'not empty'; echo $a['c']; Why doesn't the 2nd line output a warning when error_reporting is set to E_ALL? Is empty() some kind of special function where the validity of indices is

[PHP] empty function and array indices

2005-05-01 Thread Gabriel Birke
Hello! Suppose I have the following code: $a = array('a'=>1, 'b'=>2); echo empty($a['c'])?'empty':'not empty'; echo $a['c']; Why doesn't the 2nd line output a warning when error_reporting is set to E_ALL? Is empty() some kind of special function where the validity of indices is not checked? If t

[PHP] Re: çå: [PHP] empty() problem

2004-12-13 Thread Craig Slusher
em [mailto:[EMAIL PROTECTED] > åéæé: 2004å12æ12æ 21:58 > æää: [EMAIL PROTECTED] > äé: [PHP] empty() problem > > Hi Group Members > i have a problem with function empty() > i use it to check if user entered the form fields and store it in array > > for example : > >

答复: [PHP] empty() problem

2004-12-12 Thread yangshiqi
Maybe this can help you. If (empty((string)$Game_rating)) …… -邮件原件- 发件人: Ahmed Abdel-Aliem [mailto:[EMAIL PROTECTED] 发送时间: 2004年12月12日 21:58 收件人: [EMAIL PROTECTED] 主题: [PHP] empty() problem Hi Group Members i have a problem with function empty() i use it to check if user entered the

Re: [PHP] empty() problem

2004-12-12 Thread adwin wijaya
Ahmed Abdel-Aliem wrote: Hi Group Members i have a problem with function empty() i use it to check if user entered the form fields and store it in array for example : if (empty($Game_rating)) $errors[] = "You didn't enter the Online Status for the Game."; the problem when the user enter

Re: [PHP] empty() problem

2004-12-12 Thread Craig Slusher
I use this function which I find is very useful: function isEmpty( & $var ) { return isset($var) && strlen(trim($var)) == 0; } On Sun, 12 Dec 2004 10:12:34 -0500, John Holmes <[EMAIL PROTECTED]> wrote: > Ahmed Abdel-Aliem wrote: > > > > Hi Group Members > > i have a problem with function e

Re: [PHP] empty() problem

2004-12-12 Thread John Holmes
Ahmed Abdel-Aliem wrote: Hi Group Members i have a problem with function empty() i use it to check if user entered the form fields and store it in array for example : if (empty($Game_rating)) $errors[] = "You didn't enter the Online Status for the Game."; the problem when the user enter

Re: [PHP] empty() problem

2004-12-12 Thread Sebastian
trim it then use an operator..eg if(trim($Game_rating) == '') { // error .. } - Original Message - From: "Ahmed Abdel-Aliem" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 12, 2004 8:58 AM Subject: [PHP] empty() problem > Hi Gr

[PHP] empty() problem

2004-12-12 Thread Ahmed Abdel-Aliem
Hi Group Members i have a problem with function empty() i use it to check if user entered the form fields and store it in array for example : if (empty($Game_rating)) $errors[] = "You didn't enter the Online Status for the Game."; the problem when the user enters 0 in the form field th

Re: [PHP] empty variable

2004-09-21 Thread Chris Dowell
Just to clear up, there is no isempty() function - the correct function is empty() and its details can be found here: http://uk.php.net/empty Cheers Chris -{ Rene Brehmer }- wrote: At 01:54 20-09-2004, Chris Mach wrote: What is the best way to determine if a variable is empty? I have a feeling th

Re: [PHP] empty variable

2004-09-19 Thread Jason Davidson
if youdo if($var) { } and var doesnt exist at all, thats an error. if(isset($var)) { } will test to see if $var exists, but will not test the value of var, so $var could be blank... Jason "Pat" <[EMAIL PROTECTED]> wrote: > > So, you have to know, first, what is your meaning of your empty

Re: [PHP] empty variable

2004-09-19 Thread Pat
So, you have to know, first, what is your meaning of your empty variabe: null, 0, "", array()? For example, "$var = 0;", empty($var) says true... but you? "Jason Davidson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > as suggeted the isset and empty functions are usefull, > or if

Re: [PHP] empty variable

2004-09-19 Thread Jason Davidson
as suggeted the isset and empty functions are usefull, or if you know it may be set, but could be empty, how about just if($variable) { } that is the same as if($var == "") "Chris Mach" <[EMAIL PROTECTED]> wrote: > > What is the best way to determine if a variable is empty? > > I have a feel

Re: [PHP] empty variable

2004-09-19 Thread -{ Rene Brehmer }-
At 01:54 20-09-2004, Chris Mach wrote: What is the best way to determine if a variable is empty? I have a feeling there is a better way than the way I'm doing it now... if ($variable == "") there's 2: if (isset($variable)) or if (isempty($variable)) what's most appropriate depends on how the variab

Re: [PHP] empty variable

2004-09-19 Thread Larry E . Ullman
What is the best way to determine if a variable is empty? I have a feeling there is a better way than the way I'm doing it now... if ($variable == "") You could try the empty() or isset() functions, depending upon exactly what you're wanting to test. See the manual for descriptions of both. Larry

[PHP] empty variable

2004-09-19 Thread Chris Mach
What is the best way to determine if a variable is empty? I have a feeling there is a better way than the way I'm doing it now... if ($variable == "") --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.766 / Virus Database: 513 - R

RE: [PHP] Empty Variable Values Between Scripts

2004-06-08 Thread Jay Blanchard
[snip] Is there something that has to be done to php so that it sees these variables? Is this an operating system issue? Anything else I should be looking at? [/snip] register globals is off, so all of your variables are in the POST array $_POST['first'] $_POST['last'] etc. Replace all your

[PHP] Empty Variable Values Between Scripts

2004-06-08 Thread Frank Hahn
Hello: I am just starting to learn php and have been reading tutorials that I have found on the Internet. The one I am reading now is: http://www.freewebmasterhelp.com/tutorials/phpmysql/1 The problem I am having is with these two scripts. Script 1: (This script displays some forms to type i

Re: [PHP] empty connection string

2004-05-21 Thread Stephen Lake
Its a first for me to hear to...never thought PHP and MS were married :D "Jeroen Serpieters" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, 21 May 2004, AMC wrote: > > > > > Yes > > > > It's the first time I hear response.write() and php together ... confused :S > > -- > Jer

Re: [PHP] empty connection string

2004-05-21 Thread Jeroen Serpieters
On Fri, 21 May 2004, AMC wrote: > > Yes > It's the first time I hear response.write() and php together ... confused :S -- Jeroen Describing the difference between computer hardware and software: "Those parts of the system that you can hit with a hammer (not advised) are called hardware; those

  1   2   3   >