Jump to content

Help again


tecmeister

Recommended Posts

$error = "";

if (empty($name)) {
    $error .= "name is missing<br />";
}
if (empty($product)) {
   $error .= "product is missing<br />";
}

if (!empty($error)) {
     header("Location: feedback.php?error={$error}");
}else {
    // do other processing
}

 

Is that what you were looking for?

Link to comment
https://forums.phpfreaks.com/topic/155896-help-again/#findComment-820608
Share on other sites

$error = array();

if (empty($name)) {
    $error[] = "name";
}
if (empty($product)) {
   $error[] = "product";
}

if (count($error) > 0) {
     header("Location: feedback.php?error=" . implode("+", $error));
}else {
    // do other processing
}

 

Hopefully you can configure it from what to be what you want.

Link to comment
https://forums.phpfreaks.com/topic/155896-help-again/#findComment-820623
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.