Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7989735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:49:58+00:00 2026-06-04T12:49:58+00:00

This is for an online form for product returns. The user selects from a

  • 0

This is for an online form for product returns. The user selects from a menu, Refund, Replacement, 90DaysExpired, etc… (choices shown below). Each of those choices, has a corresponding message(inside a variable, also shown below). I want the value of the variable($tbrefund, $tbreplace, etc), based on the choice of the user, to be passed to the variable ‘$message’.

This is what I have so far, and I get the following error:

Notice: Undefined variable: message

$Rarray = array(
"Refund" => "$tbrefund",
"Replacement" => "$tbreplace",
"90DaysExpired" => "$expiredwarranty",
"ContactTech" => "$contacttech",
"RefundExpiredReplace" => "$outsiderefund",
"NoExRefund" => "$noexchange",
"ManuWarranty" => "$manuwarranty",
);

if (isset($Rarray[$Request]))
   $message =  $Rarray[$Request];

Any help is greatly appreciated.

edit:
this is the line producing the error, I already know it’s not relevent…

$send_contact=mail($to,$subject,$message,$header);

Why would you downvote someone asking for help? It will only make new people reluctant to ask anything…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:49:59+00:00Added an answer on June 4, 2026 at 12:49 pm

    The error is because $Request is not set correctly.

    if (isset($Rarray[$Request]))
    {
       $message = $Rarray[$Request];
    }
    else
    {
       $message = "Invalid";
    }
    

    So your actual question is “why is $Request not working”?

    The answer is it depends on where $Request is coming from, so you need to show us some examples of $Request echoed (or var_dump() ) – but I would hazard a guess that you are sending the $Request lowercase (if it is via a URL or something) – but your array is capitalised.

    Edit: and I hope you are not expecting your messages to be something other than “$tbreplace” or something.

    I guessing you meant to do something like this?

    $Rarray = array(
    "Refund" => $tbrefund,
    "Replacement" => $tbreplace,
    "90DaysExpired" => $expiredwarranty,
    "ContactTech" => $contacttech,
    "RefundExpiredReplace" => $outsiderefund,
    "NoExRefund" => $noexchange,
    "ManuWarranty" => $manuwarranty
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello i have this form filling javascript: function onLine(code,nn) { document.writeform.bericht.value+=code; document.writeform.bericht.focus(); document.writeform.nickname.value+=nn; write1();
I am creating an online enrollment form. When a user advances to page 2,
I am trying to send data(a username and password) to an online form from
Im writing my first online shop in PHP. Now working on add product form
I have an online PDF form which a user completes and then clicks a
Tried to search for this online and didn't get very far, so I'm asking
Scenario : There is this online questionaire that will be filled in by various
Been trying to find this online for a while now. I have a SDL_Surface
I tried to find this online, but I can't seem to find anything. How
Is there a simple way of doing this I found this online and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.