Jump to content

php redirecting


Miks

Recommended Posts

$text = "Results from form:\n\n";

$space = ' ';

$line = '

';

foreach ($_POST as $key => $value)

{

if ($req == '1')

{

if ($value == '')

 

THEN I PUT HERE MY REDIRECT CODE

 

...and on the code goes

 

$j = strlen($key);

if ($j >= 20)

$j = 20 - $j;

for ($i = 1; $i <= $j; $i++)

{$space .= ' ';}

$value = str_replace('\n', "$line", $value);

$conc = "{$key}:$space{$value}$line";

$text .= $conc;

$space = ' ';

}

mail($emailadd, $subject, $text, 'From: '.$emailadd.'');

Link to comment
https://forums.phpfreaks.com/topic/180915-php-redirecting/#findComment-954450
Share on other sites

You haven't exactly provided any proof that the logic is operating on values that would cause it to be redirecting. Are you sure that $value is ever an empty string?

 

Are you developing and debugging php code on a system with error_reporting set to E_ALL and display_errors set to ON in your master php.ini so that php would display all the errors it finds, like a header error that would prevent the redirect from working?

Link to comment
https://forums.phpfreaks.com/topic/180915-php-redirecting/#findComment-955555
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.