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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:14:55+00:00 2026-05-27T02:14:55+00:00

How can I store my data.. if you test the code… you must add

  • 0

How can I store my data.. if you test the code…

you must add one by one field

… you will found the problem… it can’t save the previous entry.. for example if i store 2 in one field.. when I enter next number and click Add it will delete previous…

<?php

$puzzle = array(0,0,6,4,3,2,0,5,3,0,0,6,4,4,0,0,0,0,1,3,0,0,0,0,2,6,4,0,0,1,3,0,1,3,4,5,0);
$solved = array(0,1,6,4,3,2,5,5,3,2,1,6,4,4,2,6,5,3,1,3,5,1,6,4,2,6,4,5,2,1,3,2,1,3,4,5,6);


for($i=1;$i<=36;$i  ){

    if($_POST['field'.$i]!=''){
        $puzzle[$i] = $_POST['field'.$i];
        break;
    }

}

class displayClass {
    public function display($field){
        $fieldNum=0;
        $puzzle=$field;
        GLOBAL $ids , $edited;
        $ids = array(0);
        echo "<form action=\"index.php\" method=\"post\"><table border = \"3\" ><tr>" ;

        for($i=1;$i<=36;$i  ){

            if($puzzle[$i]==0){
                $ids[] = $i;
                echo "<td><input type=\"text\" name=\"field".$i."\" maxlength=\"1\" size=\"1\"/></td>";  
            }  else {

                echo "<td>".$puzzle[$i]."</td>";

            }

            if($i%6==0){
                echo "</tr><tr>";
            }
        }

        echo "</td></table>";
    }
}


displayClass::display($puzzle) ;

echo "<input type=\"submit\" value=\"Add\" /></form>";


?>

Code

And also I am havig huge problem with formating questions..did the most of editing availabe..

  • 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-27T02:14:55+00:00Added an answer on May 27, 2026 at 2:14 am

    I think you should post your code here instead of linking to it. I don’t know about most people, but it will probably dissuade them. Also, I’m having a hard time understanding what you want. I’m assuming what you are doing is overwritting a variable, and you wish to keep each value. Try using an array and setting it to a session variable like so.

    <?php
    session_start();
    $var=array();
    $var[]='info you want to keep.';
    $var[]='more info you want to keep.';
    $_SESSION['var']=$var;
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As you know, in ASP.NET, you can store session data in one of following
On Google App Engine to query the data store with Python, one can use
As you can know, you can store data against a contact on Android phones.
Say you have a bunch of files. Say you can store meta data to
I want to use Google spreadsheets to store data online so multiple people can
In C++, how can I establish an SQL connection to store data in an
I have a generated nested Array which I store some data. How can i
I can do this easily with JPQL that only returns data from one table.
Suppose I have any data stored in bytes. For example: 0110001100010101100101110101101 How can I
Is there a limit to the amount of data that can be stored in

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.