Jump to content

xriokax

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

xriokax's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello I have the following code that validates my form prior to saving...among other things, it checks to make sure the field "claim_num" is not blank. How can I change this code so I can verify if the field "claim_num" has a minimum of 7 characters? Thanks Paul if ($('#claim_num').val() == "" || $('#loss_date2').val() == "" || $('#ucr').val() == "" || $('#loss_type2').val() == 0 || $('#causecode2').val() == 0 || $("#claim_status2").val() == "") { $('#err_msg').hide('slow').show('slow'); } else { $('#err_msg').hide('slow'); $('#event_type').val('save'); $('#claim_add_frm').submit(); } }
  2. Hello All I currently have a function that takes in user input from form fields $email & $password. If all is well the function logs the user in, if not redirects back to the login form. What I require is two things. 1) Allow the user to login with either "email" or "username" (entered in the $email form field). 2) Allow the system to have a "master" password and if that is entered with a valid email or user from above then log that user in. Here is my current function, any help is greatly received. Regards function loginMember($email,$password,$returnURL){ if ($email != "" && $password != ""){ $result = mysql_query("SELECT mid,memberid,forename,surname FROM tbl001_member WHERE emailaddress='$email' AND password='".$password."' AND online=1"); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_row($result); $_SESSION["logged_user"] = $row[2]." ".$row[3]; $_SESSION["logged_id"] = $row[0]; $_SESSION["logged_memid"] = $row[1]; session_unregister('wrong_email'); if (isset($_SESSION["logged_user"])) { header('Location:'.$returnURL); exit; } } else { session_register('wrong_email'); $_SESSION['wrong_email'] = $email; return "* There is no registered account with typed email & password."; } } else { session_register('wrong_email'); $_SESSION['wrong_email'] = $email; return "* Please input email and password correctly."; } }
  3. Hello I have the following function that loops through and displays all the months Jan thro to Dec with values 01 thro 12. What I really want to do is add in the year and only have entries from 05/2010 thro xx/xxxx (current month) so my list would look like as follows... "05/2010"=>"05/2010" "06/2010"=>"06/2010" "07/2010"=>"07/2010" ...and add to this list as we progress through the months and years. function ddlProcessMonth($current){ print("<select id=\"month\" name=\"month\" class=\"select-box\"><option value=\"\">ALL</option>"); $month_arr = array("01"=>"January", "02"=>"February", "03"=>"March", "04"=>"April", "05"=>"May", "06"=>"June", "07"=>"July", "08"=>"August", "09"=>"September", "10"=>"October", "11"=>"November", "12"=>"December"); while(list($key,$val)=each($month_arr)) { if ($current == $key) print("<option value='$key' selected='selected'>$val</option>"); else print("<option value='$key'>$val</option>"); } print("</select>"); }
×
×
  • 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.