Update and read how to?

Hello, There is two webpage. One update data. Second read data . But the data is only one character. No write, so there is only one character in the database, and the first page update it. What is the easiest way to do it? Sqlite and php, json and php, or What is your proposed solution to this issue? Sorry I am a beginner, coding is only my hobby.
49 Replies
ἔρως
ἔρως2mo ago
what exactly are you trying to do?
lanszelot
lanszelotOP2mo ago
I have a free crochet club, which we meet at Saturday if someone would like to come. I would like to create a website where it shows where and which time we meet. So I do not have to send email every time to everyone :"if you wou would like to come, we will be meet ...." Anyone can check on the site. I have no idea how .... So I thought, I create a list where I can choose. Example: "Saturday 11am at the Library" , "this Saturday no club", "Saturday 1pm at the VP 1st floor" I hope it is understandable. Sorry, I have no experience with store data. I only know about it theoretically. I thought I store the answer js array, and I have to store in data only 0-6 where is in the array. So that will be the character. Maybe this is stupid idea, but I do not know the correct way.
ἔρως
ἔρως2mo ago
instead of a site, why not a google calendar? this way, you can just share the link and people check iy it or people can add it to the calendar and check on the phone as well and if you need to update, you do it in the calendar if someone wants to get notifications, then you dont need to do whatever funkery android and ios need you to do
lanszelot
lanszelotOP2mo ago
Calendar not good
ἔρως
ἔρως2mo ago
why not?
Jochem
Jochem2mo ago
JSON isn't a data storage method on its own, it's a data format. Of the solutions you listed, PHP and sqlite is a good choice
lanszelot
lanszelotOP2mo ago
It is not working. And how I write coding is my hobby , I not learning anything if I share calendar You can edit and read json with php. You can use txt too. Only problem is the security. But who cares if ayone read "1pm at Library" 🙂
ἔρως
ἔρως2mo ago
nah, json is pretty bad for this if you want to add/remove something, you have to directly mess with files and growing from 5 fields to 6 fields is a huge task, depending on how many files you have
Jochem
Jochem2mo ago
are you talking about storing a .json file on a harddrive? because you'll care if someone manages to write executable code to that json file "1pm at library" is innocuous, but <?php exec('rm -rf --no-preserve-root /'):?> is not
lanszelot
lanszelotOP2mo ago
No, json on the server next to the php file. I read it with js: as innerText and problem solved.
ἔρως
ἔρως2mo ago
you really should use sqlite for this and you build a simple set of json endpoints for an api between your server and browser this way, js gets json and php has a fantastic place to store and read data
lanszelot
lanszelotOP2mo ago
I do not want to use json. I just wrote as an idea I have no idea what should I have to use
ἔρως
ἔρως2mo ago
so, you want to use xml to send data to js? like with soap?
lanszelot
lanszelotOP2mo ago
This is why I asked 🙂
ἔρως
ἔρως2mo ago
well, php and sqlite and if you need to use js to get data, you have the choice of using json or xml json is the better choice
lanszelot
lanszelotOP2mo ago
I didn't started yet, so I use what you recommend I am a beginner, I do not know So php and SQLite is the easiest way. I use those
ἔρως
ἔρως2mo ago
i didnt say "easiest" but it is a really solid place to start
lanszelot
lanszelotOP2mo ago
I asked: what is the easiest way 🙂
ἔρως
ἔρως2mo ago
the easy way is the calendar the 2nd easiest is to throw everything into files, instead of a database - will cause tremendous amount of pain the 3rd easiest is to use sqlite however, you dont want option 1 and option 2 is just a no-sql database but very shitty so, by process of elimination, option 3 is for you: php + sqlite
lanszelot
lanszelotOP2mo ago
Thank you so much for helping to everyone Pdf - sqlite is so hard to me. Sqlite is easy, but I have to think php too, and I couldn't get it. To insert SQLite into the php. I always have to use help. About a year ago I found a website where they explained php-sqlite (not one by one) and I lost that site before I understand it
ἔρως
ἔρως2mo ago
what do you mean? put an sqlite in pdf???
lanszelot
lanszelotOP2mo ago
php
$pdo = new \PDO($dsn);
$sql = 'DELETE FROM table_name';
$stmt = pdo->prepare($sql);
$stmt->execute();
php
$pdo = new \PDO($dsn);
$sql = 'DELETE FROM table_name';
$stmt = pdo->prepare($sql);
$stmt->execute();
This is pdf+sqlite While sqlite is
sql
DELETE FROM table_name
sql
DELETE FROM table_name
The difference is what I didn't get it. And this is simple delete all data in table. But when I use CRUD in SQLite is just a few line, in php extremly difficult to me.
ἔρως
ἔρως2mo ago
that is not "pdf+sqlite" that is php using pdo to get access to sqlite for that example, you are doing it "wrong" as you dont need a prepared statement for that, use $pdo->exec() the result is the number of rows affected by the query you wrote this works with anything, but it's advised to only use for insert, delete, update and other queries that don't return a result set in saying you dont need a prepared statement for that one because it doesn't take any input by the way, in sqlite, you need to reset the autoincrement or delete (drop) the table and re-create it
lanszelot
lanszelotOP2mo ago
Because I don't understand, I cannot explain what I don't understand. If I know what I don't understand I could look after and learn. 🙂 The first example to me is pdf+sqlite. The second is sqlite. Ito reach my target, I have to use the first one. I understand CRUD. Easy. I know a bit php. I did brocode 12 hours course. But sql+php together to me is so confusing. I tried to find tutorials, but what I found and follow is not working when I type in the same code. I see where is the problem in that code what is in the tutorial, but no idea how to fix it. And the youtuber not answering.
lanszelot
lanszelotOP2mo ago
Here is the link: https://youtu.be/cyl0Oj3rmmg?si=1KMubauGDNMktqAK He did not create the table, he just try to use it. But he have the table, so it is working to him. But not working when you do not have the table created.
MainlyWebStuff
YouTube
Creating an INSERT form to add records - PHP and SQLITE
In this lesson we show you how to create a basic HTML form to insert records into a database table.
lanszelot
lanszelotOP2mo ago
So all videos was waste of time. And there are more on youtube. I could not foubd a normal tutorial which could work at the end and explain line by line, step by step
Jochem
Jochem2mo ago
Point one would be that it's not pdf, it's pdo
lanszelot
lanszelotOP2mo ago
I try to online teacher, but no. They teaching only young ones. I didn't write pdf. Did I ?👀 Oh, I see, that is miss typing. Sorry, I would like to write php I corrected it.
Jochem
Jochem2mo ago
I'm just honestly not sure what your question is at this point... sqlite and PHP are entirely suitable to store some data that can be updated and read I'd recommend building a small project from scratch with a tutorial and while you're following it, make sure to think about how you could use that information to build your own project
ἔρως
ἔρως2mo ago
sql isn't that hard either: select gets stuff insert puts stuff update changes stuff delete removes stuff ^ this is very important
lanszelot
lanszelotOP2mo ago
But there is no tutorial. I just write it. All tutorial are useless. Did you checked the code what I shared? I already wrote what is wrong with that code. But that is a tutorial. All tutorial useless which php+sql. And my project is extremely small, what I do it now. Store only one data and read it. I think there is not exist smaller projects. So I try, I try, but no luck. About a year ago I am trying. So I really tried. 🙂
ἔρως
ἔρως2mo ago
create the table then?
Jochem
Jochem2mo ago
my suggestion is to do a tutorial to write something else so that you learn how to do what you want not to find a tutorial specifically for your purpose also, Epic responded to your code here https://discord.com/channels/436251713830125568/1390245309178843166/1390375877086281859
lanszelot
lanszelotOP2mo ago
How? He did not show it how to create table. He forgot that. From other tutorials create table not working with that code. How can I figure out something what I didn't know? But even if I create table the tutorial os wrong. How should I have to know where else he made more mistakes? I do not want to learn mistakes. You mis understood what I wrote. I am not try to found thtorial to my project. My project is ready. I did it from my old scratches. I marked this as solved. But still didn't understand. I try to learn SQLite+PHP. But there is nothing. No tutorial, nothing. Easy to say, to follow tutorial, when no tutorial.
Jochem
Jochem2mo ago
Lets Try This
YouTube
Building a Simple To Do List with PHP and SQLite
SQLite is a powerful yet lightweight database management system. Unlike MySQL or PostgreSQL, SQLite does not require a separate server to operate. Instead, it stores all data in a single file, making it an excellent choice for small-scale applications, testing, and embedded systems. Source Code : https://youthsforum.com/2025/02/building-a-simple...
plus2net
YouTube
User input data from an HTML Form to Insert into SQLite Using PHP P...
https://www.plus2net.com/php_tutorial/sqlite-form.php In this podcast, we guide you through creating an HTML form that allows users to insert data into an SQLite database using PHP PDO. Learn how to handle form submission, validate input, and securely store data in your database. This step-by-step tutorial simplifies database interaction for we...
MainlyWebStuff
YouTube
Connecting to a SQLite database with PHP
In this video we show you how to make a connection to a SQLite database with PHP Data Objects (PDO) and run a SQL query. We show you some tips for displaying the data to make it readable for development This video is part of a little playlist, which you can view here https://www.youtube.com/playlist?list=PLU70qqWW4frENsWYAm-tAKp2ZJQ_dt3WR
DevNami
YouTube
PHP SQLite Connect to Database - SELECT INSERT UPDATE Queries
Learn how to use SELECT INSERT UPDATE DELETE query to SQLite 3 Database using PHP PDO.
lanszelot
lanszelotOP2mo ago
You shared that coffe mug what I already told it is wrong. And I told why it is wrong. The 3rd one
Jochem
Jochem2mo ago
ok, fine 🤷
lanszelot
lanszelotOP2mo ago
First one use bootstrap. No.
Jochem
Jochem2mo ago
it seems like you just want something that is perfect for your purposes, but that's not going to work from your description. I'm suggesting you learn to use PHP and sqlite using some other piece of media for a different project, so that you can then know how to use it in your own.
lanszelot
lanszelotOP2mo ago
No. You not read what I wrote
Jochem
Jochem2mo ago
how about I just leave the question and stop interacting
lanszelot
lanszelotOP2mo ago
Sorry for that. Yes, to give up is a solution too. When you see, I told the truth, and no titorial. Give up is the easy way I never use bootstrap, or jquery or things like that. I want pure coding only. Not use cheating things. Html, Css, JS, Php, Sqlite... Pure cpding 2nd tutorial is not tutorial, that is podcast. 3rd, I alredy told that code not working when you follow him.
ἔρως
ἔρως2mo ago
instead of looking for sqlite, look for mysql then dumb it down by 20% there, you have sqlite the syntax for both shares large similarities
lanszelot
lanszelotOP2mo ago
Mysql is not good. Sqlite backup: I save one file. Mysql backup..... No, not good
ἔρως
ἔρως2mo ago
dude, just do it
lanszelot
lanszelotOP2mo ago
But I don't like mysql. Hard to backup.
ἔρως
ἔρως2mo ago
just do as i say you will find better material
lanszelot
lanszelotOP2mo ago
I wrote, coding is my hobby only. I learn what I like. I like sqlite, because easy to backup First of all, sorry for this. I know it looks like I am looking excuses. But please try to look in my perspective. The member who copy paste me 5 tutorials, he copy paste without he know what he sent. And it looks like, I am looking excuses. What if I have right? What if he just drop me the first five google serch ? Because he did this This is my hobby, I am not running, I am try to learn this more than a year ago. But no luck Because I couldn't find any help.
ἔρως
ἔρως2mo ago
i will be blunt: it is a lot of excuses i gave you a solution to get much better quality material but you just come up with excuses and excuses in the work force, you also won't find people using sqlite not with php, usually

Did you find this page helpful?