How to put extension with a ? on it?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to put extension with a ? on it?

    Hey guys i'm creating a social network now my problem is when i want to put a link to another user's profile. say i want to click on a link
    Code:
    mysite/viewprofile.php?s3nzo
    which links to a user profile with the nick name of s3nzo how can i perform this?
    libra.wen.ru

    #2
    Well ,I wonder how you are creating ur social network if U cant do this simple task..By the way,do it this way
    PHP Code:
    <?php
    //lets say this is ur link to get user's nickname
    //http://adrazz.net/user_profile.php?id=10 This is our link
    //so lets get the username with the link

    if(!empty($_GET['id'])){
    //lets do few clean up.note its basic add more filtering

    $user_id=htmlentities($_GET['id']);
    $user_id=mysql_real_escape_string($user_id);

    //now lets query from the database

    $query_user=mysql_query("SELECT username FROM users WHERE id='$user_id';")or die(mysql_error());

    $user_data=mysql_fetch_array($query_user);

    //our user name
    $username=$_user_data['username'];
    }
    And we are done..Note,U have to add more stuff cos this is basic...

    Comment


      #3
      You obviously didn't understand my question which explains why you call it a simple task any way thanks for your effort
      libra.wen.ru

      Comment


        #4
        u need to work around that also you can't have any other action or other page in one header.

        but if you work around

        $? = $_GET["?"];
        $?(.*) = $_GET['?(.*)'];

        wild Card (.*)

        Make sure you clean up with html chapters
        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
        Visit: WapMasterz Coming Back Soon!
        _______
        SCRIPTS FOR SALE BY SUBZERO
        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment


          #5
          truthfully using modrewrite to make site.com/username and witout scorn i rilly dnt fink ur ready to undergo a project like dat, u'll regret the amount of holes u'll have like lava. If u really wana start sumtin huge like dat use a framework, half d jobs dun plus its optimized and unit tested. U mite argue u want sumtin dats 100% urs, bt if u dnt get it rite, trust me u wil regret it.

          Comment


            #6
            Originally posted by CreativityKills View Post
            use a framework, half d jobs dun plus its optimized and unit tested.
            Thanks bro i'm still waiting for kohana to approve my account
            libra.wen.ru

            Comment


              #7
              did u download it yet

              Comment

              Working...
              X