html – No me realiza el INSERT INTO en PHP

Tengo un código sencillo, pero no logro que realice la función INSERT, mi base de datos se llama test, con una tabla llamada login y 2 columnas llamadas usuario y password, si alguien me pudiera echar un cable, le estaria muy agradecido, estoy empezando en esto de PHP.
Realiza la acción (redirigir a login.php) pero no se actualiza.

<?php
$dbhost = "localhost";
$dbuser = "root";
$dbpass = "";
$dbname = "test";

$conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
if (!$conn) 
{
    die("No hay conexión: ".mysqli_connect_error());
}

$nombre = $_POST("txtusuario");
$pass = $_POST("txtpassword");

$sql = "INSERT INTO login (nombre, password) VALUES ('".$nombre."','".$pass."')";
mysqli_query($con,$Sql);
header ("Location: login.php");
?>```

Y este es el archivo index:

 <html>

 <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>StaffMx</title>
        <link rel="stylesheet" href="style/style2.css">
        <link rel="stylesheet" href="style/normalize.css">
        <link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900&display=swap" rel="stylesheet">
    </head>
    <body>


    <center>
    <form method="post" action="config.php">
           <div>
            <img src="https://es.stackoverflow.com/img/logo.svg" alt="">
        </div>
    <div class="contenedor">    
        <div>
            <img src="logo.png" alt="">
        </div>
        <table class="tablagrande">

            <tr><td colspan="2" style="background-color: rgb(136, 139, 139); padding-bottom:5px; padding-top:5px;"><label><center>Ingresar</center> </label></td></tr>
            </td><td><label><center>Usuario</center></label></td></tr>
            <tr><td><center><input type="text" name="txtusuario" class="in"/></center></td></tr>
            <tr><td><label><center>Password</center></label></td></tr>
            <tr><td><center><input type="password" name="txtpassword" class="in"/></center> </td></tr>
            <tr><td><center><input type="submit" value="Entrar!" class="in"/></center> </td></tr>


        </table>

    </div>

    </form>
    </center>

    </body>
    </html>

A partir de aquí solo pondre texto, ya que no me deja publicar la pregunta:

There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don’t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn’t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

postgresql – Postgres – Insert data into view – tables have many to many relationship

After a day of banging my head against my desk I thought I’d reach out for help. Any points in the right direction would be much appreciated.

In Postgres, I want to insert data into a view, “hosts” that links to tables with a many to many relationship, “nodes” and “groups” with the linking IDs in “many_groups_has_many_nodes”.

Since that will not work, I call a trigger to ‘INSTEAD OF INSERT’ and execute a function, “update_hosts_entries”.

As a part of that function I want to pass in a text array from my original insert to the view.
For each value in that array, I want to add that value into my “groups” table as a new “group name” if it does not already exist as well as add an association in the “many_groups_has_many_nodes” table.

View

CREATE VIEW "hosts" AS
SELECT
  public.nodes.n_name AS name,
  public.nodes.n_hostname AS hostname,
  array_agg(public.groups.g_name) AS groups
FROM
  public.many_groups_has_many_nodes
  INNER JOIN public.groups ON (public.many_groups_has_many_nodes.id_groups = public.groups.id)
  INNER JOIN public.nodes ON (public.many_groups_has_many_nodes.id_nodes = public.nodes.id)
GROUP BY
  n_name,
  n_hostname

INSERT

INSERT INTO "hosts" ("name", "hostname", "groups")
VALUES ('myrouter', '10.10.10.10','{default,west-coast}');

TRIGGER

CREATE TRIGGER update_hosts_entries_trigger
  INSTEAD OF INSERT ON hosts for each row EXECUTE procedure update_hosts_entries();

FUNCTION

Create or replace function spInsertIntoGroups (
p_NodeName text(50),
p_GroupName text())

Returns void as $$

     DECLARE
     v_NodeID int;
     v_GroupID int;

     BEGIN
     Select id into v_NodeID from nodes where n_name = p_NodeName;
     Select id into v_GroupID from groups where g_name = p_GroupName;

     If (v_NodeID is null)
     Then
          Insert into nodes values(p_NodeName);
          v_NodeID := SCOPE_IDENTITY();
     End if;

     If (v_GroupID is null)
     Then
          Insert into groups values(p_GroupName);
          v_GroupID := SCOPE_IDENTITY();
     End if;

     Insert into many_groups_has_many_nodes values(v_NodeID, v_GroupID);

End;
$$ LANGUAGE plpgsql;

I believe I am getting close but am stumped on what to do (or search for) in regards to the function.

Any help is much appreciated.

asp.net – Insert selected Image into databse

I want to insert selected image into database

 public void BindImages()
    {
        try
        {
            string query = "select * from Images where Prod_id=@Id";
            SqlCommand cmd = new SqlCommand(query, EcomConString);
            cmd.Parameters.AddWithValue("@Id", SqlDbType.VarChar).Value = id;
            cmd.CommandType = CommandType.Text;
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            DataTable dt = new DataTable();
            sda.Fill(dt);
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    strImages += @"<li>
                        <img src="https://webmasters.stackexchange.com/" + dr("Img") + @"'  class='img-thumbnail' alt=''  />
                    </li>";
                    strThumbImage += dr("Img").ToString() + ",";
                }
            }
        }
        catch (Exception ex)
        {

        }
    } 

php – How to insert multiple rows and columns in database using array

Please i want to know if it is posible to use one sql query to insert into multiple columns and rows using array in php
$sql = "INSERT INTO MyGuests (firstname, lastname, email) <br> VALUES ('John', 'Doe', 'john@example.com');";
but i want to represent column names in array as arrays and then values as array values, something that will look like this in php
$sql = "INSERT INTO myguest (array(firstname => 'john'));

insert or remove a photo from a notebook on demand

I would like a “button” which I could “click on” that would on first click insert a specific photo from a windows file and then, on second click, remove the photo. It could also be two buttons. Or some other scheme. Any thoughts?

INSERT DB

Please I need a little help, I am only learning SQL.

I need t o INSERT into the DB, a new hotel called ‘Beach Resort’ at location ‘Mexico’.
This is what i have: (Note that the value ‘8’ is because ‘hotelNo’ in all tables is NOT AUTO_INCREMENT. but it is a int(11) NOT NULL

INSERT INTO hotel VALUES (‘8′,’Beach Resort’,’Mexico’)

‘hotelNo’ is the PRIMARY KEY in all tables. If I manually update hotelNo with above script in Hotel table, do i need to update it manually in all tables?

This is MySQL DB in WorkBench

Hotel (hotelNo, hotelName, city)
Room (roomNo, hotelNo, type, price)
Booking (hotelNo,guestNo, dateFrom, dateTo, roomNo)
Guest (guestNo, guestName, guestAddress)
SEMrush

-Hotel contains hotel details and hotelNo is the primary key
-Room contains room details for each hotel and (roomNo, hotelNo) forms the primary key
-Booking contains details of bookings and (hotelNo,guestNo,dateFrom) forms the primary key
-Guest contains guest details and guestNo is the primary key

Any help appreciated

 

android – Can’t log in Google Play on mobile because I can’t insert my email

I have deleted my old account, and obviously I have been disconnected by Google Play Store. So I tried to insert my new email and… when I touch the textbox where I am supposed to insert my address for some reason the keyboard and cursor don’t show up. How can I fix this, since I literally cannot use Play Store without logging?

sierra – After removing bootcamp partition, booting the mac it says insert bootable media and press any key?

so I had to remove my bootcamp partition because I was running low on osx Sierra space and I didn’t need the Windows partition. But when I boot the mac I get an error

No bootable device — insert boot disk and press any key

My guess is that there is still some sort of a Windows boot manager on a partition, but I can’t see it in Diskutil GUI or when pressing Alt on startup, or in the startup disk. Currently, the only wat to boot to macOS is to hold down Alt then -> Macintosh HD,

Porn Loaders (Insert + Download Link)

We are looking for premium porn uploaders that use insert + download links. Just sign up here and start earning money

Assuming that 4 disk accesses take a second, what is the expected time to find, insert, and delete a key?

I want to build an optimal B + tree

  • the block size of a disk is 4,096 bytes
  • Branches use 4 bytes
  • Keys use 16 bytes
  • Records (including keys) are 128 bytes
  • There are 16 million records.

M value = 205 L value = 28