update query in php 7+ code example

Example 1: update php

//SQL query for updating php post from a form using sql
$firstName = $_POST['firstName'];
mysqli_query($con,"UPDATE member SET  firstName='$firstName' WHERE id=1");

or 
// actually updating php version
go contact hosting provider, or login to cpanl look for 'php' settings or 'MultiPHP Manager'

Example 2: update php sql

$_old_username = "Randy";
$_new_username = $_POST["username"]; 

$_sql = "UPDATE user SET first_name = $_new_username WHERE first_name = $_old_username";

Tags:

Php Example