Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to add session data into mysql database from button

$conn = Connect(); //your MySQLDB connection

// extract values from session to variables
$username= $conn->real_escape_string($_SESSION['auth_user']['username']);
$email= $conn->real_escape_string($_SESSION['auth_user']['email']);
$phone= $conn->real_escape_string($_SESSION['auth_user']['phone']);

//query execution
$query = $conn->prepare("INSERT into loginDetails(username,email,phone) VALUES (?, ?, ?)");
$query->bind_param("sss", $username, $email, $phone); 
$query->execute();
Comment

PREVIOUS NEXT
Code Example
Sql :: veri seçme SQL 
Sql :: null plus 1 in sql 
Sql :: ms sql convert hijri to gregorian 
Sql :: database traccar 
Sql :: sql how to display two atributes as one in sql 
Sql :: mysql if without else 
Sql :: Every Derived yable must have its own alias 
Sql :: transaction in java mysql 
Sql :: how to add foreign key in mysql 8.0 while creating table 
Sql :: set mysql 
Sql :: oracle update multiple columns 
Sql :: john the ripper mysql 
Sql :: redudancy in SQL 
Sql :: What logs are available on RDS MySQL? 
Sql :: java mysql date format 
Sql :: oracle connection 
Sql :: mysql order two columns 
Sql :: pl sql constraint user function 
Sql :: mysql portable 
Sql :: insert into database items linq2sql 
Sql :: how to get data from 2 database 
Sql :: join mysql 
Sql :: Grant All Priveleges On All Databases 
Sql :: funktion LOWER/UPPER sql 
Sql :: apex call duration 
Sql :: Creating aMySQL database and a table 
Sql :: sql requete number pair 
Sql :: utiliser sql ligne de commande 
Sql :: Bigquery insert issue 
Sql :: sql select upcoming birthdays 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =