Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $db_host = 'localhost'; // Server Name
- $db_user = 'root'; // Username
- $db_pass = 'root'; // Password
- $db_name = 'node_update'; // Database Name
- $conn = mysqli_connect($db_host, $db_user, $db_pass, $db_name);
- if (!$conn) {
- die ('Failed to connect to MySQL: ' . mysqli_connect_error());
- }
- ?>
- <?php
- if(isset($_POST['submit'])){
- $id=$_POST['id'];
- $node=$_POST['node'];
- $interface=$_POST['interface'];
- $filter=("SELECT node from cam where id ='$id'");
- $query = mysqli_query($conn, $filter);
- }
- if(mysqli_num_rows($query)>1){
- echo "this file exist".$node;
- /*
- DELETE CODE HERE!!
- */
- }
- else{
- /*
- update code here !!
- */
- echo "update this ! ";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement