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

Link to comment
Share on other sites

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>

 

 

 

Link to comment
Share on other sites

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.