Jump to content

QuickOldCar

Staff Alumni
  • Posts

    2,972
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by QuickOldCar

  1. Store each attempted login just as a date, additionally a 0/1 (fail/success) Get that users count of timestamps up to 10 minutes ago...if is a fail last attempt and is a count of 5 or more then it keeps preventing them (store the timestamp and fail)...otherwise allows them (store the timestamp and success).
  2. You should make a habit to separate coding logic from html. Only add html for display, not stored in arrays.
  3. Good eye mac_gyver, not even sure how I missed that exit and so obvious.
  4. What does the html source file show? Btw is no need to keep coming in and out of php the way you are. Also where is $error defined? if (isset($_POST['submit']) && isset($error) == '') { // if there is no error, then process further Is your error reporting actually working?
  5. You have 2 closing form tags </form> <a class="haveaccount" href="login.php">I already have an account...</a> </form>
  6. Welcome to the forum. Be sure to visit the php manual as it has all the current uses and plenty of information to read over.
  7. Welcome to the forum.
  8. I'm in no way a lawyer and even a lawyers advice in a forum wouldn't have much merit, if went to court all would be determined there. It's usually anyone and everyone a party can blame and the lucky ones are those who can afford to get out of it or pass the blame and someone else accepts it. It's not even so much money but a reputation can be at stake. In my eyes if you clearly define in a TOS and also take actions against such wrongful person you should be exempt from blame. "...and any illegal or malicious activity" is a broad scope
  9. I wouldn't let anyone upload code to the server. Are you doing a multiple subdomain/websites? If so have a default css file and let them edit that if anything and image uploads if required. Ever consider making your own theme/templating system? Create a variety of layouts and styles the user can select and further edit just css and images. Could make it they name their customized versions and those are saved. Can go crazy and make your own html builder.
  10. Welcome to the club Fastol.
  11. If I wanted my girlfriend to learn this I would walk her through the manual the same way I learned php, except she would have you to help and explain as well. http://php.net/manual/en/index.php Her asking any questions she is not fully understanding at the time is a good thing, promote that while teaching her. You don't always find out an answer if never ask the question. Spend more time going through and playing with functions and knowing what works better certain situations or know there is many options, be creative using a few together. http://php.net/manual/en/language.functions.php Can browse through some of the extensions and get even more ideas. http://php.net/manual/en/extensions.alphabetical.php Create along with her a "what did I learn so far" and store into a database. Making something useful gives a goal and sense of accomplishment. Math related are always fun right? Making forms and retrieving POST,GET,SERVER,REQUEST Uploading files or images Folder and file based functions Creating sessions and cookies, accessing them. Playing with many date functions and modifying them for display. Creating simple functions. Show how can echo within the function or return results. Adding multiple parameters. Explaining arrays and key values, different array types. foreach and for loops, accessing arrays. using various string manipulation functions how to concatenate and escape php/html database usage I posted a fairly long "do and don't" list for another member. http://forums.phpfreaks.com/topic/293447-echo-hello-world/?do=findComment&comment=1501111
  12. I do give you some credit, to think this all out and create it all in a day, top of that to share it. Good for you.
  13. I'd say so, lots of work to show a random image on a page with 2 buttons. To copy and host them is like image theft. loading a huge image isn't fun for many, I would hotlink from imgurl If I was to do such a project: simple image scraper using curl and php, most likely using dom and domxpath set a cron job to run the script scrape hyperlinks/alternately image tags and (match imgurl pattern if just want those, extract just the codes and normalize links the same for all imgurl) store full href links to expand upon this a day to other sites set a unique index on the url to prevent duplicates If the site scraping has adequate data just use their titles and or descriptions, otherwise go to the image source pages and obtain that data. In this case imgurl has all the opengraph meta data. I would hotlink from imgurl, cache smaller thumbnails and do a gallery in pagination or some lazy loader jquery or js/ajax If cached image exists load that...otherwise scale the image down or merely use css for a max width or height as a thumbnail. The frontend would be a mobile css design and more on the page than just a gallery.
  14. That is a vague question. Is many variables to them that could make them slower. By default they are fast. A big helper would be to cache the results or pages somehow. Optimize queries and create an index for the database. Only fetch data you are using Don't load lots of images or large ones, cache smaller thumbnail versions of them when can. Use gzip or any other compression for js and css Can test your pages out here and try to find out what is making it slow. http://tools.pingdom.com/fpt/
  15. Try laravel instead Have a look at octobercms built with laravel and made for developers
  16. That's why having it a string would be better, don't need to deal with these issues.
  17. It's said that char is 50% faster than varchar, I've never done any performance tests on it. Although if stored larger with varchar and the data is less, it will only use as large as the data is, so some space savings and room to breath, possible less problems (like if had a space and didn't trim, change in code,etc...).
  18. Stick with char(60) then, no sense doing as binary if is not binary data, would need to do string to binary conversions
  19. I use varchar(255) because mine vary in length If the values are always the same length go with char, if they will vary use varchar varchar will trim the spaces if is less characters than assigned, char will not and pad with spaces
  20. A tool for testing your htaccess rules online http://htaccess.madewithlove.be/
  21. I thought it would be a cool idea to have a member to member donation. Members could buy credits from this website using whatever payment method. 1 credit equals one US dollar The credits can be given to other members easily by clicking a donation button under their name. Would want to have a waiting period before a member can cash in the credits due to cancelled paypal and such.
  22. Smart programmers make computers not be dumb.

×
×
  • 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.