| Current Path : /home2/wtmwscom/public_html/member/ |
| Current File : /home2/wtmwscom/public_html/member/campaign_add.php |
<?php
$title = "New Task";
include 'header.php';
?>
<h1>Post Advertisement</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>Ads Title</th><th>Ads Link</th>
<th> </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> <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> <a href="javascript:;" onclick="$(this).closest(\'tr\').remove();">Delete</a> </td>'+
' </tr>';
$(".table tbody").append(html);
counter++;
}
</script>
<?php include 'footer.php'; ?>