Jump to content

mnaidis

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Posts posted by mnaidis

  1. I have this:

    <div class="buttonbar">
    <ul class="buttonbar"><li><a href="#general"><span>General</span></a></li> <li><span>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsphi</span></li></ul>
    </div>

     

    .buttonbar {
    background-color: #fff;
    background: -webkit-gradient(linear, left top, left 30, from(#f1f1f1), color-stop(4%, #ffffff), to(#f4f4f4));
    background: -moz-linear-gradient(top, #f4f4f4, #ffffff 1px, #f4f4f4 95%);
    width:400px;
    height:40px;
    border-radius:5px;
    -moz-border-radius: 5px; 
    -webkit-border-radius: 5px;
    border:3px solid #dedede;
    font-family:Tahoma;
    font-weight:bold;
    border:1px solid #dedede;
    color:#000;
    }
    
    ul.buttonbar li {
    width:80px;
    border-right:1px solid #000;
    background-color:#fff;
    height:40px;
    float:left;
    line-height:40px;
    color:#000;
    border-radius:5px;
    -moz-border-radius: 5px; 
    -webkit-border-radius: 5px;
    }

     

    And that's how it looks:

    help.jpg

    I want that the buttons will start like from the beginning of the bar, there is a gap behind the first button "General", how do I fix it?

  2. Hello, I got this code in the .js file:

                    "username": {
                        // HTML5 compatible email regex ( http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#    e-mail-state-%28type=email%29 )
                        "regex": /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/,
                        "alertText": "* Invalid email address"
                    },

     

    And I want to do that if the input is not in this form: "Hello_There", "Firstname_Lastname" (with the underscore in the middle) so it'll do

    "alertText": "* Incorrect username.

    "

     

    I don't know how to do that, can someone help me please? :)

  3. First....

     

    $uid = mysql_real_escape_string($_GET['uid']);

     

     

     

    Then...

     

     

    $d = "";

    $results = mysql_query("SELECT `username`,`level`,`email,`,`alevel`,`tester` FROM `users` WHERE `id`='$uid'");

    if(!$results || !mysql_num_rows($results))

    echo "No user.";

    while($d = mysql_fetch_assoc($results))

    {

    Actually.... are you establishing a connection anywhere?  mysql_connect() ??  Could explain why you're getting a boolean return instead of a resource.

     

    It still says:

    Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\learning\viewuser.php on line 22

     

    And it says that the user doesn't exist, and it does.

     

    And yeah, I have a connection.

  4. I got this code at the top:

    <?php
    require_once("configuration.php");
    $uid = $_GET['uid']; ?>
    

     

    And another main one:

    <?php
    if(isset($_GET['uid']))
    { 
    
    $d = "";
    $query = mysql_query("SELECT `username`,`level`,`email,`,`alevel`,`tester` FROM `users` WHERE `id`='$uid'");
    if(!mysql_num_rows($query))
    echo "No user.";
    while($d = mysql_fetch_assoc($query))
    {
    ?>
    &nbsp <b>Username:</b> <?php echo $d['username']; ?> <br />
    &nbsp <b>Level:</b> <?php echo $d['level']; ?> <br />
    &nbsp <b>Email:</b> <?php echo $d['email']; ?> <br />
    &nbsp <b>Admin level:</b> <?php echo $d['alevel']; ?> <br />
    &nbsp <b>Tester:</b> <?php echo $d['tester']; ?> 
    <?php } } ?>
    </font>
    </div>
    </center>
    
    

     

    Now I get this error:

    Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\learning\viewuser.php on line 20
    No user.
    Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\learning\viewuser.php on line 22

     

    How can I fix it?

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