Jump to content

ttocskcaj

Members
  • Posts

    184
  • Joined

  • Last visited

About ttocskcaj

  • Birthday 01/23/1992

Contact Methods

  • Website URL
    http://www.minecms.org

Profile Information

  • Gender
    Male
  • Location
    New Zealand

ttocskcaj's Achievements

Member

Member (2/5)

4

Reputation

  1. Try using a template engine instead of using php as your template engine. http://www.smarty.net/ http://twig.sensiolabs.org/ They help separate the HTML from your code, and allow an easy way to have variables in your HTML (Templates). They will also help with XSS problems.
  2. Just a note, redirecting to a different site for a mobile device is kind of old fashioned now. Have you looked at things like Bootstrap, that help you have one site that scales to any device?
  3. This package is quite good for hashing passwords and checking them. http://www.openwall.com/phpass/
  4. Can a few people please check this registration/login page for SQL injection or any other vulnerabilities please? http://dev.minecms.org/account/register http://dev.minecms.org/account/login Link to profile: http://dev.minecms.org/phpfreaks.txt
  5. Sorry, that was just a typo. It should read: $stmt = $db->prepare("SELECT * FROM `?` WHERE `?` = '?'"); which still doesn't work. Also the $by and $value get checked before that code.
  6. I'm new to using PDO and prepared statements. I have the following code: $db = MineCMS::get()->getDatabase(); $stmt = $db->prepare("SELECT * FROM `` WHERE `?` = '?'"); $result = $stmt->execute(array($db->prefix('servers'),$by,$value)); $row = $result->fetch(); Where $db is an instance of PDO. It returns the following error: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens What am I doing wrong?
  7. Can't see any Javascript errors on chrome or firefox. The HTML is simply not there for the tables.
  8. A while ago, phpMyAdmin stopped showing the tables to enter data in when you try insert a row. I've tried updating phpMyAdmin and that had no effect. Normal MySQL usage works just fine. PHP 5.3.1 MySQL 5.1.44 phpMyAdmin 3.5.1 Any ideas?
  9. You were right. SELinux was blocking apache from network access. Running this command fixed it. # /usr/sbin/setsebool -P httpd_can_network_connect 1
  10. $url = "http://113.21.224.170:20059/api/call?method=runConsoleCommand&args=%5B%22manuadd%20Jack%20Admin%22%5D&key=XXXX"; $h = fopen($url,'r');
  11. How would file permissions come into it? I'm talking about opening a URL. I'll try that kicken
  12. I'm trying to open a URL using fopen() and I keep getting this error: Failed to open stream: Permission denied I can not work out what is wrong, it's not a firewall as far as I can tell.
  13. Weird. I thought I already tried that :s But thanks. It worked.
  14. I'm trying to create styles/HTML for a news feed (similar to what you see on facebook etc). Here is the code that I have at the moment: #feed-list{ margin-top: 20px; } .feed-item{ display: block; } .feed-image{ width: 48px; height: 48px; display:inline; } .feed-user{ margin-right: 170px; font-size: 18px; line-height: 1.5em; text-decoration: none; color:#363636; } <ul id="feed-list"> <li class="feed-item"> <img class="feed-image" src="img/dummies/avatar.jpg" /> <div class="feed-content"> <h6 class="feed-user">ttocskcaj</h6> <span class="feed-text">New Topic: <a href="#">My awesome post!</a></span> </div> </li> </ul> This creates this: But what I want is this (The text is in line with the image). Any ideas?
  15. Thanks I also just learnt that returning false in a function will stop its default action?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.