Can any please help me to make corrections to this error.
![](https://static.wixstatic.com/media/a27d24_634e8b2579e642d1944bf9ab03baea1f~mv2.png/v1/fill/w_691,h_497,al_c,q_85,enc_auto/a27d24_634e8b2579e642d1944bf9ab03baea1f~mv2.png)
import wixData from 'wix-data'; $w.onReady(function () { //TODO: write your page related code here... }); let userEmail; let userName; let userLastName; let ticketNumber; let booked; let toInsert = { "userEmail": userEmail, "userName": userName, "userLastName": userLastName, "ticketNumber": ticketNumber, "booked": booked }; export function SubmitBtn_click(event, $w) { console.log("Submit click!!"); userEmail = $w("#userEmail").value, userName = $w("#userName").value, userLastName = $w("#userLastName").value, ticketNumber = $w("#ticketNumber").value, booked = $w("#booked").value, if ($w('#userEmail').valid && $w('#userName').valid && $w('#userLastName').valid && $w('#ticketNumber').valid && $w('#booked').valid) { wixData.insert("TicketChecker", toInsert) .then( (results) => { let item = results; //see item below console.log("you uploaded to database!!"); } ) .catch( (err) => { let errorMsg = err; console.log("your uploaded Failed!!"); } ); } console.log(userEmail); }
Try putting semi-colons instead of commas in these variable assignment lines:
userEmail = $w("#userEmail").value; userName = $w("#userName").value; userLastName = $w("#userLastName").value; ticketNumber = $w("#ticketNumber").value; booked = $w("#booked").value;
When you hover the mouse over the red dot, what does it say? Copying and pasting the code into a page results in no errors as long as there are elements with these names on the page.