zgkhoo Posted August 18, 2007 Share Posted August 18, 2007 <html> <body> <table width="935" height="759" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="215" height="61"><form name="form3" method="post" action=""> <p> <input type="submit" name="Submit3" value="Add"> <input type="submit" name="Submit4" value="Modify"> <input type="submit" name="Submit5" value="Delete"> <input type="submit" name="Submit6" value="PrintOut"> <input type="submit" name="Submit2" value="Export"> </p> </form></td> <td width="760"><form name="form2" method="post" action=""> <input name="textfield" type="text" > <input type="submit" name="Submit" value="Go"> </form></td> </tr> <tr> <td height="411" align="left" valign="top"><form name="form4" method="post" action=""> <table width="198" height="156" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="81">Game Serial No</td> <td width="117"><input name="textfield2" type="text" size="15"></td> </tr> <tr> <td>Game Code</td> <td><input name="textfield22" type="text" size="15"></td> </tr> <tr> <td>Password</td> <td><input name="textfield23" type="text" size="15"></td> </tr> <tr> <td>Point</td> <td><input name="textfield24" type="text" size="15"></td> </tr> <tr> <td>Exp. Day </td> <td><input name="textfield25" type="text" size="15"></td> </tr> <tr> <td colspan="2"><input type="submit" name="Submit7" value="OK"> <input type="submit" name="Submit8" value="Cancel"></td> </tr> </table> </form></td> <td align="left" valign="top"><form name="form1" method="post" action=""> <p> <textarea name="textarea" cols="100" rows="50">Game Serial No. | Game Code | Password | Point | Exp. Day |</textarea> </p> </form></td> </tr> <tr> <td> </td> <td> </td> </tr> </table> </body> </html> how to make the form1 text area able to display data in a list format from mysql database, and also able to respond to my "delete" and "modify" button ..thanks.. Quote Link to comment https://forums.phpfreaks.com/topic/65559-textarea-respond-to-button-action-problem/ Share on other sites More sharing options...
markjoe Posted August 18, 2007 Share Posted August 18, 2007 You can print (or 'echo') data with whatever formatting you want between the textarea tags. <textarea name="textarea" cols="100" rows="50"><?php while($row=mysql_fetch_row($result)){ echo $row[0]."<br>"; } </textarea> I'm not sure I understand the second part of the question. To make the text field 'respond' to the button...I'll take a stab here. Write a script that responds the way you want it to depending on what button was clicked, and print the results in the textarea. Quote Link to comment https://forums.phpfreaks.com/topic/65559-textarea-respond-to-button-action-problem/#findComment-327378 Share on other sites More sharing options...
beboo002 Posted August 18, 2007 Share Posted August 18, 2007 we wanna know wht is problem with delete and modify ??? Quote Link to comment https://forums.phpfreaks.com/topic/65559-textarea-respond-to-button-action-problem/#findComment-327398 Share on other sites More sharing options...
zgkhoo Posted August 18, 2007 Author Share Posted August 18, 2007 not problem, is i duno how to write a delete /modify function using this textarea. i wanna write a delete/modify function which i can highlight the recordset in the textarea and then click delete button to delete the recordset and those data disappear in the textarea. know what i meant? thanks. Quote Link to comment https://forums.phpfreaks.com/topic/65559-textarea-respond-to-button-action-problem/#findComment-327405 Share on other sites More sharing options...
MadTechie Posted August 18, 2007 Share Posted August 18, 2007 have the record ID as a hidden field or something, then when you click the (update/delete) button you can either DELETE FROM table WHERE ID = $id; or UPDATE table SET field1 = '$text1' etc have a go and post back your solution so far if you have problems Quote Link to comment https://forums.phpfreaks.com/topic/65559-textarea-respond-to-button-action-problem/#findComment-327415 Share on other sites More sharing options...
zgkhoo Posted August 18, 2007 Author Share Posted August 18, 2007 any tutorial site or sample code? or what should i type in google for research this method thanks for ur help Quote Link to comment https://forums.phpfreaks.com/topic/65559-textarea-respond-to-button-action-problem/#findComment-327460 Share on other sites More sharing options...
MadTechie Posted August 18, 2007 Share Posted August 18, 2007 try a search for php & sql tutorial.. Quote Link to comment https://forums.phpfreaks.com/topic/65559-textarea-respond-to-button-action-problem/#findComment-327470 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.