Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- try {
- $db = new PDO("mysql:host=localhost;dbname=ctnet_db", "ctnet_user", "yigit2606");
- } catch (PDOException $e) {
- print $e->getMessage();
- }
- $goster = $db->query("SELECT * FROM cointurk_index WHERE id='1'")->fetch(PDO::FETCH_ASSOC);
- $indexnow = $goster[indexnow];
- $indexlast = $goster[indexlast];
- echo '<div class="indexnow">';
- echo $indexnow;
- echo '</div>';
- echo "<br/>";
- echo $indexlast;
- echo "<br/>";
- echo '<div class="durum">';
- if ($indexnow > $indexlast){
- echo "arti";
- }else if ($indexnow < $indexlast){
- echo "eksi";
- }else if ($indexnow == $indexlast){
- echo "sabit";
- }
- echo '</div>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement