Solved

Autocomplete form field using PHP and MYSQL

Posted on 2007-11-19
4
7,357 Views
Last Modified: 2013-12-13
Hello Guy,

       I´m trying to use a text form field with autocomplete function (the data comes from mysql database). I tried to use the dmsautocomplete script but I cant get this script to work.

Could you help me to get this work?

Thanks,
//The form is this
//I´m using mysqli to connect to database and PHP 5
 
<form method='post' action='new_registry.php'>
 <table bgcolor='#cccccc'>
   <tr>
     <td>Nome do medicamento:</td>
     <td><input type='text' name='name' size=60 maxlength=128></td></tr>
   <tr>
     <td>Code Number :</td>
     <td valign='top'><input type='text' name='code_number'
                     size=10 maxlength=7></td></tr>
   <tr>
   <tr>
     <td>Code2 :</td>
     <td valign='top'><input type='text' name='code2'
                     size=5	maxlength=2></td></tr>
   <tr>
     <td>Quantity:</td>
     <td valign='top'><input type='text' name='quantity'
                     size=5 maxlength=6></td></tr>
   <tr>
     <td> Price :</td>
     <td><input type='text' name='price' size=5 maxlength=6></td></tr>
   <tr>
     <td colspan=2 align='center'>
     <input type='submit' value='OK'></td>
    </tr>
 </table></form>

Open in new window

0
Comment
Question by:alester
4 Comments
 
LVL 3

Accepted Solution

by:
seandolan earned 250 total points
ID: 20316844
0
 
LVL 21

Expert Comment

by:nizsmo
ID: 20319091
bearing in mind that if the speed is a factor (response), then autocomplete is probably not a good idea as retrieving from the server back and forth can be laggy and resource consuming.
0
 

Author Comment

by:alester
ID: 20340670
Thanks seandolan and nizsmo, i´ll see if seandolan solution works.
0
 

Expert Comment

by:lepricon
ID: 23361197
A good idea is to look at this PHP component, I use it in a number of projects and the performance is satisfactory

http://woork.blogspot.com/2008/03/php-components-autosuggest.html
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Detect Closed Loops (circles, figure-8s, etc) in PNG Images 6 56
Wordpress Security 29 47
Inserting data into database 10 34
Undefined variable problem 5 21
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question