Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.