Jump to content

Search the Community

Showing results for tags 'user'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 8 results

  1. User Validation PHP + JavaScript

    Hi guys! I've been working on a login form and I have some problems to validate the input data, I need to consist if the login and password fields aren't with spaces or no allowed characters, for this I've been used JavaScript for client-side validation, but if the fields are Ok, I need to call my php function to see if the user and pass are on mySQL database. I don't know how to "call" the php after the JavaScript validation. If someone could help me I will be thankful.
  2. JavaScript username checker.

    Hi, I'm trying to let JavaScript check if a givin user exist in the database. It seems that the _check-user.php always returns 0, but if I fill in a name that doesn't exist, and echo out the result variable in JS, the echo will return 1. Is there someone who could help me? JavaScript part: function checkUser() { $.post("_check_user.php", { 'username': document.getElementById("username").value }, function(result) { if (result == 1) { document.getElementById("checkUser").className = "succes"; document.getElementById("checkUser").innerHTML = "Name is available"; }else{ document.getElementById("checkUser").className = "errormsg"; document.getElementById("checkUser").innerHTML = "Name is not available!"; } });} _check-user.php: <?phpinclude("config.php");$result = mysql_query("SELECT login FROM users WHERE login='".clean_string($_POST["username"])."'");if(mysql_num_rows($result)>0){ echo 0;}else{ echo 1;}?>
  3. Geolocation wont work!

    I am using chrome. why the geolocation wont showing getLocation i checked on my advance setting there is no necessarily checkbox "Send a "Do Not Track" request with your browsing traffic" I am not sure what excalty the file will go through from the document.getElementById("demo"). I checked at http://www.w3schools.com/html/html5_geolocation.asp it does not help me please help me to success what did i wrong anyone who have experienced this problem before thanks! btw, I am using IDE note++ here the code is <!DOCTYPE html> <html> <body> <p>Click below to get your coordinates:</p> <button onclick="showLocation()">Click</button> <script> var x = document.getElementById("demo"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else{x.innerHTML = "Geolocation is not supported by this browser.";} } function showPosition(position) { x.innerHTML = "Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude; } </script> </body> </html>
  4. I'm trying to implement the sliding transparent overlay on my sight but I'm having a problem with the positioning of the DIV. When the window is re-sized the div does not retain relativity to the menu items above. Can someone give a pointer as to how this can be achieved? This is what I'm trying to emulate.......http://www.daphnes-restaurant.co.uk/general-information/ Here's my website.........http://www.galu.co.uk/newsite/goforitg.html The yellow box remains relative to the red box but when my window is re-sized I would like the red box to be left align to the window so the users can see easier. A kind of "left align object on window re-size. If that makes sense.
  5. Registering users in website?

    Hello, I am Ankan. I have recently started learning web designing. I have come up with the idea of a new website, don't want to reveal it now!I just want to know that if i am creating a site that can allow users to register/sign up, then what are the languages should i need to know to make such a website. Please help me regarding the registration part, by telling me the programming languages i need to know, and a brief description of what they are used for. Thank You!Please reply soon!
  6. I have been developing a php web site. I have been trying to follow suggested best practices. I am running ubuntu minimalist install, and installed the following packages: nginx php5 php5-fpm postgresql phppgadmin php5-gd I have nginx up and running instead of apache.I have done some basic configuration for nginx.got my vhost setup and linked. and I am now able to browse my php pages on my local test machine running ubuntu. I have created my postgre database, and have a user setup. So I am to the point that I wanted to create a page to register/login/change password. I searched and found http://stackoverflow...asswords-safely it was posted back in 2010, it links to this guide using phpass: http://www.openwall....Users-Passwords The guide/tutorial was created using Mysql, I have been swapping out functions to their equivalent postgresql functions using the postgresql documentation. I modified the guide to the point that I can create new users in my postgre database. When I got to the point "How to authenticate existing users" I hit a snag. mysql version from guide: } else { $hash = '*'; // In case the user is not found($stmt = $db->prepare('select pass from users where user=?'))|| fail('MySQL prepare', $db->error);$stmt->bind_param('s', $user)|| fail('MySQL bind_param', $db->error);$stmt->execute()|| fail('MySQL execute', $db->error);$stmt->bind_result($hash)|| fail('MySQL bind_result', $db->error);if (!$stmt->fetch() && $db->errno)fail('MySQL fetch', $db->error); if ($hasher->CheckPassword($pass, $hash)) {$what = 'Authentication succeeded';} else {$what = 'Authentication failed';}unset($hasher);} my version: } else { $hash = '*'; // In case the user is not foundpg_prepare($dbconn, "quser", 'SELECT pass FROM users WHERE pk_users=$1') or fail('pg_prepare failed ',pg_last_error($dbconn));$hashx = pg_execute($dbconn, "quser", array($user)) or fail('pg_execute failed ',pg_last_error($dbconn));$hash = pg_fetch_result($hashx, 1, 'pass'); if (!$hash && pg_last_error($dbconn))fail('pg_execute failed.2 ',pg_last_error($dbconn)); if ($hasher->CheckPassword($pass, $hash)) {$what = 'Authentication succeeded';} else {$what = 'Authentication failed';$op = 'fail'; // Definitely not 'change'} I think it has to do with bind_result($hash) I used $hashx = pg_execute() I assumed it would take the results of pg_execute() and store it in the $hashx variable, and I thought that was what bind_result($hash) was doing in the mysql example. here is the error from the server logs: 2013/02/15 19:01:12 [error] 16860#0: *1 FastCGI sent in stderr: "PHP message: PHP Warning: pg_fetch_result(): Unable to jump to row 1 on PostgreSQL result index 5 in ..../testing.com/public/inc/user-man.php on line 91" while reading response header from upstream, client: 192.168.1.150, server: testing.com, request: "POST /inc/user-man.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "testing.com", referrer: "http://testing.com/inc/user-man.html" Also if anyone has any input weather or not this is still best practice for user registration/password security, please let me know. In addition to having a good user/password system I know that I am going to need to recheck my configuration for both nginx and postgresql to make sure everthing is locked down and secure, as well as user permissions, I have not looked for any info/guides on any of this yet. Thanks so much for any responses, I appreciate it.
  7. Hi i'd like to ask a question about adding a user from phpmyadmin > privileges, cause i haven't totaly cleared this in my mind.Could you tell me in which exactly cases should i do this? is it something i should always do? I've seen many people do this.Personaly what i 'm used to doing is, if for example i have a membership site, with administrator(s), moderators and simple users, i have a table in my database named users and in this i have a collumn named admin, which is 0 for simple users, 2 for moderators and 1 for administrator etc etc.Is this (my way) the same to the one i'm refering to, or not?
  8. The idea:The idea is to automatically fill the fields with "user@mail.com" and "password" if they're left blank. The problem:Well, the Javascript check is working and doing what it is supposed to. However, if the user adds a value, and then erases that value leaving the input empty, the script doesn't detects the field as empty... although the value returned is indeed empty like "". The code: function loginFormToggleFillers(element){ var loginF = document.loginForm.login; var user = loginF.value; var passwordF = document.loginForm.password; var password = passwordF.value; if(element){ el = element.attributes["name"].value; if( el == "login" ){ if ( user == "" || user.length == 0 ){ loginF.setAttribute("value", "user@mail.com"); } if ( user == "user@mail.com" ){ loginF.setAttribute("value", ""); } } else if ( el == "password" ){ if ( password == "" || password.length == 0 ){ passwordF.setAttribute("value", "password"); } if ( password == "password" ){ passwordF.setAttribute("value", ""); } } } else { if ( user == "" || user.length == 0){ loginF.setAttribute("value","user@mail.com"); } if ( password == "" || password.length == 0){ passwordF.setAttribute("value","password"); } }}loginFormToggleFillers(null); The HTML call (wrote by hand, so there might be a mistake somewhere... but it's just the idea): <input type="text" name="login" onFocus="loginFormToggleFillers(this)" onBlur="loginFormToggleFillers(this)" /><input type="password" name="password" onFocus="loginFormToggleFillers(this)" onBlur="loginFormToggleFillers(this)"/> Any ideas on this? Thanks in advance!
×