McLaren
McLaren

Reputation: 776

Decoding ampersand (&amp) to normal

I am having problems creating add file form which if person wants, it redirects after submit to add new file, but when I try to do that it still redirects back to m=files because it shows ?m=files&a=addedit. I tried using html_entity_decode, but still it shows the same ?m=files&a=addedit what to do, here is my redirect?

<input type="hidden" name="redirect" value="<?php echo $new = html_entity_decode('m=files&amp;a=addedit'); ?>" />

Upvotes: 1

Views: 906

Answers (1)

OptimusCrime
OptimusCrime

Reputation: 14863

Not 100% sure what OP wants, but simply replacing &amp with & should solve the problem, I think.

<input type="hidden" name="redirect" value="<?php echo str_replace('&amp;', '&', 'm=files&amp;a=addedit'); ?>" />

Upvotes: 1

Related Questions