#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    3
    Rep Power
    0

    1st button in dynamic table not working


    I have 4 tables in 4 different fieldsets all populated by MySQL dynamically. All 4 tables the first button of the first row doesn't work. I thought I would figure it out while creating then next fieldset 3 times, and now they are done and still didn't get it working right.


    PHP Code:
    echo '<form class="form1" action="" method=""><fieldset><legend>New Clients</legend>';     echo "<table><tr>  <th>Name</th> <th>Phone</th> <th>Job</th> </tr>";     while ($row mysqli_fetch_array($r)) {         echo '<tr>';                 echo '<td>' .$row[2]. ', ' .$row[1]. '</td>';                 echo '<td>(' .$row[3]. ') ' .$row[4]. '</td>';                 echo '<td align="right">' .$row[6]. '</td>';                 echo '<td><form  action="includes/del.php" method="POST">                     <input type="hidden" name="id" value="' .$row['Cust_Num']. '" />                     <input type="hidden" name="jid" value ="' .$row['Job_Num']. '" />                     <input type="submit" value="Delete" />                      </form></td>';                 echo '<td><form  action="bid.php" method="POST">                     <input type="hidden" name="id" value="' .$row['Cust_Num']. '" />                     <input type="hidden" name="jid" value ="' .$row['Job_Num']. '" />                         <input type="submit" value="Estimate" />                      </form></td>';                 echo '<td><form  action="contact.php" method="POST">                     <input type="hidden" name="id" value="' .$row['Cust_Num']. '" />                     <input type="hidden" name="jid" value ="' .$row['Job_Num']. '" />                         <input type="submit" value="Contact" />                      </form></td>';                 echo '</tr>';     }     echo '</table>';     echo '</form></fieldset>'

    I find it strange that the other 2 buttons work fine. And the first button of the next row works fine also.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    29
    Rep Power
    0
    Originally Posted by ripper1028
    I have 4 tables in 4 different fieldsets all populated by MySQL dynamically. All 4 tables the first button of the first row doesn't work. I thought I would figure it out while creating then next fieldset 3 times, and now they are done and still didn't get it working right.


    PHP Code:
    echo '<form class="form1" action="" method=""><fieldset><legend>New Clients</legend>';     echo "<table><tr>  <th>Name</th> <th>Phone</th> <th>Job</th> </tr>";     while ($row mysqli_fetch_array($r)) {         echo '<tr>';                 echo '<td>' .$row[2]. ', ' .$row[1]. '</td>';                 echo '<td>(' .$row[3]. ') ' .$row[4]. '</td>';                 echo '<td align="right">' .$row[6]. '</td>';                 echo '<td><form  action="includes/del.php" method="POST">                     <input type="hidden" name="id" value="' .$row['Cust_Num']. '" />                     <input type="hidden" name="jid" value ="' .$row['Job_Num']. '" />                     <input type="submit" value="Delete" />                      </form></td>';                 echo '<td><form  action="bid.php" method="POST">                     <input type="hidden" name="id" value="' .$row['Cust_Num']. '" />                     <input type="hidden" name="jid" value ="' .$row['Job_Num']. '" />                         <input type="submit" value="Estimate" />                      </form></td>';                 echo '<td><form  action="contact.php" method="POST">                     <input type="hidden" name="id" value="' .$row['Cust_Num']. '" />                     <input type="hidden" name="jid" value ="' .$row['Job_Num']. '" />                         <input type="submit" value="Contact" />                      </form></td>';                 echo '</tr>';     }     echo '</table>';     echo '</form></fieldset>'

    I find it strange that the other 2 buttons work fine. And the first button of the next row works fine also.


    hello..!

    your process is quite wrong..Because nope form in form...do you know using ajax..I think you should try to send via ajax method to that hidden fields.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    3
    Rep Power
    0
    No I don't know ajax, I'm just learning PHP out of a book and didn't realize the book I bought is all procedural and no OOP. So I have been making up my own method of programming as you can see. So I will look for ajax hidden fields then?
  6. #4
  7. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,874
    Rep Power
    6351
    Your code is all one unreadable line. Please paste it into the box, then highlight it and click the white "PHP" button. pasting it into the popup makes it...like this.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo