V
V
Vyacheslav Mulyukin2015-12-06 17:12:30
PHP
Vyacheslav Mulyukin, 2015-12-06 17:12:30

How to check if a mysql query has completed?

When executing a request, it is necessary to display that it has been completed, and if it has not been completed, then issue another message.
How to check whether it was completed or not?

if(isset($_POST['lp'])){
  $K_name=$_POST['name'];
  $K_tel=$_POST['tel'];
  $K_mail=$_POST['email'];
  $Lp_domen=$_POST['lp_name'];
  $Lp_vid=$_POST['lp_vid'];
  $Lp_multi=$_POST['lp_multi'];
  $Lp_ab=$_POST['lp_ab'];
  $Lp_ad=$_POST['lp_ad'];
  $sql2= "insert into lp SET Lp_name='$Lp_domen', Lp_vid='$Lp_vid', Lp_multi='$Lp_multi', Lp_ab='$Lp_ab', Lp_ad='$Lp_ad'"; 
    $dbo->exec($sql2);
  $sql1= "insert into klient SET K_name='$K_name', K_tel='$K_tel', K_mail='$K_mail' "; 
    $dbo->exec($sql1);
  
  header("Location: menedger.php");
}

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
Therapyx, 2015-12-06
@Therapyx

I don't know exactly in php, but I already found 3 identical answers...)) stackoverflow.com/questions/11650160/insert-data-t...

S
shagguboy, 2015-12-06
@shagguboy

php.net/manual/en/pdo.exec.php

H
hostwell, 2015-12-07
@hostwell

And why did you create a bunch of duplicate variables? Isn't it possible to immediately put into the request from $ _POST

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question