Jump to content

Saving text


i8grand

Recommended Posts

I am creating a Sudoku puzzle, and have so far managed to display the initial state of the puzzle with some numbers already given.  I have created it so that when a user clicks on a blank cell a text box appears.  I do not however know how to get this so, once the user enters a number the number is saved!

 

I have a database that this is all linked to, the initial puzzle is an 81 string called initialGrid, and have another 81 string for the players new numbers (as well as the initial numbers) to be saved called playerStatus.  My problem is making it so that when a user enters a number and then clicks on a save button, all the numbers are saved in playerStatus. Cells with no number are saved as a space (" ").

 

Any help would be great thanks

Link to comment
https://forums.phpfreaks.com/topic/198261-saving-text/
Share on other sites

I have it now so that i have a query to to fill in the table, but still do not know how to get the numbers from each cell and put them into one single string.

 

$dbQuery = "INSERT INTO puzzlestatus VALUES (NULL, '$customerID', '$puzzle', */81 character string*/";

 

My only problem now is getting each of the numbers from the cells and putting them into a single string.

 

All the cells have unique ids, e.g. top left cell is 0^0, and bottom right is 8^8.  Is there any way I can input these into a single string using these?!

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/198261-saving-text/#findComment-1040279
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.