Your IP : 216.73.216.26


Current Path : /home2/wtmwscom/public_html/admin/
Upload File :
Current File : /home2/wtmwscom/public_html/admin/campaign_add.php

<?php
$title = "New Task";
include 'header.php';
?>
<h1>New Task</h1>
<section id="comments">
    <?php echo getMessage(); ?>
    <form name="form" id="form" action="campaign_add_model.php" method="post">
        <table class="table table-hover">
            <thead>
                <tr>
                    <th>No.</th><th>Page Title</th><th>Page Link</th><th>Page Description</th>
                    <th>&nbsp;</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>1.</td>
                    <td><input type="text" name="campaign[0][page_title]" required="required" /></td>
                    <td><input type="url" name="campaign[0][page_url]" /></td>
                    <td><input type="text" name="campaign[0][page_description]" /></td>
                    <td> <a href="javascript:;" onclick="$(this).closest('tr').remove();">Delete</a> </td>
                </tr>
            </tbody>

        </table>

        <p><br />
            <input type="button" value="Add more task" onclick="addMoreCampaign()" />
            <input style="position: relative; left: 160px;" name="submit" type="submit" id="submit" value="Save">
        </p>
    </form>
</section>

<script>
    var counter = 1;
    function addMoreCampaign() {
        var sno = counter+1;
        var html = '<tr>' +
                '                        <td>'+sno +'.</td>' +
                '                        <td><input type="text" name="campaign['+counter+'][page_title]" required="required" /></td>' +
                '                        <td><input type="text" name="campaign['+counter+'][page_url]" /></td>' +
                '                        <td><input type="text" name="campaign['+counter+'][page_description]" /></td>' +
                '                       <td> <a href="javascript:;" onclick="$(this).closest(\'tr\').remove();">Delete</a> </td>'+
                '                    </tr>';

        $(".table tbody").append(html);
        counter++;
    }
</script>
<?php include 'footer.php'; ?>