NameSilo

A little PHP $_POST help

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

Kadenz

Resistance is FutileEstablished Member
Impact
29
I am trying to use a variable in my $_POST variable like so:
PHP:
$addinfoout = '';
$addinfo2 = explode(',', $addinfo);
	foreach ($addinfo2 as $addinfo3) {
		$addinfo4 = explode('|', $addinfo3);
			$addinfoout .= $addinfo4[3].$_POST($addinfo4[1]).'<br />';
	}

However I am getting this error:

Fatal error: Function name must be a string in /home/.auntie/borghunter/borgweb.com/shop/order2.php on line 33

Does anyone here know how to use variables in the $_POST superglobal, any help is appreciated.

Thank You.
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
OK, so what exactly are you trying to do there, anyway?

It almost looks as though you're trying to access a POST parameter by the name of "whatever is in addinfo4". Is that right?

Anyway, that particular message is coming from the fact that you're using:
$_POST($addinfo4[1])

instead of:
$_POST[ $addinfo4[1] ]

Now, whether or not that's the only problem with the code, well, I don't know.
 
0
Close
EDIT: TwistMyArm beat me to it :D
 
0
Close
lol, oops, ya I just noticed that :P
O well.
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Member card: see how many threads a member started
The member card now shows a Threads number, right after Posts. The member card is the box that opens when you point at a name. Profile...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back