Jump to content

Recommended Posts

<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..

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.

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.

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.