FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


HomeWatched TopicsRegisterSearchDirectory
FAQMemberlistUsergroupsLog inStoresItemsBank
Google

Reply to topic Page 1 of 1
code
Message  

Reply with quote
Post code 
Hi Guys,

Can anyone explain this code to me...

Code:


If (strlen($_POST["fielddata"]) > 0) {
   
   While (list($dblID, $vala) = each($_POST["fielddata"])) {
      
      While (list($strFieldName, $strData) = each($vala)) {
      
      If (strlen($strData) > 0) {
         Print $strFieldName." - ".$strData."<br>";
      }
      }
   }
   exit;
}



Thanks

View user's profile Send private message

Reply with quote
Post  
Makes sure there is post data
For every element of the POST array, makes a a smaller array
For every element of this new array creates a variable
Makes sure the data is not blank
Outputs "Field Name - Data"

Example:
Someone posts "hello" in the $_POST['message'] variable.
Output: "Message - Hello"

Basically outputs a readable version of all post values.


_________________
http://www.phpgfx.com
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  



Google

FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


Web Design by PlatinumShore.com & Web Hosting by TradeWebHosting.com