Click here to Skip to main content
15,749,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I am a new learner. I have two tables: login and recharge of same database “registration”.

“login” table has name, address and mobile as a row and “recharge” table has mobile and amount as a row. I want mobile number list of “login” table should display as a drop down select list in mobile row of “recharge table so that i should not retype as text input. Someone please help me out .

What I have tried:

 error_reporting('E_ALL ^ E_NOTICE');
  mysql_connect('localhost','root','') or die(mysql_error());
  mysql_select_db('registration') or die(mysql_error());

$q=mysql_query("select * from recharge where reg1='".$reg1."'or date='".$date."'  or mobile='".$mobile."'
or amt='".$amt."'or pbal='".$pbal."'or cbal='".$cbal."'") or die(mysql_error());

$insert=mysql_query("insert into recharge values('".$reg1."','".$date."','".$mobile."','".$amt."','".$pbal."','".$cbal."')") or die(mysql_error());
    $er='Registered successfully';

    $er='Not Registered';



<div class="contact">

<div id="er"><?php echo $er; ?></div>
<table width="963" align="center" id="tbl"><tbody><tr><td width="224"> REGISTRATION NUMBER :</td><td width="252"></td><td width="224"> DATE :</td><td>
  $(function() {
    $( "#datepicker" ).datepicker();

</td></tr><tr><td> MOBILE NUMBER :</td><td></td><td>STOCK RECHARGE AMOUNT : </td><td></td></tr><tr><td> PREVIOUS BALANCE :</td><td></td><td> CURRENT BALANCE : </td><td></td></tr><tr><td></td><td></td></tr></tbody></table>
Updated 3-May-17 12:42pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900