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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:45:27+00:00 2026-06-18T10:45:27+00:00

So this is the second assignment in a beginner PHP class. One part of

  • 0

So this is the second assignment in a beginner PHP class. One part of the assignment requires you to allow the user to enter in multiple walls in an HTML form (the program is a calculator to figure out the cost of paint, labor, etc.), however you don’t know how many walls the person is going to enter, so the form needs to be dynamic.

I don’t think we’re allowed to use javascript.

I’ve tried to use the SESSION variable to store the values into an array ( how to store variable values over multiple page loads ) and use foreach functions to loop and save the data ( How to store values from foreach loop into an array? ).

Nothing seems to be working. In this assignment we’re not supposed to use SQL.

Is there another way to store an array? I’d also be happy with a way to echo the data and leave it there until the cache is cleared.

Here’s the code I have right now (sorry it’s a bit of a mess):

print_r($_POST);
      echo "<br />";
      print_r($_REQUEST['wallW']);
      echo "<br />";

      echo "<br />";
      $wallW = $_REQUEST['wallW'];         
      echo "The width is $wallW.";
      echo "<br />";      
      print_r($wallW);

       $_SESSION['wallW'] = $wallW;
        $wallW = $_SESSION['wallW'];


    ?>


            <form name="getOrderInfo" action="" onsubmit="" method="post">
            <table id="wallInfo">
                <th>
                    Order Information
                <th>
                <tr>
                    <td>
                        Wall Width:
                    </td>
                    <td>
                        <input type="text" name="wallW[]" id="wallW" size="20"  value="">
                    </td>
                <tr>

                <tr>
                    <td>
                        Wall Length:
                    </td>
                    <td>
                        <input type="text" name="wallL[]" id="wallL" size="20"  value="">
                    </td>
                <tr>

            </table>


        <input type="submit" value="Add Wall">
</form>

Any help would be great.
Thanks,
Chelsea

  • 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-18T10:45:28+00:00Added an answer on June 18, 2026 at 10:45 am

    Do you use session_start(); on the top of the file, then $_SESSION['array'] = $array;.

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

Sidebar

Related Questions

This is my second question about clicking buttons in JavaScript but this one I'm
This is my second question on Bamboo ( My First One ). My understanding
I hope it's the heat, this is the second question today and it's one
This is my second programming class so please bear with me. I have an
I am taking a Coursera Functional Programming in Scala class. This is the second
This is a class assignment. I had written some codes which I hope someone
This was a 2 part assignment. first I had to figure out how to
This is my second week of learning python and I got an homework assignment
I am a student and this is my second week of Java. the assignment
This is my second C assignment and we have been told to recreate a

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.