Probleem met form waar ik geen button wil..
Code (php)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="csshorizontalmenu.js"></script>
<?php
include("connection.php");
if(isset($_POST['Graphic']) &&
$_POST['Graphic'] == 'yes')
{
$result1 = "graphic";
}
if(isset($_POST['Interactive']) &&
$_POST['Interactive'] == 'yes')
{
$result2 = "interactive";
}
if(isset($_POST['Websites']) &&
$_POST['Websites'] == 'yes')
{
$result3 = "websites";
}
$order = $_POST['group1'];
$result = mysql_query("SELECT * FROM jake_portfolio WHERE CAT = '$result1' OR CAT = '$result2' OR CAT ='$result3' ORDER BY $order LIMIT 0, 4");
$checked = "checked";
?>
<title>Jake Rowsell</title>
</head><body>
<div id="container">
<div id="logo"> <a href="home.php"><img src="logo.png" border="0px"/></a></div>
<div id="menu">
<div class="horizontalcssmenu">
<ul id="cssmenu1">
<li> <a href="http://www.javascriptkit.com/">About</a></li>
<li> <a href="select.php">Portfolio</a>
<ul>
<form action="select.php" method="post">
<li>
<input name="Graphic" value="yes" type="image" src="graphiclink.png"/>
</li>
<li>
<input name="Interactive" value="yes" type="image"/>
</li>
<li>
<input name="Websites" value="yes" type="image"/>
</li>
</form>
</ul>
</li>
</ul>
<br style="clear: left;" />
</div>
</div>
<div id="maincontent">
<?php
while($row = mysql_fetch_array($result)){ ?>
<div id="workpreview">
<div id="previewimage"><img src="<?php echo $row['IMG']; ?>" /></div>
<div id="previewtitle"><?php echo $row['TITLE']; ?></div>
<div id="previewdesc"><?php echo $row['DESCR']; ?></div>
</div>
<?php }; ?>
</div>
<div id="filtermenu">
<form action="select.php" method="post">
Search:
<p>
<input name="Graphic" type="checkbox" value="yes" <?PHP if($result1 == 'graphic'){print $checked ; }?>/>
Graphic<br />
<input name="Interactive" type="checkbox" value="yes"<?PHP if($result2 == 'interactive'){print $checked ; }?>/>
Interactive<br />
<input name="Websites" type="checkbox" value="yes" <?PHP if($result3 == 'websites'){print $checked ; }?>/>
Websites</p>
Sort by:
<p>
<input name="group1" type="radio" value="DATE DESC" <?PHP if($order == 'DATE DESC'){print $checked ; } elseif($order != 'DATE ASC' or 'VIEWS'){print $checked ;}?>/>
Newest<br />
<input name="group1" type="radio" value="DATE ASC" <?PHP if($order== 'DATE ASC'){print $checked ; }?>/>
Oldest<br />
<input name="group1" type="radio" value="VIEWS" <?PHP if($order == 'VIEWS'){print $checked ; }?>/>
Most viewed</p>
<input name="Search!" type="submit" value="Filter"/>
</form>
</div>
</div>
</body>
</html>
<link href="style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="csshorizontalmenu.js"></script>
<?php
include("connection.php");
if(isset($_POST['Graphic']) &&
$_POST['Graphic'] == 'yes')
{
$result1 = "graphic";
}
if(isset($_POST['Interactive']) &&
$_POST['Interactive'] == 'yes')
{
$result2 = "interactive";
}
if(isset($_POST['Websites']) &&
$_POST['Websites'] == 'yes')
{
$result3 = "websites";
}
$order = $_POST['group1'];
$result = mysql_query("SELECT * FROM jake_portfolio WHERE CAT = '$result1' OR CAT = '$result2' OR CAT ='$result3' ORDER BY $order LIMIT 0, 4");
$checked = "checked";
?>
<title>Jake Rowsell</title>
</head><body>
<div id="container">
<div id="logo"> <a href="home.php"><img src="logo.png" border="0px"/></a></div>
<div id="menu">
<div class="horizontalcssmenu">
<ul id="cssmenu1">
<li> <a href="http://www.javascriptkit.com/">About</a></li>
<li> <a href="select.php">Portfolio</a>
<ul>
<form action="select.php" method="post">
<li>
<input name="Graphic" value="yes" type="image" src="graphiclink.png"/>
</li>
<li>
<input name="Interactive" value="yes" type="image"/>
</li>
<li>
<input name="Websites" value="yes" type="image"/>
</li>
</form>
</ul>
</li>
</ul>
<br style="clear: left;" />
</div>
</div>
<div id="maincontent">
<?php
while($row = mysql_fetch_array($result)){ ?>
<div id="workpreview">
<div id="previewimage"><img src="<?php echo $row['IMG']; ?>" /></div>
<div id="previewtitle"><?php echo $row['TITLE']; ?></div>
<div id="previewdesc"><?php echo $row['DESCR']; ?></div>
</div>
<?php }; ?>
</div>
<div id="filtermenu">
<form action="select.php" method="post">
Search:
<p>
<input name="Graphic" type="checkbox" value="yes" <?PHP if($result1 == 'graphic'){print $checked ; }?>/>
Graphic<br />
<input name="Interactive" type="checkbox" value="yes"<?PHP if($result2 == 'interactive'){print $checked ; }?>/>
Interactive<br />
<input name="Websites" type="checkbox" value="yes" <?PHP if($result3 == 'websites'){print $checked ; }?>/>
Websites</p>
Sort by:
<p>
<input name="group1" type="radio" value="DATE DESC" <?PHP if($order == 'DATE DESC'){print $checked ; } elseif($order != 'DATE ASC' or 'VIEWS'){print $checked ;}?>/>
Newest<br />
<input name="group1" type="radio" value="DATE ASC" <?PHP if($order== 'DATE ASC'){print $checked ; }?>/>
Oldest<br />
<input name="group1" type="radio" value="VIEWS" <?PHP if($order == 'VIEWS'){print $checked ; }?>/>
Most viewed</p>
<input name="Search!" type="submit" value="Filter"/>
</form>
</div>
</div>
</body>
</html>
Gewijzigd op 19/08/2011 22:03:14 door Niels K
Er zijn nog geen reacties op dit bericht.