[Solved] A form to mysql query


Something like this:

mi_page.php

    <?php

    if(isset($_POST['ebur']))
    {
        $ebur = mysql_real_escape_string($_POST['ebur']);
    $con=mysqli_connect("ipaddress","user","passw","account");
    // Check connection
    if (mysqli_connect_errno())
      {
      echo "Falha ao receber moedas, informa o administrador com o codigo 445ebmds. " . mysqli_connect_error();
      }

    mysqli_query($con,"UPDATE account SET coins="2000" WHERE mi_field_on_the_table_account="$ebur"");

    mysqli_close($con);
    }
    ?>

    <form method="post" action ="mi_page.php">
    <textarea rows="4" cols="50" id="ebur" name="ebur">

    </textarea>
            <input type="submit" value="Enviar" />
    </form>

All in the same file.

Saludos from Chile 😉

3

solved A form to mysql query