Jump to content

cmgmyr

Members
  • Posts

    1,278
  • Joined

  • Last visited

    Never

Posts posted by cmgmyr

  1. I agree. Good point!

    Just remember that there are all different kinds of levels here. Just because the solution might be obvious to you doesn't mean it makes sense or is obvious to the person that made the post.

    The world needs a little more compassion and understanding in it…let’s not put down a fellow programmer (or person) because that person could help YOU out someday.

    …food for thought
  2. 1. Very interesting concept I think a lot of new web/database builders will check out something like this to get a "good" example of where to start.

    2. I do like the layout, it's pretty simple. I think you could do a lot more with it, but it looks fine as-is. You do have one xhtml error and a bunch of css warnings...but none really a big deal. It would be nice to clean those up though.

    3. Thats a good question. I would say get it out on as many web, databse, mysql sites as you can and get more scripts on there. Once you are a "valuable resource" new users should be easy to come by.

    -Chris
  3. I have the same type of set up for one of my sites - syracusebands.net my user profile page is profile.php

    my .htaccess[code]RewriteEngine  on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([^/\.]+)/?$ profile.php?moduser=$1 [L][/code]

    I'm using the moduser as the "username" at the end of the url

    On the top of my profile.php page I have: [code]if(isset($moduser)){
    $query = "SELECT * FROM users WHERE moduser = \"$moduser\"";
    $result = mysql_query($query) or die('Query mod failed: ' . mysql_error());
    $userid = mysql_result($result, 0, 'userid');
    }[/code]

    and that passes the userid down through the rest of the script for the other queries.

    So my page... www.syracusebands.net/admin acts the same as www.syracusebands.net/profile.php?userid=1

    I hope this helps you out.

    -Chris
  4. try putting spaces before and after the word that you want to search for, then just replace it with a space. Maybe something like this: [code]$search = str_replace(' and ', ' ', $search);[/code]

    But just with 2 arrays...

    This would make sure the item that you were searching for is an actual word and not a letter.
  5. [quote author=Nameless12 link=topic=123688.msg514519#msg514519 date=1169862784]
    It is easy to figure out problems, "getting it to work" is never the best solution. I find beginners tend to want stuff to just work. There are two types of problem solving

    1. the right way
    2. hacking away at the keyboard until it works <-- beginner way
    [/quote]

    But if you don't hack away at it, you might never get it to work. I feel that once you get it to work then you can ask youself "How can I make this better" THEN you can do it the "right" way...if there is such a thing. With programming there are hundreds of ways to do one thing and get the same output...who's to say which one is right?

    I'll stick with obsidians 1-5 system and give myself a 2 or 3. I've been using PHP for a while but it isn't until recently where I've wanted to actually program in it and use it as my own. I don't have any formal training or classes so all of my learning has been through reading book or online, looking at examples, talking to others (like on here), and "hacking" away at the keyboard until I can get something done the way that I want. Once I get to that point I ask myself "What else is out there that might make this better?"
  6. Hey everyone,
    I happened to come across this article and thought that I would share it with all of you. Hopefully it will help you out. BUT I would recommend this for learning or mockups ONLY. It is always better to make it yourself, but atleast this will start you off in the right direction.

    http://www.alistapart.com/articles/quickcssmockupswithphotoshop

    Hope this helps,
    -Chris
  7. This is another way to do it:

    [code=php:0]//find total records
    $query = "SELECT * FROM your_table";
    $result = mysql_query($query) or die('Query failed: ' . mysql_error());

    if (mysql_numrows($result) <= 0){
    echo "No Information Available";
    }else{
    // Printing results in HTML
    $x = 0;
    while ($x < mysql_numrows($result)):
    $name = mysql_result($result, $x, 'name');
    echo "<input name=\"foo[$x]\" type=\"checkbox\" id=\"foo[$x]\"/>$name<br />";
    $x++;
    endwhile;
    }[/code]
  8. [quote author=obsidian link=topic=124192.msg514201#msg514201 date=1169839314]
    [quote author=cmgmyr link=topic=123688.msg514183#msg514183 date=1169838078]
    wow, talk about getting off topic! haha ;)
    [/quote]

    What, you mean changing diapers doesn't attribute you to a higher level of programmer? ;) :P
    [/quote]

    That depends on if you actually wanted the outcome of your "program".  :D
  9. The best things to start with is to use id's for everything and don't duplicate data. For example when you put in your messaging service on your site, don't use username_to or username_from, use id_to and id_from. So instead of:

    To: danger2oo6
    From: cmgmyr

    it would be:

    To: 23
    From: 64

    ...or whatever numbers they are. Then you query the member name and whatever else you need. By making your database this way it will cut down a lot of space and your queries will be faster.

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