Jump to content

Need Expert Advice regarding php trouble


jbrill

Recommended Posts

Im am putting together a small program for a client, part fo this program needs to be able to create steps/order of a job.

 

Basically, I need to be able to "add another step"

 

so lets say i have a table with the following fields that need to be filled and stored in the database:

text box : actual hours

drop down: category

drop down: sub category

text box: project time

text box: setup time

text area: proceedure

check box: complete

 

I am able to setup the above form, but i do not know how to have a link at the bottom of it for "add another step" upon clicking that link i need to be able to add the same table/form above, again, into another field in the table in the database.

 

and i need to be able to create about 15 steps total. The problem is, yes i could just make the table huge right form the start, example: project time1, project time 2 and so on. but i would like to only view one table/form first and then upon click "add another step" have another  become visible.

 

I dont even knwo where to start...

 

I would really appreciate some advice on this one! thanks!

 

 

Link to comment
https://forums.phpfreaks.com/topic/58487-need-expert-advice-regarding-php-trouble/
Share on other sites

You might want to consider adding another field to that database to represent the step # in a procedure.  Then for job #1 you may have step 1, 2, 3, and 4 (four records) and for job #2 steps 1-12 (12 records).  Retrieving a job procedure in full then needs you to select and display all records with the same job procedure #, ordered by task #.

I do not have any real sample code, i was hoping to get some ideas first.

 

here is an example of what the forms will look like though:

nope, thats the idea really im trying to come up with some ideas, and then generate some code.

<form id="form1" name="form1" method="post" action="">
<table width="100%" border="1">
  <tr>
    <td width="5%">
      <label>Actual Time</label></td>
    <td width="9%">Category</td>
    <td width="11%">subcategory</td>
    <td width="6%">machine time</td>
    <td width="5%">Setup time</td>
    <td width="39%">Proceedure</td>
    <td width="25%">Completed</td>
  </tr>
  <tr>
    <td><label>
      <input name="textfield" type="text" id="textfield" size="3" maxlength="3" />
    </label></td>
    <td><select name="jumpMenu" id="jumpMenu">
      <option>category</option>
    </select></td>
    <td><select name="jumpMenu2" id="jumpMenu2">
      <option>subcategory</option>
    </select></td>
    <td><label>
      <input name="textfield2" type="text" id="textfield2" size="3" maxlength="3" />
    </label></td>
    <td><input name="textfield3" type="text" id="textfield3" size="3" maxlength="3" /></td>
    <td><label>
      <textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
    </label></td>
    <td><label>
      <input type="checkbox" name="checkbox" id="checkbox" />
    </label></td>
  </tr>
</table>
</form>

 

 

 

Archived

This topic is now archived and is closed to further replies.

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