Hello every one.
I am stuck in a place. I am entring medicine record in a table. That's most possible that medicine may exceeds from the rows i am providing. I would like to be assist how can i add new new with a hyperlink text. Also how this row will be added to a php insert script. so faar i have just designed the front.end page.
Please see the attachement of .png file of that page in browser here with this article so that you might get a bit clear idea what i mean.
Hi Aamir Karim,
I'm still not clear, is't the Medicine table will fill up with the data and to be stored in database when Submit button clicked ? And if the row of the table not enough, then you want to click the link below to add the another row right ?
If you say so, maybe you can use the Ajax to call the another php file to create the another row below.
To save the data in database use either Ajax as diprofinfiniti suggested or just process the form by submitting it usual way.
Thanks @diprofinfiniti and broj1
Diprofinfiniti. You are getting my point corrent. That's what I need. Someone told me that you can use array which may store n numbers of rows you need. Kindly give me example for aaray in php. Thanks again.
I hvae studied the code and applied. Its working fine but I need that new row and cells should be inserted at the end of the table but it is appearing on the top row of the table above other rows. Please help me where should i make changes that the new row should appear below to the other rows?
<table id="myTable" border="1">
<button type="button" onclick="displayResult()">Insert new row</button>
Thanks. Its working. Just changed the index of row on line 5 from "0" to "my required number"
There are already 5 rows in my table. So if i have to enter an additional row. It'l be on 6th number. And we know that these indexd number in any computer language starts from 0, that's why i took 5 in braces when i need a row on 6th number.