Jump to content

Php form help


chuchu1

Recommended Posts

Hi guys.

 

I need some help here (am an amateur.., but can do copy n paste  ;D).. what should be the correct code here:

 

while(list($key,$value) = each($_POST)){if(!(empty($value))){$set=1;}$message = $message . "$key: $value\n\n";} if($set!==1){header("location: $_SERVER[HTTP_REFERER]");exit;}

 

Thanks for help in advance.

 

Link to comment
https://forums.phpfreaks.com/topic/158556-php-form-help/
Share on other sites

Dude, you need to format your code. It's really difficult reading your code.

 

while (list($key, $value) = each($_POST)) {
if(!empty($value)) {
	$set = 1;
}

$message = $message . "$key: $value\n\n";
}

if ($set !== 1) {
header("location: $_SERVER[HTTP_REFERER]");
exit;
}

 

What do you mean with "the correct code" though?

Link to comment
https://forums.phpfreaks.com/topic/158556-php-form-help/#findComment-836251
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.