Jump to content


  • Posts

  • Joined

  • Last visited


Posts posted by cmgmyr

  1. in your .htaccess

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


    in your profile.php

    $username = $_GET['username'];
    //query DB for the username and get the user id


    this should get you started :)

  2. what you could do is have an "ad" directory on your server. In this you would have 1.html, 2.html, 3.html ...and so on. Each of these files would have just the image html for each banner.


    Then all you have to do is find a random number between 1 and 3 then include that file.

  3. I too use PNG's for icons. But over all I try and either use css/text to make buttons and links or else just use jpg's. There are way too many discrepancies between browsers for different transparencies...So I just don't deal with them unless I have to.

  4. You can do something like this:


    $sql = "SELECT username, email FROM users";
    $result = mysql_query($sql);
    while($row = mysql_fetch_array($result)){
    $username = $row['username'];
    $email = $row['email'];
    $body = "
    Hey $username,
    Just wanted to let you know that our site is up and running again...
    mail($email, "Site Re-Opening", $body, "From: YourEmail@domain.com");


    That should get you started atleast

  5. Another way you can do it is have your main object table and have that dictate what your sub-table id's are...then you really have 1 unique id to worry about



    id    type

    1    user

    2    note

    3    news

    4    user

    5    comment



    id    name

    1    test1

    4    test2



    id    title

    2    this is a test


    and so on...


    ...hope that makes sense :) It seems like this would keep you a little more organized and not worrying about more then 1 id.

  6. hey thanks for the reply. I just had to change your uery around for it to "work" but I'm still getting the same results.


    SELECT network.nid
         , network.userid
         , network.friendid
         , IF (owner.userid = 1, friend.username, owner.username) AS username
         , IF (owner.userid = 1, friend.level, owner.level) AS level
         , IF (owner.userid = 1, friend.main_image, owner.main_image) AS main_image
    FROM network
         LEFT JOIN users owner ON network.userid = owner.userid
         LEFT JOIN users friend ON network.userid = friend.userid 
    WHERE (network.friendid = 1 OR network.userid = 1) AND ap = 1


    I'm on MySQL 4.1.14 if that helps

  7. Here is a pretty sweet site that can help you out:




    You can take safari screenshots of your site in different sizes to see if everything is working right. You can also buy a membership for 3 days for $4 (other packages available) to give you a VNC connection to a LIVE mac so you can physically test it out.


    I tried it out for the 3 days and it was pretty cool. Not the fastest thing because I think you are connecting to Italy or something like that. But it works and you will be able to test your sites live. It's a cheap alternative to buying a mac...plus you will impress your friends by NOT having one ;) haha

  8. Hey all, I have a little bit of an issue with a query. I have 2 tables users and network

















    When a user adds another user into their network the sender is userid and the reciever is friendid. When it is approved each person shows up in one another's network. So the users.userid can either be network.userid or network.friendid


    Here is what I want...1 query that outputs the username, main_image, level, and nid of the other person in the network.


    Here is what I have so far:

    SELECT n.nid, n.userid, n.friendid, u.username, u.level, u.main_image FROM network n LEFT JOIN users u on (u . userid = n . userid) WHERE (n.friendid = $userid OR n.userid = $userid) AND ap = 1


    The problem is, is that if mine is the userid it shows my name and main_image. Is there a way to "scan" either userid or friendid and take the oposite one? I think I'm pretty close here.




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