Jump to content

Immortal55

Members
  • Posts

    59
  • Joined

  • Last visited

    Never

Posts posted by Immortal55

  1. [a href=\"http://www.mitchanderson.zenaps.com/users.php\" target=\"_blank\"]http://www.mitchanderson.zenaps.com/users.php[/a]

    there is a link to my problem......There are 3 users in the table as of now they are, sadf, Mitch, and dtdt. Now Sadf shows up fine, the link and all, then Mitch shows up, but the link to his profile is all messed up, and dtdt dosent show up at all.....what is wrong???
  2. Ah, alright I fixed it, i did not have an id column.....

    But now I have it ordering by name:

    [code]
    $sql = mysql_query("SELECT * FROM users ORDER BY name DESC") or die(mysql_error());
    [/code]

    it shows every member in the DB except the newest added member. So if I have 3 members in the DB only two are shown in the list, if i add a new member, only 3 are show on the list...

    Why is this?
  3. When I try and get this script to run:

    [code]
    <?

    //View Artist List, links to profile.

              require_once('dbconnect.php');
              $conn = db_connect();
              $db = @mysql_select_db ("mitchand_studio", $conn)
                  or die ("Registration failure, try again.");
        
        $sql = mysql_query("SELECT * FROM users ORDER BY id DESC");

    //the above line would get all your users, and order them by their Id's
    // the loop below would then make a link for every user
            
        while($row = mysql_fetch_assoc($sql))
        {
        stripslashes(extract($row));
        
        echo '<a href="/profile/profile.php?user='.$uname.'>'.$uname.'</a>';
        
    }

    ?>
    [/code]

    I get this error: [b]Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/mitchand/public_html/users.php on line 15[/b]

    What is wrong?

  4. alright, so if I wanted to have links to user profiles from my db, where the table with the info is titled users, and in the table the names i want displayed are under 'uname' then would my script look like this:

    [code]
    <?

    $conn = db_connect();
    if (!$conn)
        return false;
        
        $sql = mysql_query("SELECT * FROM users WHERE
            uname = '{$_REQUEST['user']}'");
            
        while($row = mysql_fetch_assoc($sql){
        stripslashes(extract($row));
        
        echo '<a href="/profile/profile.php?user='.$uname.'>'.$uname.'</a>';
        
    }

    ?>
    [/code]

    if anything is wrong, please help me out.
  5. Alright, well if I was to do this, would it be possible for somebody to view the members page, even when not logged on? If they could view the persons page, how would it be possible for the profile.php page to load certain users information?
  6. When you make a user system on a website using databases and php, and you want users to have a 'user profile' does a page essentially have to be created when they register with the website, or what? If a page is created when they register, how do i go about doing that?
  7. Sorry, I was at work and was anxious, sorry again.

    Here is my register script:

    [code]
    <?
        if( (!$name) or (!$uname) or (!$pass) or (!$age) or (!$art) or (!$intrest) )
            {
            echo( "<center><b>New User Registration for Studio</b>
                    <br>
                    <form action='$PHP_SELF' method='post'>
                    <table cellpadding='0' cellspacing='0' border='0'>
                    <tr><td>Name:</td><td><input type='text' name='name' value='$name'></td></tr>
                    <tr><td>Username:</td><td><input type='text' name='uname' value='$uname'></td></tr>
                    <tr><td>Password:</td><td><input type='password' name='pass' value='$pass'></td></tr>
                    <tr><td>Age:</td><td><input type='text' name='age' value='$age'></td></tr>
                    <tr><td>Art Forms:</td><td><input type='text' name='art' value='$art'></td></tr>
                    <tr><td>Intrests:</td><td><input type='text' name='intrest' value='$intrest'></td></tr>
                    </table>
                    <br>
                    <input type='submit' value='Register!'></center>
                    </form>
                "); }
                
        else
            { $conn = @mysql_connect ("localhost", "mitchand_mitch", "spiffy")
                or die ("Registration failure, try again.");
              $db = @mysql_select_db ("mitchand_studio", $conn)
                  or die ("Registration failure, try again.");
              $sql = "insert into users
                      (name, uname, pass, age, art, intrest) values
                    (\"$name\", \"$uname\", \"$pass\", \"$age\", \"$art\", \"$intrest\")";
              $result = @mysql_query ($sql, $conn)
                  or die ("Registration failure, try again.");
              if($result)
                      { echo("Thanks, $name, you are now a member of Studio"); }
                    
                    }
                    
                    ?>
    [/code]

    Now, after a user fills out the registration, I want a folder to be created on the server entitled by thier user name. How would I do that?
  8. Alright I have a registration script and everything set up for my website. I am using sessions and all that jumbo. But one problem I am having, is when a user registers, I want a folder to be created based on the persons username that is entered in at registration under the value of '$uname'

    How is possible to create a folder with thier username as the folders name, and when the folder is created there is automatically a folder added entitled 'images' and an index file for the persons profile in the folder. I want the profile to be accustomed to the username.

    There will be a form in which the user can edit their information.

    thanks in advance.
×
×
  • 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.