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 9195983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:44:59+00:00 2026-06-17T21:44:59+00:00

Why does this code always output $image_issue_message as the message when other options are

  • 0

Why does this code always output $image_issue_message as the message when other options are selected? 🙁 I will also post the form code in a comment so you can see how to values get passed if that helps! I’m quite new to PHP so this is getting over my head now

    <?php

if(!$_POST) exit;

$name     = $_POST['name'];
$email    = $_POST['email'];
$issues  = $_POST['issues'];
$message = $_POST['message'];
$image_issue_message = "<strong>Unacceptable photo</strong> - The image that you have submitted has not met the requirements for this website. Photos must be a clear photo of your face (preferably with nobody else in the shot). Photos of cartoon characters, private body parts etc. will not be accepted.<strong> Please attach a suitable photo to your reply email.</strong>";
$description_issue_message = "<strong>Unacceptable description</strong> - The description that you have submitted has not met the requirements for this website. Profile descriptions should tell our users a little bit about yourself and what you're looking for. Descriptions that hint that you are on the site looking for sex will not be approved and profile that contain personal or sensitive information cannot be approved either.<strong> Please submit a revised profile description by replying to this email.</strong>";
$other_issue_message = "<strong>Issues</strong> - ".$message;
$issue_message = "";
if ($issues = "photo") {
    $issue_message = $image_issue_message;
} elseif($issues = "description") {
    $issue_message = $description_issue_message;
} else {
    $issue_message = $other_issue_message;
}


if(get_magic_quotes_gpc()) {
    $comments = stripslashes($comments);
}

$websitepath="http://www.gaymate.co.uk";


// Configuration option.
// Enter the email address that you want to emails to be sent to.
// Example $address = "joe.doe@yourdomain.com";

//$address = "example@themeforest.net";
$address = $email;

// Configuration option.
// i.e. The standard subject will appear as, "You've been contacted by John Doe."

// Example, $e_subject = '$name . ' has contacted you via Your Website.';

$e_subject = 'Profile rejected by GayMate.co.uk';


// Configuration option.
// You can change this if you feel that you need to.
// Developers, you may wish to add more fields to the form, in which case you must be sure to add them here.

$e_body = '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>gaymate.co.uk</title>

        <style type="text/css">

        p {
            font-family: Arial;
            font-size: 12px;
            padding: 0 20px 0 20px; }

        .boldTitle {
            font-size: 13px;
            font-weight: bold; }

        .headerTitle {
            font-size: 16px;
            font-weight: bold; }

        .divider2 {
            padding: 0 20px 0 20px; }

        </style>

        </head>

        <body>
        <table width="500" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>
            <!-- YOU CAN PUT AN EMAIL TITLE IMAGE HERE IF YOU WANT -->
            <p class="headerTitle">www.GayMate.co.uk</p>
            <img class="divider2" src="'.$websitepath.'/images/email/email-divider2.gif" alt="email-divider2" width="460" height="4" />
        <p>Hi,</p></br><p>Your profile has been rejected by the GayMate.co.uk Admin Team. The reasons for rejection
        are listed below. Please reply to this email with any ammendments needed so that we can make the alterations and get your
        profile activated right away!</p>
        <p>Reason(s) for rejection:</br>
        <ul>
            <li>'.$issue_message.'</li></ul></br><p class="headerTitle">The Team @ GayMate.co.uk</p></br>

       <img src="'.$websitepath.'/images/email/email-divider.gif" alt="email-divider" width="500" height="10" />
    </td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
</html>
';

$msg = $e_body;

$headers = "From: admin@gaymate.co.uk" . PHP_EOL;
$headers .= "Reply-To: admin@gaymate.co.uk" . PHP_EOL;
$headers .= "MIME-Version: 1.0" . PHP_EOL;
$headers .= "Content-type: text/html;" . PHP_EOL;

if(mail($address, $e_subject, $msg, $headers)) {

    // Email has sent successfully, echo a success page.

    echo "<fieldset>";
    echo "<div id='success_page'>";
    echo "<h1>Email Sent Successfully.</h1>";
    echo "</div>";
    echo "</fieldset>";

} else {
    echo 'ERROR!';
}

Form code:

    <form method="post" action="sendreject.php" name="contactform" id="contactform">

    <fieldset>

    <label for="name">Name</label>
    <select name="email" id="email">
        <?php
            while($row_list=mysql_fetch_assoc($list)){
                $id =  $row_list['id'];
                $name = ucwords(strtolower($row_list['firstname'])).' '.ucwords(strtolower($row_list['surname']));
                $email = $row_list['email'];
                echo "<option value='".$email."'>".$name."</option>";
            }
        ?>
    </select>

    <br />
    <label for="issues">Issue(s)</label>
    <select name="issues" id="issues">
        <option value="photo">Photo unacceptable</option>
        <option value="description">Profile description</option>
        <option value="other">Other/multiple issues</option>
    </select>

    <br />
    <label for="message">Reject message</label>
    <textarea name="message" cols="40" rows="3" id="message"></textarea>

    <br />
    <input type="submit" class="submit" id="submit" value="Submit" />

    </fieldset>

    </form>
  • 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-17T21:45:00+00:00Added an answer on June 17, 2026 at 9:45 pm

    You are using single = in your ifs: if ($issues = "photo"). Problem here is, that this “if” won’t check if your $issues variable contains “photo”, but it checks whether $issues is True or not.

    Change the = to ==: if ($issues == "photo"), same for the elseif.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does this code always evaluate to false? Both variables are two's complement signed ints.
Why does this code always return 0? var possibleMatches = new Array(); $.getJSON('getInformation.php', function(data)
Why does this code...: NSDictionary *testDictionary = [NSDictionary dictionaryWithObjectsAndKeys:kABOtherLabel, @other, kABWorkLabel, @work, nil]; //
Does this code cause a memory leak: int main(){ int * a = new
Does this code work across all standard compliant C++ compilers (it works with g++)?
How does this code work to Find the next highest power of 2 for
Why does this code throw an Invalid Operation Exception? private SqlCommand cmd; // initialized
Why does this code int (*g)(int); int (*h)(char); h = g; In C, give
why does this code crash? is using strcat illegal on character pointers? #include <stdio.h>
Why does this code not print an exception stack trace? public class Playground {

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.