Jump to content

mafazinfo

Members
  • Posts

    3
  • Joined

  • Last visited

mafazinfo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you for your suggestion, i'm not advanced user, please help me what was the wrong ?? i want to use input box name code1 typed text, should search sql recordset and display in textbox code2.value example : code1 input box if typed as D10 should display in code2 input box as DIAL 10 <?php echo $jval; ?> // its printing data <?php echo $fld1; ?> // its printing data <?php echo $abc; ?> // its printing data but sql quary not passing value
  2. i want to use input box name code1 typed text, should search sql recordset and display in textbox code2.value example : code1 input box if typed as D10 should display in code2 input box as DIAL 10 <?php echo $jval; ?> // its printing data <?php echo $fld1; ?> // its printing data <?php echo $abc; ?> // its printing data but sql quary not passing value
  3. <form name="form1"/> <input type="text" name="code1" value="D50" size="7" maxlength="10" onblur="chkidpro(this.value,'provider1');" /> <input type="text" name="code2" value="" size="7" maxlength="10"/> <form/> <script type="text/javascript"> var jvalue = form1.code1.value; <?php $abc = "<script>document.write(jvalue)</script>"?> </script> <?PHP $con = mysql_connect("localhost","abc_one","12345678"); mysql_select_db("abc_one", $con); $c= "D50"; $jval = $abc; $result2 = mysql_query("SELECT * FROM tblprocode where code='". $c."';"); $tab = mysql_fetch_array($result2); $fld1 = $tab['card']; $fld2 ='25'; mysql_close($con); ?> <?php echo $jval; ?> <?php echo $fld1; ?> PROBLEM IS IF I REPLACE VARIABLE $c FOR $jval WILL NOT WORK $result2 = mysql_query("SELECT * FROM tblprocode where code='". $jval."';"); ITS PRINT LIKE THIS <?php echo $jval; ?> PRINT AS D50 <?php echo $fld1; ?> NOTHING ITS BLANK IF I REPLACE VARIABLE $c FOR $jval WILL NOT WORK $result2 = mysql_query("SELECT * FROM tblprocode where code='". $c."';"); ITS PRINT LIKE THIS <?php echo $jval; ?> PRINT AS D50 <?php echo $fld1; ?> PRINT RECORD DATA
×
×
  • 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.