Solved

Autocomplete form field using PHP and MYSQL

Posted on 2007-11-19
4
7,359 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
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 count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

739 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