I’m not sure if the SQL Lite driver is readily available within Lucee. If not, you need to download the file and copy it to some /lib directory. And then, add in your Application.cfc:
Alrighty, I configured some things and this is the current error I am getting:
“lucee.commons.lang.ClassException: cannot load class through its string name, because no definition for the class with the specified name [org.sqlite.JDBC] could be found caused by (java.lang.ClassNotFoundException:org.sqlite.JDBC not found by lucee.core [48];java.lang.ClassNotFoundException:org.sqlite.JDBC;)”
That’s odd because it does exist. But, does it have to be inside Lucee? Because Lucee is inside root folder, but other folders like Registration and MembersOnly are outside of Lucee. MembersOnly have db inside. Could it be that Lucee can’t locate DB because membersOnly is not in Lucee folder?
Okay, I think we are closer and closer to make this work. Now I am getting more specific error because now it seems the only issue is the query for inserting:
This is the page:
<cfset request.pageTitle = "Registration">
<cfif IsDefined("form.username") and IsDefined("form.email")>
<!--- Establish Connection to SQLite Database --->
<cfquery name="insertUser" datasource="mySQLiteDB">
INSERT INTO users (username, email)
VALUES (
<cfqueryparam value="#form.username#" cfsqltype="CF_SQL_VARCHAR">,
<cfqueryparam value="#form.email#" cfsqltype="CF_SQL_VARCHAR">
)
</cfquery>
<!--- Check if the registration was successful --->
<cfif insertUser.recordCount>
<p class="style1">Registration successful!</p>
<cfelse>
<p class="style1">Registration failed. Please try again.</p>
</cfif>
</cfif>
<p align="center" class="style2">REGISTRATION FORM</p>
<p class="style1">In Development process</p>
<div class="reg__container">
<form class="form__container" method="post">
<label class="form-label" for="username">Username:</label>
<input class="form-input" type="text" id="username" name="username" placeholder="Enter your username" required>
<label class="form-label" for="email">Email:</label>
<input class="form-input" type="email" id="email" name="email" placeholder="Enter your email" required>
<div class="form-checkbox-container">
<input class="form-checkbox" type="checkbox" id="subscribe" name="subscribe">
<label class="form-label" for="subscribe">Agree to out <a href="#">terms</a> of use.</label>
</div>
<button class="form-button" type="submit">Submit</button>
</form>
</div>