Jump to content

inamul70

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

inamul70's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Dear all I m looking to to split string in two different variable which will split by '~'.. like i have sring " This is not I would like to do ~ what do you mean" var1 = "This is not I would like to do" var2 = "What do you mean" Thanks
  2. I am having two tables. Order and grademaster.. In grademaster table i have two fields 'packing' and 'condition'.. I am using php mysql and ajax. If a person select grade value of packing and condition should be autopopulate in the textboxes.. I have successfully loaded value of one textbox through php ajax but the second text box cannot accept values. I have tried calling two functions from onchange() but no result.. Please suggest me how can i populate two text boxes from one ajax selection. my code below //javascript <script type="text/javascript"> function showUser(str) { if (str=="") { document.getElementById("txtHint").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","getgradepacking.php?q="+str,true); xmlhttp.send(); } </script> <div> <label>Packing <strong>*</strong></label> <textarea id="txtHint" name="txtpacking" id="txtpacking" cols="42" rows="4"></textarea> </div> //getgradepacking.php <?php $q=$_GET["q"]; include('includes/connect.php'); mysql_select_db($Db, $link); $sql="SELECT * FROM grademaster WHERE gradeid = '".$q."'"; $result = mysql_query($sql); $row = mysql_fetch_array($result); $packing = $row['packing']; echo $packing; ?>
  3. Anyone please provide me good examples of php database classes. with usage examples. Thanks
  4. How to update table records one by one.... I have a table with five records .. I am getting values of month from another function..I would like to fill the values of month into the table.(like jan feb mar april may) respectively in the first row instead of Average. my code is below $insquery = "select * from reporttmp"; $insresult = mysql_query($insquery, $link) or die("Error in sql sytax."); $fel=mysql_num_fields($insresult); $nro=mysql_num_rows($insresult); $i=1; if ($nro > 0) { while ($i < $nro - 1) { $monname = getmonthname($fmonth); $monname = $monname. " ". $fyear; $upquery = ("UPDATE reporttmp SET vdate ='$monname' where mysql_num_row($insresult)=$i"); if(!mysql_query($upquery, $link)) die ("Mysql error ....<p>".mysql_error()); $fmonth = $fmonth + 1; $i = $i + 1; } } [attachment deleted by admin]
×
×
  • 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.