janehl1403
Established
Sir pa-help naman po dito:
nakahighligt po yung txtvalue at Sdata po:
ERROR:
Notice: Use of undefined constant txtvalue - assumed 'txtvalue' in D:\FILES\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\MFish\list.php on line 63
Notice: Undefined index: txtvalue in D:\FILES\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\MFish\list.php on line 63
Notice: Use of undefined constant Sdata - assumed 'Sdata' in D:\FILES\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\MFish\list.php on line 64
Notice: Undefined index: Sdata in D:\FILES\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\MFish\list.php on line 64
Code:
<html>
<head>
<title> List of Species</title>
<link href="style.css" type="text/css" rel="stylesheet">
<script language="javascript">
<!----
function openW(fish_id)
{
aPopUp= window.open('viewList.php?fish_id='+fish_id,'viewL ist','menubar=no,toolbar=no,location=no,directorie s=no,status=no,scrollbars=yes,resizable=yes,copyhi story=no,width=760,height=600')
aPopUp.focus()
}
-->
</script>
<style TYPE="text/css">
<!--
table {border-collapse: collapse;}
.odd {background-color:teal}
.even {background-color:teal}
//-->
</style>
</head>
<body class="blist">
<center>
<?php
include ("config.php");
$db = mysql_connect($dbhost,$dbuser,$dbpass);
if (!$db)
{
die('Unable to connect' . mysql_error());
}
?>
<form method='get' action='<?php $PHP_SELF ?>'>
<table border=2 cellpadding= 3 id='searcharea'>
<tr>
<td>Search by:<br/></td>
<td>
<select name = "Sdata" id="sel">
<option value="
<option value="
<option value="
</select>
<input type= text id="opt" name="txtvalue" size=20 value=''></td>
<td align=left><input type=submit name=Ok value='Show List'></td>
</tr>
</table><br/>
</form>
<table border=1>
<tr id='listlabel'>
<td width=10px></td>
<td width=50px>Class</td>
<td width=50px>Order</td>
<td width=50px>Family</td>
<td width=100px>Scientific Name</td>
<td width=100px>Common Name</td>
<td width=100px>Local Name</td>
<td width=10px></td>
</tr>
<?php
$value1=$_GET[txtvalue];
$value2=$_GET[Sdata];
mysql_select_db($dbname,$db);
if (isset($_GET['start'])) {
$sql = "SELECT
FROM
Inner Join
Inner Join
Inner Join
WHERE
sci_name LIKE 'A%' ORDER BY
} else {
$sql = "SELECT
FROM
Inner Join
Inner Join
Inner Join
WHERE
".$value2." LIKE '%".$value1."%' ORDER BY
}
$result = mysql_query($sql,$db);
if($result){
$counter = 0;
while ($myrow = mysql_fetch_array($result)) {
$counter++;
(fmod ($counter,2))? $bg=odd: $bg=even;
printf("<tr class=$bg>
<td id='entry'>%s</td>
<td id='entry'>%s</td>
<td id='entry'>%s</td>
<td id='entry'>%s</td>
<td id='sci'>%s</td>
<td id='entry'>%s</td>
<td id='entry'>%s</td>
<td id='ent'><a href=\"javascript: openW('$myrow[fish_id]')\"><input type='image' name=mybutton src='images/view.png' title='view'/>
</a>
</td></tr>",$counter, $myrow[division_name], $myrow[order_name], $myrow[family_name], $myrow[sci_name], $myrow[en_name], $myrow[l_name]);
}
echo "</table>\n";
}
?>
</center>
</body>
</html>
nakahighligt po yung txtvalue at Sdata po:
ERROR:
Notice: Use of undefined constant txtvalue - assumed 'txtvalue' in D:\FILES\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\MFish\list.php on line 63
Notice: Undefined index: txtvalue in D:\FILES\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\MFish\list.php on line 63
Notice: Use of undefined constant Sdata - assumed 'Sdata' in D:\FILES\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\MFish\list.php on line 64
Notice: Undefined index: Sdata in D:\FILES\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\MFish\list.php on line 64
Code:
<html>
<head>
<title> List of Species</title>
<link href="style.css" type="text/css" rel="stylesheet">
<script language="javascript">
<!----
function openW(fish_id)
{
aPopUp= window.open('viewList.php?fish_id='+fish_id,'viewL ist','menubar=no,toolbar=no,location=no,directorie s=no,status=no,scrollbars=yes,resizable=yes,copyhi story=no,width=760,height=600')
aPopUp.focus()
}
-->
</script>
<style TYPE="text/css">
<!--
table {border-collapse: collapse;}
.odd {background-color:teal}
.even {background-color:teal}
//-->
</style>
</head>
<body class="blist">
<center>
<?php
include ("config.php");
$db = mysql_connect($dbhost,$dbuser,$dbpass);
if (!$db)
{
die('Unable to connect' . mysql_error());
}
?>
<form method='get' action='<?php $PHP_SELF ?>'>
<table border=2 cellpadding= 3 id='searcharea'>
<tr>
<td>Search by:<br/></td>
<td>
<select name = "Sdata" id="sel">
<option value="
identification.sci_name">Scientific Name</option><option value="
identification.en_name">Common Name</option><option value="
identification.l_name">Local Name</option></select>
<input type= text id="opt" name="txtvalue" size=20 value=''></td>
<td align=left><input type=submit name=Ok value='Show List'></td>
</tr>
</table><br/>
</form>
<table border=1>
<tr id='listlabel'>
<td width=10px></td>
<td width=50px>Class</td>
<td width=50px>Order</td>
<td width=50px>Family</td>
<td width=100px>Scientific Name</td>
<td width=100px>Common Name</td>
<td width=100px>Local Name</td>
<td width=10px></td>
</tr>
<?php
$value1=$_GET[txtvalue];
$value2=$_GET[Sdata];
mysql_select_db($dbname,$db);
if (isset($_GET['start'])) {
$sql = "SELECT
identification.fish_id,identification.division,identification.order,identification.family,identification.sci_name,identification.author,identification.en_name,identification.l_name, division_list.division_name,family_list.family_name,order_list.order_nameFROM
identificationInner Join
family_list ON family_list.family_code = identification.familyInner Join
division_list ON division_list.division_code = identification.divisionInner Join
order_list ON order_list.order_code = identification.orderWHERE
sci_name LIKE 'A%' ORDER BY
identification.sci_name ASC"; } else {
$sql = "SELECT
identification.fish_id,identification.division,identification.order,identification.family,identification.sci_name,identification.author,identification.en_name,identification.l_name, division_list.division_name,family_list.family_name,order_list.order_nameFROM
identificationInner Join
family_list ON family_list.family_code = identification.familyInner Join
division_list ON division_list.division_code = identification.divisionInner Join
order_list ON order_list.order_code = identification.orderWHERE
".$value2." LIKE '%".$value1."%' ORDER BY
identification.fish_id ASC";}
$result = mysql_query($sql,$db);
if($result){
$counter = 0;
while ($myrow = mysql_fetch_array($result)) {
$counter++;
(fmod ($counter,2))? $bg=odd: $bg=even;
printf("<tr class=$bg>
<td id='entry'>%s</td>
<td id='entry'>%s</td>
<td id='entry'>%s</td>
<td id='entry'>%s</td>
<td id='sci'>%s</td>
<td id='entry'>%s</td>
<td id='entry'>%s</td>
<td id='ent'><a href=\"javascript: openW('$myrow[fish_id]')\"><input type='image' name=mybutton src='images/view.png' title='view'/>
</a>
</td></tr>",$counter, $myrow[division_name], $myrow[order_name], $myrow[family_name], $myrow[sci_name], $myrow[en_name], $myrow[l_name]);
}
echo "</table>\n";
}
?>
</center>
</body>
</html>
if mali po. pasensya.. di ako mglng sa web base. ehhee