Jump to content

Ehsanmot

Member
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Ehsanmot

  1. Hi I'm creating a new provisioning module that can edit an external database just after a payment of a client received. For example when a client purchased a service, this module create a row with the username, password and email of the client in an external database. i know how to connect to an external database but i don't know how to do other things... please help me and sorry for my bad english. this is my code for this module: <?php $servername11 = "localhost"; $username11 = "databaseusername"; $password11 = "databasepass"; $dbname11 = "databasename"; // Create connection $conn = new mysqli($servername11, $username11, $password11, $dbname11); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "INSERT INTO nn_users (username, email, password) VALUES ('????', '????', '????')"; if ($conn->query($sql) === TRUE) { echo "Record updated successfully"; } else { echo "Error updating record: " . $conn->error; } $conn->close(); ?>
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated