Damn Small Linux (DSL) Forums
Welcome, Guest. Please login or register.
December 10, 2022, 06:31:07 AM

Login with username, password and session length
The new DSL forums are now open.
11609 Posts in 311 Topics by 291 Members
Latest Member: mik3ca
Search:     Advanced search
* Home Help Search Login Register
Get The Official Damn Small Linux Book. Great VPS hosting provided by Tektonic

  Show Posts
Pages: [1]
1  MyDSL Extensions / System / Re: sqlite insert from php on: August 17, 2018, 12:40:02 PM
Ok I put the database in the same folder htdocs of the server monkey that is by default and how can I do to instantiate sqlite as root you know why I the sqlite file will generate it only with the word "sqlite databasename.db" and nothing else I do not know how to pass that file to root
2  MyDSL Extensions / System / sqlite insert from php on: August 14, 2018, 03:55:57 PM
Hello, I was installing dsl linux
with php connected to sqlite the topical sentences work


but only for a php sqlite select

but to work with insert I get error

<form action="http://localhost/env.php" method="post">
<li>Name: <input type="text" name="nombre" size="20"><br>
<li>Email: <input type="text" name="correo" size="20"><br>
<li>Web Site: <input type="text" name="web" size="20"><br>
<li>Comment: <input type="text" name="comm" size="20"><br>
<input type="submit" value="Ok"><br>
<input type="reset" value="Delete"><br>

require "sqlite.php";
$db = 'comment_section.db';
sqlite_connect($db) or die ("Could not connect");
$sql = "insert into comments(name,
comment ) values ('$_POST[nombre]',
'$_POST[comm]' );
sqlite_query($sql, $db) or die (Query Failed);

sqlite_exec: insert into comments(name, email, website_url, comment)values('pedro', 'pepe@mail.com',
'pepino.wordpress.com','viejo boludo' )
sqlite_query result:
SQL error: unable to open database file
SQL error: unable to open database file
SQL error: unable to open database file
Query Failed
Pages: [1]
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines
Mercury design by Bloc