Atli's Profile User Rating: *****

Reputation: 3811 Guru
Group:
Moderators
Active Posts:
6,692 (3.75 per day)
Joined:
08-June 10
Profile Views:
86,512
Last Active:
User is offline Yesterday, 01:31 PM
Currently:
Offline

Previous Fields

Country:
IS
OS Preference:
Linux
Favorite Browser:
Opera
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Toyota
Dream Kudos:
275
Expert In:
PHP, Databases, Web Development
Icon   Atli has not set their status

Posts I've Made

  1. In Topic: Apprenticeship Advice

    Posted 23 Apr 2015

    Hey.

    If you are a beginner you should just learn programming in general first. If somebody is willing to teach you web development, that's not a bad start. (Given that you're being taught proper techniques.) If you become competent at web development, you shouldn't find it very hard to switch over to mobile development.

    Learning languages is trivial. Anybody can do that in a matter of weeks. Learning how to use those languages to get something done - how to solve problems in a logical way - that's another thing entirely. That's the thing to focus on first, and you can do that in pretty much any language.
  2. In Topic: Prepared statements

    Posted 17 Apr 2015

    Why include the { and } in the actual search string?

    He's missing the quotes around the array element name, but apart from that I can't see a problem with what he does.
    $name = "%{$_POST['name']}%";
    
    
  3. In Topic: User Registration - Query leads to white screen.

    Posted 14 Apr 2015

    Your preg_match is still checking the $username variable you removed when you took out the sanitation. You need to replace that with the POST value.

    View PostMidgetlegs, on 14 April 2015 - 06:05 PM, said:

    I'm still confused how this works. bind_result puts the result of the query into, in this case, $usercheck, right? So what's the purpose of fetch?

    The bind_result method only associates variables with columns in the result set. It doesn't actually get any data. That's what the fetch method does.

    Consider that this is all designed assuming that the result of a query can contain more than one row. First you bind a variable to a column, then you fetch each row in a loop, wherein the bound variable contains the value for the current row.

    View PostMidgetlegs, on 14 April 2015 - 06:05 PM, said:

    And, would I be able to use an if($usercheck = "") to check for an available username?

    Sure, you could fetch the username and check if it returned a valid value.

    However, I would recommend a different approach. Databases like MySQL can easily figure this stuff out for you, and return to you a clear result. In this case, you can use the MySQL COUNT() function to have MySQL figure out how many users your query finds, and have it return whether or not it finds any matching rows. Then you could just use that boolean in your if condition.
    SELECT COUNT(*) > 0 FROM userTable WHERE username = ?
    
    

    bind_result( userExists )
    fetch()
    IF userExists :
        print "User exists!"
    
    

    (P.S. That's just pseudo code. I can't remember how MySQLi's function calls look exactly. Haven't used it for quite a few years; not since I discovered PDO)
  4. In Topic: URL Masking

    Posted 9 Apr 2015

    It's basically the same thing, through, when you think about it. The "Thank You" page could just as easily redirect the use to the download link, rather than email it.
  5. In Topic: Register Form using php

    Posted 8 Apr 2015

    What have you tried?

    There are literally millions of articles/blogs/forum posts about this available online. It's one of those things every single PHP developer does in their early days.

My Information

Member Title:
D.I.C Lover
Age:
28 years old
Birthday:
September 5, 1986
Gender:
Location:
Iceland
Full Name:
Atli Ţór Jónsson
Years Programming:
12
Programming Languages:
Mainly: PHP, SQL (MySQL, MSSQL, PostgreSQL), Web Development, (HTML, CSS, Javascript, jQuery).

Additionally: C#, VB.NET, Java, Node.js, ActionScript 3, LUA, C/C++, Python.

Contact Information

E-mail:
Private
Yahoo:
Yahoo  atli.jonsson@ymail.com
Twitter:
Atli_Thor

Comments

  • (2 Pages)
  • +
  • 1
  • 2
  1. Photo

    Anuraj23 Icon

    24 Nov 2012 - 00:43
    hi
  2. Photo

    Atli Icon

    21 Sep 2012 - 03:19
    Hey lyster. Please post questions like that in the forums. That's what they're there for.
  3. Photo

    lyster Icon

    21 Sep 2012 - 00:40
    i just can't figure out what are the possible tables,,i want to know normalization well..u_u
  4. Photo

    lyster Icon

    21 Sep 2012 - 00:34
    hi there mr. atli..i hope you could give me some advices and idea on how to make an erd on my mini mortuary_system,thanks god bless you..
    by the way im a student of a state college here in the philippines.
  5. Photo

    kimimimi Icon

    26 Aug 2012 - 00:37
    please help me
  6. Photo

    xenoslash Icon

    19 Jul 2012 - 23:35
    You are quite possibly the most helpful member of the community. I wish I could +1 you more than once for every long (and useful!) post you make.
  7. Photo

    Maryam.m Icon

    23 Jun 2012 - 10:52
    hey i understood what should i do!!!
    i'm so happy :D :D
    tnx
  8. Photo

    polyosis Icon

    11 Jun 2012 - 16:49
    I would like to thank you on your advice with my site path and installation problems, you are most kind my friend.
  9. Photo

    Atli Icon

    14 Apr 2012 - 05:22
    Yea it seems to like you, Dimitri ;)
  10. Photo

    DimitriV Icon

    08 Apr 2012 - 19:20
    Your avatar… it blinked at me.
  11. Photo

    Atli Icon

    06 Nov 2011 - 19:49
    Hehe. Thanks guys :)
  12. Photo

    Dogstopper Icon

    06 Nov 2011 - 19:19
    Lookin' a little blue there. Cheer up man! You're a mod! Congratz!
  13. Photo

    codeprada Icon

    06 Nov 2011 - 18:34
    It's about time. Congrats on reaching blue status.
  14. Photo

    n00l3 Icon

    05 Sep 2011 - 12:59
    Happy birthday! :D
  15. Photo

    cupidvogel Icon

    03 Sep 2011 - 23:06
    I can't seem to like your reply to my jQuery post an hour ago (fantastic explanation it was), because the Javascript in my browser is somewhat malfunctioning. I will like it later, ok?
  • (2 Pages)
  • +
  • 1
  • 2