Jump to content

Sticky notes


Recommended Posts

Hi. Im trying to make an online sticky notes system. each user will be able to subscribe to number of boards. each board will hold memos. so in case me and my friend are subscribed to the same board (we can both subscribe to different boards also regardless) and i put a memo on that board, my friend will see that memo also. So... i crated the sql database, and now when the user logged in, he is automatically see the boards he's subscribed to and the memos on that board. only thing is, i want him to be able to add memo to a board. as for now, the script takes the userid, then run sql query to check his subscribed boards and saves the boards id on an array, after that, on each board, the script loops thru the memos on the database to see which memo is connected to that board id and then display it. so im not sure how can i do the Add note thingy here, i thought about making a little form inside each of the display boards, a simple <teaxtarea> and <submit> and when user submit i run the SELF PHP page and insert a query. ONLY problem is, how can i know which of the forms did the user submitted? if there could be a way the form could hold the board id number inside of it.. is there a way to do that? im posting a pic to try to explain what i mean.

**You can see the title of the board in pink, after that all notes float left and the form comes after the notes. in this example to user subscribed to 2 boards. thank you


Link to comment
Share on other sites

It probably makes sense to use ajax to submit the data to the server, that way you don't have to refresh the page.  There's plenty of information about ajax online.  When you build that page in PHP and write out the button to call the function to run the ajax request, you can pass the board ID to that function.

If you don't want to use ajax then you can have your PHP form processing code on the same page, all of the PHP code like that should go on the top of the page before you display anything.

  • Like 1
Link to comment
Share on other sites

  • 6 years later...
16 hours ago, QuentinLin said:

I would love to use this platform! It seems like a great way to stay organized and collaborate effectively with others. I wish we had it when I studied at school!

A memo can be added to specific boards by including the board ID in the form submission. You can use hidden input fields in your form to store and pass the board ID along with the memo content. Your approach with a textarea and submit button per board sounds practical. If you need more inspiration or references, you can check out websites like notesonline.com. Good luck with your project—it looks promising!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...