estcod
-
Posts
2 -
Joined
-
Last visited
Posts posted by estcod
-
-
Hello!
I have little problem with my code.. and my head blow up...
Code is php
<?php include 'db.php'; if( isset($_POST['oak']) ){ $alltree = $_POST['alltree']; $oak= $_POST['oak']; $sql = "UPDATE users SET $puud = $puud + 1, $sirel=$sirel+1"; } if (mysqli_query($sql)) { echo "'+1 Oak tree added!"; } ?> <form action="demo.php" method="post"> <input type="submit" name="oak" value="Cut a tree!"> </form>
My vision is.. if press CUT A TREE! and page updated.. and update my oak amount at mysql data..
So, i'm newbie but i take a little journey for study :)
Need help with PHP and mysql
in PHP Coding Help
Posted · Edited by estcod
Thank you for answer..
So, now i'm thinking.. ..move right direction with this code?
Code not show errors or smth but now i stand little problem, cut a tree and page refesh show me the ECHO and not updated my oak amounts on sql.