SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help ! PHP MYSQL Form issue

    Hey guys , i work for an engineering company in Melbourne
    doing C.N.C programming on their mills and lathes .

    Now these machines hold a variety of tools for cutting
    metal on what's called a turret . These turrets have 10
    faces on them which can hold ten tools .

    Each job we program and set up has a unique layout of
    tools on the turret , and we have been recording the layout
    on setting sheets . We have about a thousand jobs on paper
    and i suggested that we go down the database route .

    I have bought Kevins PHP MYSQL book from everything linux
    in Sydney , and have been chomping through it .

    I am stuck on a problem that the book , and for that matter hours
    of trawling google , php , mysql sites , etc have not touched on .

    Here it is . Now the turret may be able to hold 10 tools , but not every
    job uses up to 10 tools . So i need a way of having a form that
    contains the ten rows with columns and if there are some rows not used
    at all , that their empty values will not be loaded into the db table .

    Turret Pos | Tool Block | Operation | Toolstyle |
    textfield | listbox | listbox | listbox |
    textfield | listbox | listbox | listbox |
    textfield | listbox | listbox | listbox |

    I think an array might be the answer but like i said , i need to be able
    to omit empty values from being inserted , all the values are text .
    The listboxes will be populated from the db tables .

    I find one tutorial that said to use serialize , but another said don't ,
    then i found one that said use implode , but i'm really stuck here guys .

    I work 50 hrs a week doing the C.N.C programming and AUTOCAD , have
    an 8 month old baby , and i'm studying 3D Animation and effects so i can
    get out of the C.N.C side of things ! So i don't have to time to put aside
    for learning enough about PHP to solve this one .

    I'm not looking for the complete answer , but to tell you the truth i'd just
    about pay someone to solve it for me

    The rest of the form and database is coming along nicely , but this is holding
    me up !

    Thanks ,

    Lewis

  2. #2
    SitePoint Evangelist kooshin.com's Avatar
    Join Date
    Dec 2003
    Location
    http://kooshin.com
    Posts
    505
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the empty values? you mean as it IDs?

  3. #3
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the column turret pos for example has ten rows of text input boxes .
    Now these boxes would be the array turretpos , if a set up only uses
    say five turret positions out of the ten , then the other five rows will
    have no physical text entered in the text boxes of turretpos array .

    I need to be able to have php check if the text boxes are empty and
    if so , not to place those empty boxes in the array . Once the array contains
    the text from the boxes that had text entered in them , i need to store it to
    my table . I got confused by the serialize and implode methods . Is it not possible
    to simply store the text from my turretpos array in my table as plain text ?

    Hope i'm making sense .

    Lewis


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •