Hi I am working on Project.
I want value from MySQL DB in Second input field on input of code in first input field.
Is it possible?
ayesha789
7
Posting Pro in Training
Recommended Answers
Jump to PostGo through the follwing code carefully. I have not used ajax here. Its simple php/javascript. I am assuming that your code,mf table is very small so i am storing its values in a javascript array, and using it for calculation. If your table is very large then u must learn …
Jump to PostYou mean your code-mf table is having 5500 rows.
Jump to PostYes you can add that in your query:
$result=mysql_query("select mf from mytable where code=$code");
But your issue is how to pass the code from javascript to php r8?
Jump to PostI am using basic ajax. Now you have to create one php file getmf.php in the same folder where your current file is saved. copy following code to it. set database connection properly
<?php //set data base connection $result=mysql_query("select code,mf from mytable where code='{$_REQUEST['code']}'"); $row=$mysql_fetch_array($result); echo $row['mf'];//return …
Jump to PostI too expecting a solution to pass javascript variable to php code!!!!
All 26 Replies
urtrivedi
276
Nearly a Posting Virtuoso
ayesha789
7
Posting Pro in Training
urtrivedi
276
Nearly a Posting Virtuoso
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
rajarajan2017
ayesha789
7
Posting Pro in Training
urtrivedi
276
Nearly a Posting Virtuoso
rajarajan2017
ayesha789
7
Posting Pro in Training
urtrivedi
276
Nearly a Posting Virtuoso
ayesha789
7
Posting Pro in Training
urtrivedi
276
Nearly a Posting Virtuoso
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
urtrivedi
276
Nearly a Posting Virtuoso
fizanos
0
Light Poster
ayesha789
7
Posting Pro in Training
urtrivedi
276
Nearly a Posting Virtuoso
ayesha789
7
Posting Pro in Training
fizanos
0
Light Poster
urtrivedi
276
Nearly a Posting Virtuoso
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.