Jump to content

westman

Members
  • Posts

    600
  • Joined

  • Last visited

westman's Achievements

Invested Member

Invested Member (3/7)

10

Reputation

  1. .arrowSliding { position: absolute; -webkit-animation: slide 4s linear infinite; animation: slide 4s linear infinite; animation-direction: reverse; } Hope this helps you
  2. Thank you so much. Works well.
  3. use animation-direction: reverse;
  4. How do I make my animation run backwords? Instead of it moving from right to left, I need it to move from left to right. #arrowAnim { width: 100vw; height: 100vh; display: flex; justify-content: center; align-items: center; } .arrow { width: 5vw; height: 5vw; border: 2.5vw solid; border-color: black transparent transparent black; transform: rotate(-45deg); } .arrowSliding { position: absolute; -webkit-animation: slide 4s linear infinite; animation: slide 4s linear infinite; } .delay1 { -webkit-animation-delay: 1s; animation-delay: 1s; } .delay2 { -webkit-animation-delay: 2s; animation-delay: 2s; } .delay3 { -webkit-animation-delay: 3s; animation-delay: 3s; } @-webkit-keyframes slide { 0% { opacity:0; transform: translateX(15vw); } 20% { opacity:1; transform: translateX(9vw); } 80% { opacity:1; transform: translateX(-9vw); } 100% { opacity:0; transform: translateX(-15vw); } } @keyframes slide { 0% { opacity:0; transform: translateX(15vw); } 20% { opacity:1; transform: translateX(9vw); } 80% { opacity:1; transform: translateX(-9vw); } 100% { opacity:0; transform: translateX(-15vw); } } <div id="arrowAnim"> <div class="arrowSliding"> <div class="arrow"></div> </div> <div class="arrowSliding delay1"> <div class="arrow"></div> </div> <div class="arrowSliding delay2"> <div class="arrow"></div> </div> <div class="arrowSliding delay3"> <div class="arrow"></div> </div> </div> Any help?
  5. If I have the following code in header.php and index.php is including header.php, will header.php be protected from URL access? if(!isset($_SERVER['HTTP_REFERER'])){ header('location:../index.php'); exit(); }
  6. I think I was miss understood. My second question was meant to mean at run time - not using the command line. If my index.php includes www.mysite.com/folder/file.php and file.php has the above code at the top, how do I grant access to index.php?
  7. Thank you for the insight. I tried the code you gave but it did not work for me. I have use... if (php_sapi_name() != 'cli') { header('location:http://mysite.com'); exit(); } at the top of the page and it seems to do the job. When I type the file directory in the address bar the code in the file does not run and I am moved to the home page. At the same time using the code above, my cron job works fine. If the code above is not the best way of stopping access from the URL please tell me. Also, how do I grant access to another php file that are including a file that is blocking URL access using the code above?
  8. Hi all, I have a file at the following directory... www.mysite.com/folder/file.php I have a cron job running file.php and all is well there. How do I stop the file running the code if some one enters my file directory in the address bar?
  9. Thank you. Last question. If I have my usual $conn = new mysqli($db_host, $db_username, $db_pass, $db_name); in an external file would it be a problem if I add $conn_pdo = new PDO("mysql:host=$servername2;dbname=$dbname2", $username2, $password2); in the same file?
  10. I removed one LIMIT and it is okay now. how do I close the PDO query and and connection?
  11. this is my output from print_r($stmt);. PDOStatement Object ( [queryString] => SELECT id, main, id_from, id_to, pm_subject, pm_text, pm_date, pm_open FROM text WHERE id IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ORDER BY id DESC LIMIT LIMIT 0,10 ) Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0,10' at line 1 in /home/outlinetalent/public_html/t_all.php:86 Stack trace: #0 /home/mysite/public_html/file.php(86): PDOStatement->execute(Array) #1 {main} thrown in /home/mysite/public_html/file.php on line 86
  12. the output of $limit = 'LIMIT ' .($pagenum - 1) * $page_rows .',' .$page_rows; echo "<br /> limit: $limit <br />"; is... limit: LIMIT 190,10
  13. thank you for the $row info. it tried... $limit = 'LIMIT ' .($pagenum - 1) * $page_rows .',' .$page_rows; but got the following error
  14. works well. thank you. last one. How do I get a variable out the while loop and how do I close the DB connection? Also, is it possible for $limit = 5; to be $limit = "34,5"; as it is a pagination script. PDO is new to me.
×
×
  • Create New...