Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $hostname = 'localhost';
- $username = 'root';
- $password = '';
- $db_name = 'somedb';
- $conn = mysqli_connect($hostname, $username, $password, $db_name);
- if (isset($_POST['abc'])){
- $date_today = date('Y-m-d');
- $somecount=("INSERT INTO sometable (today,somecount) VALUES ('".$date_today."', '') ON DUPLICATE KEY UPDATE somecount=somecount+1");
- mysqli_query($conn, $somecount);
- }
- ?>
- <form method="post" action="some.php">
- <input type="submit" name="abc">
- </form>
Add Comment
Please, Sign In to add comment