Jump to content


Photo

in help in $_POST[$i."1"]


  • Please log in to reply
3 replies to this topic

#1 btkaruna

btkaruna
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 24 August 2006 - 05:24 AM

hi,

i have to modify my sql query.following is my sql statement

insert into quartperformfigures (iQuater,dValue) values ('1','".$_POST[$i."1"]."')";

what does '".$_POST[$i."1"]."' hold is it array type value? need help to analyse this.thankyou


karuna

#2 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 24 August 2006 - 04:42 PM

what does '".$_POST[$i."1"]."' hold is it array type value?


It is an array element.  It can hold any number of things, but it would appear in your case to most likely be either a string or number.

#3 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 24 August 2006 - 04:46 PM

A good way to know what it holds is:

var_dump($_POST[$i."1"]);

~ D Kuang

#4 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 24 August 2006 - 04:48 PM

the $_POST array is an array that holds all of your submitted values from your form. the stuff inside the [] points to which position in the array. the $i."1" is taking the value of $i and concactonating 1 to it.  I assume that there is a loop where $i is incremented or something, so one one of those iterations of the loop, it might actually look like $_POST[11], $_POST[21], $_POST[31], etc... those being the 12th, 22nd, and 32nd positions in the $_POST array (because arrays start at zero, not 1). 

What value the $_POST[11] (example) holds can be anything.  Look at the form you got the posted info from.  it's being inserted into your dValue column in your db so that might help you.
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users