Search Results

Search found 3 results on 1 pages for 'user323941'.

Page 1/1 | 1 

  • jquery function val() is not equivalent to "$(this).value="??

    - by user323941
    When I try to set a text input to blank (when clicked) using (this).value="", this does not work. I have to use $(this).val(''). Why? What is the difference? what is the mechanism behind of val function in jQuery? quote: $(document).ready(function() { $('#user_name').focus( function(){$(this).val('');} ); }); //error code: not working... $(document).ready(function() { $('#user_name').focus( function(){$(this)value='';} ); });

    Read the article

  • Cannot insert into SQLite database through php PDO

    - by user323941
    Pls help see what is wrong.... (I test the db connection is fine) <?php $user_name=$_POST['user_name']; $password=$_POST['password']; $dbh=new PDO('sqlite:./db/user.db') or die("fail to connect db"); try{ $stmt = $dbh->prepare("INSERT INTO user_info VALUES (?, ?)"); $stmt->bindParam(1, $a); $stmt->bindParam(2, $b); $a=$user_name; $b=$password; $stmt->execute(); } catch(PDOException $e) {echo $e->getMessage();} ?>

    Read the article

1