Jump to content

Recommended Posts

Hi everyone i am trying to do this , but i have no idea , any clues or source that i can look for?

 

I have 2 fields , serialno and cardname

So when i type 3 serialno in a textbox. eg. 1500,1600,1700

it will then retrieve data from php to display the cardname of the serialno .

 

eg. from 1500,1600,1700 into John,Paul,Timmy

 

anyway i am doing it in flash , but i want to write the codes in .php

,but i am not very sure

all i know is i going to do a :

Split<|> to have ","

an array and a for loop 

 

anyone can help me?

 

Link to comment
https://forums.phpfreaks.com/topic/166925-retrieve-data-from-single-textbox/
Share on other sites

For those who don't understand:

 

i have this textbox inside my flashfile

i created 2 fields in MYSQL database - serialno and cardname

when i type in the textbox "1500, 1600, 1700" (serialno) ,

it will then change to "tom, dick, harry" which is the (cardname)

 

because beforehand i registered in MYSQL

1500 = tom

1600 = dick

1700 = harry

 

Hi sir , thanks a lot for replying

the part that i dont know how to do is

from "1500, 1600, 1700" it will turn to "tom, dick, harry" in the textbox

 

i think it works like a search engine that search keywords in MYSQL database.

 

if i search "1500" , results will be "tom"

 

i am not very well versed in PHP/Flash , i am actually looking for tutorials clues on what shall i do :(

 

thanks a lot !

If you have stored name for that specific number in database, then that is more easy to implement.

Lets say, 1500 is for tom.

Run a query, get the desired results from it. Do u have any sort of query to do that?

then use if statement:

if ($serial[0] == $name){
$name1= $name;
}

 

OR if have saved that names also like the numbers, you can use explode function to separate it and then compare it as i write above.

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.