php – How do I use these google variables from their javascript and place in my db?

From the title, I am using google api to login people within my website. I am trying to grab base information to create an account for them. I am having trouble because I need to put their information within php, so I can use my database. any help would be appreciated!

<html lang="en">
    <link rel="stylesheet" type="text/css" href="login.css">
    <meta name="google-signin-scope" content="profile email">
    <meta name="google-signin-client_id" content="">
    <script src="" async defer></script>

      <form class="form" action="googleLogin.php" method="get" enctype="multipart/form-data">
        <h1 class="login-title">COVTRACK Login</h1>
          <div id="google-log" class="g-signin2" data-onsuccess="onSignIn" data-theme="dark"></div>

      <script type="text/javascript">
        function onSignIn(googleUser) {
          // Useful data for your client-side scripts:
          var profile = googleUser.getBasicProfile();
          console.log("ID: " + profile.getId()); // Don't send this directly to your server!
          console.log('Full Name: ' + profile.getName());
          console.log('Given Name: ' + profile.getGivenName());
          console.log('Family Name: ' + profile.getFamilyName());
          console.log("Image URL: " + profile.getImageUrl());
          console.log("Email: " + profile.getEmail());
            // The ID token you need to pass to your backend:
          var id_token = googleUser.getAuthResponse().id_token;

          var usernameVar = profile.getName();
          var givennameVar = profile.getGivenName();
          var familynameVar = profile.getFamilyName();
          var imgVar = profile.getImageUrl();
          var emailVar = profile.getEmail();
          console.log("ID Token: " + id_token);

          // document.write (usernameVar + " ");
          // document.write (givennameVar + " ");
          // document.write (familynameVar + " ");
          // document.write (emailVar + " ");
          // document.write (profile.getUsername());


python – Covid Tracker + Notify people = Ideal for small coffee place or similar

This is my second project since I started with Python, this time I learned a little bit of SQL that is so useful and beautifully simple.

Starting idea: Generate a program that will store information in DataBase(SQL).
Goal: Learn SQL basics and expand my knowledge in Python.
After project thoughts: The more basic it look the most difficult to find the BUG in the code. Spent 1 week finding a bug to finish the project and it was a variable repeated in two for loops.

Code purpose: During this time in the world I’ve seen a lot of paper used to do this job while at the same time they use a computer or tablet to charge you or book you in. What if we get rid of the paper and we only use digital?
This is supposed to be used by the employee not the user. Any confirmed case will be searched and this will allow you to send an email to all the people that were in the same place at the same time or +1 hour.

Really happy I hope yous like it, I know it needs Validation of User Input I tried to focus more on the PEP8 and mixture between Python and SQL.

Will appreciate any recommendations. Thank you.


import sqlite3
import datetime
import time
import smtplib
import imghdr
from email.message import EmailMessage

conn = sqlite3.connect('covid.db')
c = conn.cursor()

notify_group = list()

def enter_data():
    def create_table():
        c.execute('''CREATE TABLE IF NOT EXISTS
        name TEXT,
        email TEXT,
        ph_number INTEGER,
        datestamp TEXT,
        keyword TEXT)''')

    i_name = str(input('Please insert FULL NAME : n ...'))

    i_email = str(input('Please insert EMAIL : n ...'))

    i_number = int(input('Please insert PHONE NUMBER : n ...'))

    print('Your data has been saved for acelerated contact, thank you. n')

    def data_entry():
        date, keyword = dynamic_data_entry()
        c.execute('''INSERT INTO covidTrack
        VALUES(?, ?, ?, ?, ?)''', (i_name, i_email, i_number, date, keyword))

    def dynamic_data_entry():
        keyword = 'nameofvenue'
        date = str(datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S'))
        return date, keyword

    def read_from_db():
        c.execute('''SELECT * FROM covidTrack''')


def data_search():
    x = input('''Select desired search: n
    Search by FULL NAME. n

    if x.lower() == 'full name':
         specify_name = input('Please insert full name. n ')
         select_query = c.execute('''SELECT * FROM covidTrack WHERE NAME ==(?) ''', (specify_name,))
         for row in c.fetchall():
             print('Name:', row(0))
             print('Email:', row(1))
             print('Phone Number:', row(2))
             print('Date and Time:', row(3))
             print('Venue:', row(4))
             c.execute('''SELECT *
             FROM covidTrack
             WHERE datestamp >= ?
             AND datestamp <= datetime(?, '+1 hours')  ''', (row(3),row(3)))
             print('Matching Results: n ')

             for row2 in c.fetchall():

             add_people = input('Would you like to notify this group?Y/N')

             if add_people.lower() == 'y':
                 print('All the people in this search has been advised.')
             if add_people.lower() == 'n':

    if x.lower() == 'date and time':
        specify_datestamp = input('''Please insert full date as shown.
        Please follow this format...
        YYYY-MM-DD HH:MM:SS ''')

        c.execute('''SELECT * FROM covidTrack WHERE datestamp == ? ''', (specify_datestamp,))
        for row in c.fetchall():
             print('nName:', row(0))
             print('Email:', row(1))
             print('Phone Number:', row(2))
             print('Date and Time:', row(3))
             print('Venue:', row(4))
             d = row(3)

             c.execute('''SELECT *
             FROM covidTrack
             WHERE datestamp >= ?
             AND datestamp <= datetime(?, '+1 hours')  ''',(d,d))
             print('Matching Results: n')
             for row2 in c.fetchall():

    if x.lower() == 'exit':

def SendMail():
    msg = EmailMessage()
    msg('Subject') = 'covidTrack notification.'
    msg('From') = '#############'
    msg('To') = notify_group
    msg.set_content('It has been confirmed that you were a close contact in. Please contact us as soon as possible.')


    with open('covidTrackNotification.png', 'rb') as f:
        file_data =
        file_type = imghdr.what(
        file_name =
    msg.add_attachment(file_data, maintype='image', subtype=file_type, filename=file_name)

    with smtplib.SMTP_SSL('', 465) as smtp:
        smtp.login('###########', '#######')


def menu():
    choose_funtion = input('''Please choose action: n
    EXIT n ''')

    if choose_funtion.lower() == 'a':
        print('You choose enter data.')
    if choose_funtion.lower() == 'b':
        print('You choose search data.')
    if choose_funtion.lower() == 'exit':

complexity theory – For every Non Deterministic polynomial Turing Machine $M$ take place $L(overline{M})in P Leftrightarrow P=N$

The $Leftarrow$ direction is straightforward.
On the other hand for $Rightarrow$ direction I have a frame of the prove but for some reason it’s not clear for me.
For NTM, Non Deterministic Turing Machine, $M$, for example TN that decide $SAT$, $L(M)=L(overline{overline{M}})in NP$. It’s clear that exists NTM $M’=overline{M}$ such that $L(overline{M})in NPRightarrow L(overline{overline{M}})in P$ so $P=NP$.
Is this the proof official enough?

$overline M$ is a TM that accept and reject final states switched

8 – How to get the row added by ajax in the right place?

I have a table form created from a custom entity:

  public function buildForm(array $form, FormStateInterface $form_state, $contract = NULL)

    $form('subscriptions') = (
      '#type'       => 'table',
    $form('subscriptions')('#header') = (some stuff here);
//  here is the query to retrieve data from entity...  
    $results = db_query($query);
    foreach ($results as $key => $value) {
      $myKey = $key * 10;
      $form('subscriptions')($myKey)('somefield') = ('#markup' => $value->designation);
      $form('subscriptions')($myKey)('anotherfield') = (
        '#type'          => 'number',
        '#default_value' => $value->$sTemp,
      $form('subscriptions')($myKey)('addRow') = (
        '#type'  => 'submit',
        '#name'  => $myKey,
        '#value' => '+',
        '#ajax'  => (
          'callback' => '::ajaxAddRow',
          'wrapper'  => 'my_form_wrapper',
    $form('submit') = (
     '#type'  => 'submit',
     '#name'  => 'submit',
     '#value' => $this->t('Submit'),
  return $form;

The ajax callback:

  public function ajaxAddRow(array &$form, FormStateInterface $form_state)
    $myKey = $form_state->getTriggeringElement()('#name');
    $form('subscriptions')($myKey + 5) = $form('subscriptions')($myKey);
    return $form;

The submitForm:

  public function submitForm(array &$form, FormStateInterface $form_state)
    if ($form_state->getTriggeringElement()('#name') == 'submit') {
        do some stuff then exit the form
    else {

When I click on ‘+’ in some row, the form is displayed again with a copy of the row added to the table.
But the copy is added at the end of the table.
How can I have the copy added just after the original one?

cart – Urgent help – Place Order button is not working on click. Nothing happens and no errors logged for Magento 2.4.0

I am getting complaints from few users that when they go to checkout and click on “Place Order” button nothing happens. I tried adding lots of debug and system logs but no errors or issues logged. I tried testing from my end using testers across devices and it’s working from them, so I am not able to replicate the issue.
Has anyone faced this? what could be the issue? how to fix this? Please urgent help needed

blogger – When I go to my blog I cannot see a place to comment and neither can others

I have googled and tried every solution offered. My comments in the settings are set to: showing, anyone is allowed to comment and they are embedded. This feature seems to have recently turned off as a January post has comments but I can’t see those under the post only in my dashboard. When I click on the “4 comments” at the top it takes me to that same page. I can’t seem to figure this out.