stash
This commit is contained in:
parent
943d209fd3
commit
acec8b1120
6 changed files with 75 additions and 23 deletions
|
@ -26,12 +26,12 @@
|
|||
Insert Item into DB
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="action.php?action=lost">
|
||||
<form id="lost_form" method="POST" action="action.php?action=lost">
|
||||
<p><input type="text" class="form-control" placeholder="WANN" name="wann" value="<?php echo date("Y-m-d H:i:s");?>"></p>
|
||||
<p><input type="text" class="form-control" placeholder="WO" name="wo"></p>
|
||||
<p><input type="text" class="form-control" placeholder="WAS" name="was"></p>
|
||||
<p><input type="text" class="form-control" placeholder="KONTAKT" name="contact" autocomplete="off"></p>
|
||||
<p><input type="submit" class="form-control"></p>
|
||||
<p><button type="submit" class="form-control" onclick="testajax(); return false;">Submit</button></p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="card-footer small text-muted">Updated yesterday at 11:59 PM</div>
|
||||
|
@ -40,7 +40,20 @@
|
|||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
|
||||
<script>
|
||||
|
||||
function testajax(){
|
||||
$.post( "ajax.php?action=add_lost", $( "#lost_form" ).serialize() ).done(function( data ) {
|
||||
alert( "Data Loaded: " + data );
|
||||
});
|
||||
|
||||
/*$.post( "ajax.php", { name: "John", time: "2pm" } ).done(function( data ) {
|
||||
alert( "Data Loaded: " + data );
|
||||
});*/
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript-->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue