jd2007 Posted August 11, 2007 Share Posted August 11, 2007 $db=$_GET[db]; $query2="use $db"; $result2=mysql_query($query2); $sql = "select * from $_GET[t]"; $result2 = mysql_query($sql); $num=mysql_num_rows($result2); $r=0; $c=0; //$arr=array(); echo "<script src='myareaajax.js'></script><table border=1><tr>"; for ($b=1; $b<=$num; $b++) { $sql2 = "select * from $_GET[t] where id='$b'"; $result4 = mysql_query($sql2); while ($record = mysql_fetch_assoc($result4)) { while (list($fieldname, $fieldvalue) = each ($record)) { $c++; echo "<td><input type=text name=$c value=$fieldvalue /></td>"; $arr.=$fieldvalue."/"; echo $arr; } echo "</tr>"; } $r++; } /* foreach ($arr as $f) { $o.=$f."/"; }*/ $table=$_GET["t"]; echo "</table>"; echo "<input type='hidden' name='c' value='$c' />"; echo "<input type='hidden' name='r' value='$r' />"; echo "<input type='hidden' name='t' value='$t' />"; echo "<input type='hidden' name='db' value='$db' />"; echo "<input type='button' value='Update' onclick=my_area('update.php','db=$db&arr=$arr&t=$t&c=$c&r=$r','3') />"; echo "<br />"; // How do i get the value of this text box : echo "<td><input type=text name=$c value=$fieldvalue /></td>"; i used the $fieldvalue, but if i use this, i dont get the new value of the text box if the user changes the value ? Quote Link to comment https://forums.phpfreaks.com/topic/64371-how-do-i-get-the-value-of-the-text-box-in-the-code-below/ Share on other sites More sharing options...
mmarif4u Posted August 11, 2007 Share Posted August 11, 2007 Did ur script redirect after updaing the value.Mean when user update the field. Quote Link to comment https://forums.phpfreaks.com/topic/64371-how-do-i-get-the-value-of-the-text-box-in-the-code-below/#findComment-320977 Share on other sites More sharing options...
jd2007 Posted August 11, 2007 Author Share Posted August 11, 2007 no, actually, i'm sending the values through ajax call Quote Link to comment https://forums.phpfreaks.com/topic/64371-how-do-i-get-the-value-of-the-text-box-in-the-code-below/#findComment-320978 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.