huzaifa.iu's Profile
Reputation: 3
Apprentice
- Group:
- Active Members
- Active Posts:
- 62 (0.07 per day)
- Joined:
- 13-December 10
- Profile Views:
- 1,509
- Last Active:
Apr 18 2013 06:54 AM- Currently:
- Offline
Previous Fields
- Country:
- Who Cares
- OS Preference:
- Who Cares
- Favorite Browser:
- FireFox
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- Playstation
- Your Car:
- LandRover
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: Populating Autocomplete List From Database
Posted 2 Feb 2012
OK thanks. I got the codes in separate files, and now I even get the print_r($productNames) result as this:
Array ( [0] => Array ( [0] => Dell Inspiron [product_name] => Dell Inspiron ) [1] => Array ( [0] => SanDisk 8GB [product_name] => SanDisk 8GB ) [2] => Array ( [0] => SanDisk 4GB [product_name] => SanDisk 4GB ) )
But, the option list is still not getting populated, and shows the same "Array" item instead of the actual name of the item. -
In Topic: Attach audio file to an EXE file.....
Posted 2 Feb 2012
When you Deploy/Build the EXE file, you can select the resources you want to be deployed along with your program. That way, the MP3 will be copied on the system of whoever runs/installs your EXE file. -
In Topic: Populating Autocomplete List From Database
Posted 2 Feb 2012
CTphpnwb, on 02 February 2012 - 09:10 PM, said:I think you're suffering from the confusion created by mixing HTML and PHP. You need to understand that they're processed on different machines at different times. Mixing them doesn't change that fact.
When your page is first displayed there is no post value, so PHP calls:
$productsCrud->GetProductNames("");
Oh alright, that gets rid of the "products" index error, but then how do I get the ajax to send the data to the file AFTER the event has been triggered? Cause once the page is loaded, it runs all the script inside I suppose. Please look at the ajax part of my code, do you find any problem in there? I am still learning AJAX so I am not that good at that yet. So if you could guide me it would be great. -
In Topic: Populating Autocomplete List From Database
Posted 2 Feb 2012
KingCuddles, on 02 February 2012 - 08:41 PM, said:Hmm print print_r($productNames) shows nothing? Surly it should show the results from the database as an array.
I don't see any check to see if $productNames is actually not just an empty result?
Also try:
foreach ($productNames as $pN) { echo "<option value='" . $pN . "'>" . $pN . "</option>"; var_dump($pN); }
It still didn't show anything. However, I did this change in the function but now I only get the first entry from the database. Other entries are all blank.
$dsProduct = $db->Execute($query); $product = array(); $i=0; while($rProduct = $dsProduct ->FetchRow()) { $product[$i] = $rProduct[$i]; $i++; } return $product; -
In Topic: Populating Autocomplete List From Database
Posted 2 Feb 2012
My Information
- Member Title:
- D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
-
- Full Name:
- Echh Emm
Contact Information
- E-mail:
- Private
Friends
|
|


Find Topics
Find Posts
View Reputation Given

|
Comments
huzaifa.iu has no profile comments yet. Why not say hello?