From what I can tell, the code above is correct, are you sure you’re submitting the form correctly? (Fixing that link will help the community figure out what’s wrong.)
Edit: I believe this is the Repl you are referring to.
Edit: Maybe not, however this Repl does do roughly what you are trying to do and does it correctly so you might want to refer to it.
Thank you for your support. It’s probably an age thing, but I forgot you had to view as a web page to successfully run the script and that running within Replit always failed. If you could close the enquiry I would appreciate it.
Can I ask a question, even though I know I shouldn’t really be doing this? Is it possible to integrate with an SQLite database from within the PHP area? I am teaching a course that requires this and have not been able to find any links to show whether it is possible.
Hi @adunnet glad you managed to resolve your issue.
In answer to your second question I too have a course which needs SQLite and PHP together (Advanced Higher Computing in Scotland). One solution is to host your SQLite database somewhere outside of Replit that allows external access and then run a Replit PHP server to connect to it.
I’m investigating how to do this in a single Repl though for my day job. I’ll flag this post for follow up and hopefully get back to you soon.