Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- ini_set('display_errors', 1);
- $i = 1 ;
- //Variables
- $username = "user";
- $password = "senha";
- $hostname = "localhost";
- //$ip_user = $_SERVER['HTTP_CLIENT_IP'] ;
- $db_name = "bannco de dados";
- //connect to database
- $connection = mysqli_connect($hostname, $username, $password);
- if(!$connection){
- die("Database selection failed: " . mysqli_error());
- }
- //Select database
- $db_select = mysqli_select_db($connection, $db_name) or die("Cannot find the database");
- if (!$db_select){
- die("Db selection failed: " . mysqli_error($connection));
- }
- mysqli_query($connection, "delete from TABELA");
- mysqli_close($connection);
- ;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement