Re: Can $_POST variables be modified in a function?
- From: Erwin Moller <Since_humans_read_this_I_am_spammed_too_much@xxxxxxxxxxxxxxxx>
- Date: Tue, 08 Apr 2008 11:19:59 +0200
Kevin Audleman schreef:
Hello,
I'm working with a web store package which gives me specific places
where I can insert my code. I am trying to modify $_POST variables
after a form is submitted, and before the store actually processes
them. This is within a class function. Problem is, any $_POST variable
I modify is disappearing from the end result. I don't know if there's
a warning being thrown that the web store is suppressing or what, but
it's my modification of the values that seems to be screwing things
up. I came across a post in the PHP documentation that mentioned
something about superglobals not being able to be modified in
variables, but gave no solution. Does anybody know what the deal is,
and how I might be able to modify my $_POST variables?
Thanks,
Kevin
Hi Kevin,
You can modify the $_POST array just as you like.
You must make a mistake elsewhere.
Here is an example that shows that:
----------------------------------------
Post before:
<br>
<pre>
<?php print_r($_POST); ?>
</pre>
<?php
$_POST["test"] = "bla";
?>
<hr>
after:
<br>
<pre>
<?php print_r($_POST); ?>
</pre>
----------------------------------------
How are you reposting the data? Via Curl?
Regards,
Erwin Moller
.
- Follow-Ups:
- Re: Can $_POST variables be modified in a function?
- From: Kevin Audleman
- Re: Can $_POST variables be modified in a function?
- References:
- Can $_POST variables be modified in a function?
- From: Kevin Audleman
- Can $_POST variables be modified in a function?
- Prev by Date: Re: Help
- Next by Date: include as string
- Previous by thread: Can $_POST variables be modified in a function?
- Next by thread: Re: Can $_POST variables be modified in a function?
- Index(es):
Relevant Pages
|