User Profile

Collapse

Profile Sidebar

Collapse
ajaxbegins
ajaxbegins
Last Activity: Feb 6 '12, 05:13 PM
Joined: Jan 26 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ajaxbegins
    started a topic validate empty fields

    validate empty fields

    I have a form that populates data from database upon clicking on a fetch button and fills the other fields.
    It works fine fine with the exception that it should display an error message if it retrieves nothing. Can someone help me write the failure function.i.e if the form returns nothing when u click on the fetch button,it should display some kind of error message.

    Here is my code for form:
    Code:
    <input type="text"
    ...
    See more | Go to post

  • What would you suggest to find a way around it?
    See more | Go to post

    Leave a comment:


  • when i click on the fetch button the page just refreshes instead of fetching the other field. here is my updated code
    Code:
    <head>
    <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/redmond/jquery-ui.css">
    
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
    ...
    See more | Go to post

    Leave a comment:


  • I ll work on the injections part later. I am trying to get it worked first:

    Code:
    <?
    $name = $_GET['username'];
    $return = mysql_query("SELECT posts FROM user WHERE username = '$name' LIMIT 1");
    $name = $_GET['username'];
    $return = mysql_query("SELECT posts FROM user WHERE username = '$name' LIMIT 1");
    $rows = mysql_fetch_array($return);
    $formattedData = json_encode($rows);
    print
    ...
    See more | Go to post
    Last edited by Dormilich; Jan 27 '12, 06:22 AM. Reason: Please use [CODE] [/CODE] tags when posting code.

    Leave a comment:


  • auto fill remaining fields from the database

    What I need is, when the user fills his username and does one of the following:
    1.presses tab
    2.Presses enter
    3.clicks on a fetch button(fetch button does not exist now,i would like to know how to create it using javascript or anything else that suits my criteria)

    Once he does any of the above it should automatically generate the remaining fields from the database.
    The query would look like this:
    Code:
    $qry=mysql_query("SELECT
    ...
    See more | Go to post
    Last edited by Dormilich; Jan 26 '12, 10:13 PM. Reason: added more [CODE] [/CODE] tags
No activity results to display
Show More
Working...