-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.php
More file actions
61 lines (59 loc) · 2.32 KB
/
project.php
File metadata and controls
61 lines (59 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<html>
<?php
require 'head.php';
?>
<script type="text/javascript">
$( function() {
$( "#enddatepicker" ).datepicker({showButtonPanel: true,
changeMonth: true,
dateFormat: 'yy-mm-dd'});
$( "#releasedatepicker" ).datepicker({showButtonPanel: true,
changeMonth: true,
dateFormat: 'yy-mm-dd'});
});
</script>
<body>
<?php
require 'header.php';
?>
<p> Create your project with project title, category, image, funding goal, campaign duration.</p>
<form action="createproject.php" name="createproject" method="POST" enctype="multipart/form-data" onsubmit="return validateForm()">
<p>Project Title<span class="star">*</span> <input type="text" name="title">
<div id="title" class="showerror"> </div></p>
<p>Description <textarea name="description" rows="2" cols="45"></textarea></p>
<p> Media <input type="file" name="myimage"> </p>
<p> Category<span class="star">*</span>
<?php
$categories = array();
$sql = "SELECT categoryname FROM categories";
$result = $conn->query($sql);
echo "<select name='category' onchange=document.getElementById('selectedcategory').value=this.options[this.selectedIndex].text>";
$count = 0;
echo "<option value=$count > Select Category </option>";
while ($cat_array=mysqli_fetch_assoc($result))
{
$count += 1;
echo "<option value=$count >".htmlspecialchars($cat_array["categoryname"])."</option>";
}
echo "</select>";
?>
<input type="hidden" name="selectedcategory" id="selectedcategory" value="" />
<div id="category" class="showerror"> </div>
</p>
<p> Min Fund<span class="star">*</span> <input type="text" name="minfund">
<div id="minfund" class="showerror"> </div>
</p>
<p> Max Fund<span class="star">*</span> <input type="text" name="maxfund">
<div id="maxfund" class="showerror"> </div>
</p>
<p> End Date<span class="star">*</span> <input type="text" id="enddatepicker" name="enddate">
<div id="enddate" class="showerror"> </div>
</p>
<p> Release Date<span class="star">*</span> <input type="text" id="releasedatepicker" name="releasedate">
<div id="releasedate" class="showerror"> </div>
</p>
<input type="submit" value="Send">
<input type="reset" value="Clear">
</form>
</body>
</html>