$_post $var - how to post as a variable $_post $var - how to post as a variable
how to post $_POST[$var.$id], I wanted to create a variable that looped through a counter based on the number of fields on the form and input them into a database. I didn't always know how many fields were on the form so i created this mini script to loop through;
$nofields =$_POST['nofields']; //no of fields submitted
$a=1; //counter start
while ($a<=$nofields) {
$fn="varname".$a;
$fieldname=$_POST[$fn];
echo "$fieldname";
$a=$a+1;
}
}
}


Trending right now
Foods to avoid during H pylori infection Hide How to stop videos playing automatically in chrome How to identify hot selling products on Ebay Why Eating Butter Before Bed Could Transform Your Night How to get more customers Even Crap sells Master the Art of Saying No Without Guilt How to tie a tie Keep flies off your food this summer How to make first letter only captial using php. How to copy a textarea contents to a clipboard How to remove inspyware from your laptop Why are the vaccinated not actually vaccinated Encouraging Messages from God To get a free starter from pizza express simply enter this code How do i edit a facebook album name in a group What different Text Ads Types are available for Google ADWORDS Made to measure drawer organisers. Easy to install. How to stop text enhance pop ups showing on webpages. People Do not Really Care And That is the Truth Delete Remove a file from your sever using php Today is your day Giving your bank details to Trustly through ebay How to stop coughing quickly and easily How to make sure facebook picks up the correct picture from a website Remove a tomato stain from clothes easily Why No One Should Ever Verify Their Details on Any Website How to relieve cure a sore throat What is the difference between Jam and peanut butter Joke on how i met your mother What Is Money and How It Is Just a Collective Illusion Visited link to remain same colour
|