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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:18:56+00:00 2026-05-13T10:18:56+00:00

im having a problem with php yet again… i’ve created a page with multiple

  • 0

im having a problem with php yet again… i’ve created a page with multiple forms on it and when i test it i’ve learnt that the first form is processed (with the ongoing, complete and reject) values but then i cant seem to process the 2nd form the same way. what could be the matter?

any help would be appreciated… happy new year to all the users of the site!

   <? 

    if (array_key_exists('complete',$_POST)) {
                echo "Sucess!";
                exit;
                };

    ?>

            <?php   

    $days = range (01, 31);
    $months = range (1, 12);
    $y1 = date("Y")-2;
    $y2 = date("Y");
    $years = range ($y1, $y2);

    if (array_key_exists('caseStatus',$_POST)) {
                    $case = $_POST['case'];

    if ($case == 'complete')
    { 
    echo 'Please set the date on which the case was <b>completed</b>.<p>';
    echo "<form action='" . $_SERVER['PHP_SELF'] . "' method='post'>"; 
    echo '<select name="completeDay">';
    foreach (range(1, 31) as $day) {
        echo '<option value="'.sprintf("%02d", $day).'">'.sprintf("%02d", $day).'</option>';
    }   echo '</select>';
    echo '<select name="completeMon">';
    foreach (range(1, 12) as $month) {
        echo '<option value="'.sprintf("%02d", $month).'">'.sprintf("%02d", $month).'</option>';
    }   echo '</select>';
    echo '<select name="completeYr">';
    foreach ($years as $value) {
        echo '<option value="'.$value.'">'.$value.'</option>';
    }   echo '</select>
    <p>
    <input type="hidden" name="complete" value="1"/> 
    <input name="submit" type="submit" value="Save"/> 
    <input type="button" value="Cancel" onclick="window.location=\'\'"/>
    </form>
    '; 
    exit;
    } 
<form method="POST" action="<?php echo $_SERVER['PHP_SELF'] . '?id=' . intval($client_id); ?>">
    <select name="case" class="rta">
      <option value="<?php echo $row_caseStatus['progress']; ?>" selected="selected"><?php echo $row_caseStatus['progress']; ?></option>
      <option value=""></option>
      <option value="ongoing">ongoing</option>
      <option value="complete">complete</option>
      <option value="reject">reject</option>
      </select>
    <input type="submit" name="caseStatus" id="caseStatus" value="Save" />
                                    <input type="hidden" name="caseStatus" value="1"/> 
    <br />
  </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-05-13T10:18:56+00:00Added an answer on May 13, 2026 at 10:18 am
    <?php
    
        if (array_key_exists('complete',$_POST)) {
                    echo "Sucess!";
                    exit;
                    };
    
        ?>
    

    a simple error… just needed to edit the opening php tag!

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

Sidebar

Related Questions

I'm having a problem with some code that used to work in PHP 4.X
I am having a strange problem with PHP and a C script that uses
I am having a problem with PHP from that adds data to MYSQL database
I'm having a problem with php's for loop. The loop iterates too fast and
I'm having a problem with a PHP website running on IIS 7 on Windows
I am having one problem with the PHP json_encode function. It encodes numbers as
I am having a problem with setting cookie with php. I am trying to
I'm having a problem with a query prepared in PHP with PDO. The code:
I'm having a problem right now with a function we're using in PHP to
I'm having a problem with my ajax call. I'm submitting some info via php

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.