Getting values with $_POST [solved]
Posted: Wed Aug 03, 2005 7:05 am
I have been asked to update a website, so it can handle register globals=off, so i've been putting a lots of $_POST[ ], but now i've rum into a problem.
This is part of a form at the site:
My problem is the last line. The ${"ant".$i} won't work with register globals=off. How do get the value of that variable? I've been trying to add some $_POST varius places but it doesn't seem to work. Does anybody know how solve this?
feyd | please use
This is part of a form at the site:
Code: Select all
<input type="hidden" name="no<?php print $i ?>" value="<?php print $db->f(no); ?>" >
</td>
<td><?php print $db->f(description); ?>
<input type="hidden" name="besk<?php print $i ?>" value="<?php print $db->f(description); ?>" >
</td>
<td>
<input type="text" name="ant<?php print $i ?>" value="<?php if(isset(${"ant".$i})) print ${"ant".$i}; ?>" style="width:40">My problem is the last line. The ${"ant".$i} won't work with register globals=off. How do get the value of that variable? I've been trying to add some $_POST varius places but it doesn't seem to work. Does anybody know how solve this?
feyd | please use
Code: Select all
tags when posting php code..[/color]