Emeka_2 0 Newbie Poster
Hi all,`
The below code is giving me problems.

$ddaa = $pdo->query("SELECT id, stockname, stockno, producer FROM storemaster order by stockname");;
while ($data = $ddaa->fetch(PDO::FETCH_ASSOC))
echo '<option value="'.$data['stockno'].'" data-producer="'.$data['producer'].'"> '.$data['stockname'].'</option>';
This is the script:
if($(this).val() !=0){
All I wanted from this code is when I click a stockname from the dropdown list, The stockno and producer textbox should be fetched.
But now only the stockno is fetched and the producer is null.
Please help out.
Thank you.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.