Welcome Guest, Not a member yet? Register   Sign In
Multiple form_open with button
#1

Hello,
I have several buttons which should make different things.
To one, a button should make one entry in table 1 and another in table 2.
But if I do it as in the code below.
He always makes an entry in Table 1.

How can I assign the respective buttons?


PHP Code:
<?php echo form_open('Karte/insert_artikel'); ?>
<?php 
echo form_open('Karte/insert_trade'); ?>
                            <input type="hidden" name="add_karte_id" value="<?php echo $edition_views['tb_karte_id']; ?>">
                            <input type="hidden" name="add_karten_stats_id" value="<?php echo $edition_views['tb_karte_karten_stats']; ?>">
                            <input type="hidden" name="add_karte_sprache" value="<?php echo $edition_views['tb_sprache_id']; ?>">
                            <input type="hidden" name="add_karte_qualitat" value="<?php echo $edition_views['tb_qualitat_id']; ?>">
                            <input type="hidden" name="add_karte_auflage" value="<?php echo $edition_views['tb_auflage_id']; ?>">
                            <input type="hidden" name="add_karte_edition_stats" value="<?php echo $edition_views['tb_karte_edition_stats']; ?>">
                            <input type="hidden" name="add_karte_datum" value="<?php $date date_create($edition_views['tb_karte_datum']); echo date_format($date,"Y-m-d H:i:s");?>">
                            <tr>
                                <td><a href="#" data-toggle="tooltip" title="<?php echo $edition_views['tb_edition_name']; ?>"><?php echo $edition_views['tb_edition_kurzel']; ?>-<?php echo $edition_views['tb_sprache_kurzel']; ?><?php echo $edition_views['tb_edition_stats_nummer']; ?></a></td>
                                <td><button class="btn btn-default" data-toggle="tooltip" data-placement="top" title="<?php echo $edition_views['tb_qualitat_name']; ?>"><img src="<?php echo base_url(); ?>assets/images/site/qualitat/<?php echo $edition_views['tb_qualitat_id']; ?>.png"/>&nbsp;<?php echo $edition_views['tb_qualitat_short']; ?></button></td>
                                <td><button class="btn btn-default" data-toggle="tooltip" data-placement="top" title="<?php echo $edition_views['tb_rare_name']; ?>"><?php echo $edition_views['tb_rare_short']; ?></button></td>
                                <td><?php echo $edition_views['tb_auflage_name_de']; ?></td>
                                <td><?php $date date_create($edition_views['tb_karte_datum']); echo date_format($date,"d.m.Y");?></td>
                                <td><?php echo str_pad($edition_views['tb_karte_anzahl'], 2'0'STR_PAD_LEFT); ?></td>
                                <td>
<?php
    
switch($edition_views['tb_karte_versuche'])
        {
            case (
0):
            echo 
"<FONT COLOR='#000000'>".$edition_views['tb_karte_versuche']."</FONT>";
            break;

            case (
1):
            echo 
"<strong><FONT COLOR='#D7DF01'>".$edition_views['tb_karte_versuche']."</FONT></strong>";
            break;

            case (
2):
            echo 
"<strong><FONT COLOR='#298A08'>".$edition_views['tb_karte_versuche']."</FONT></strong>";
            break;

            case (
3):
            echo 
"<strong><FONT COLOR='#DF0101'>".$edition_views['tb_karte_versuche']."</FONT></strong>";
            break;
        }
?>
                                </td>
                                <td>
                                    <div class="input-group">
                                        <span class="input-group-btn">
                                            <button type="button" class="btn btn-default btn-number" disabled="disabled" data-type="minus" data-field="add_karte_menge[<?php echo $edition_views['tb_karte_id']; ?>]"><span class="glyphicon glyphicon-minus"></span></button>
                                        </span>
                                        <input type="text" name="add_karte_menge[<?php echo $edition_views['tb_karte_id']; ?>]" class="form-control input-number" value="1" min="1" max="<?php echo $edition_views['tb_karte_anzahl']; ?>">
                                        <span class="input-group-btn">
                                            <button type="button" class="btn btn-default btn-number" data-type="plus" data-field="add_karte_menge[<?php echo $edition_views['tb_karte_id']; ?>]"><span class="glyphicon glyphicon-plus"></span></button>
                                            <button type="submit" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Verkauf Hinzuf├╝gen"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></button>
                                            <button type="submit" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Tausch Hinzuf├╝gen"><span class="glyphicon glyphicon-transfer" aria-hidden="true"></span></button>
                                            <button type="submit" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Zur Sammlung"><span class="glyphicon glyphicon-gift" aria-hidden="true"></span></button>
                                            <button type="submit" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Bearbeiten"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></button>
                                            <button type="submit" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Verloren"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span></button>
                                        </span>
                                    </div>
                                </td>
                            </tr>
<?php echo form_close(); ?>
<?php 
echo form_close(); ?>
Reply


Messages In This Thread
Multiple form_open with button - by Germanikus - 10-05-2017, 05:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB