if isset button
I'm trying to make the $sql variable change once the button with the name 'lang_en' is submitted, so it goes from selecting the 'eng_text' tab to select the 'it_text' tab, but it doesn't seems to work. Can you help? <?php include 'includes/conn.php'; if(isset($_POST['lang_en'])){ $sql = "SELECT * FROM it_text"; } else{ $sql = "SELECT * FROM eng_text"; } $result = mysqli_query($conn, $sql); $row = mysqli_fetch_all($result, MYSQLI_ASSOC); var_dump($sql); ?> <a href="#" type="submit" name='lang_en' class="w3-circle w3-margin w3-padding bg-img w3-display-topright" style="background-image: url('img/italian_flag.png')">IT</a> this is what's there in conn.php: <?php $serverName = 'localhost'; $userName = 'root'; $password = ''; $database = 'pers_text'; $conn = new mysqli($serverName, $userName, $password, $database)