Hallo mensen,
Ziet iemand hier de fout in dit script?
Bedankt alvast!
de foutmelding die ik krijg in de browser is deze:
Fatal error: Cannot redeclare zoekwoord() (previously declared in D:\Inetpub\vhosts\Iprop-groep7.icasites.nl\httpdocs\functions\zoek.php:3) in D:\Inetpub\vhosts\Iprop-groep7.icasites.nl\httpdocs\functions\zoek.php on line 36
de code is deze :
Ziet iemand hier de fout in dit script?
Bedankt alvast!
de foutmelding die ik krijg in de browser is deze:
Fatal error: Cannot redeclare zoekwoord() (previously declared in D:\Inetpub\vhosts\Iprop-groep7.icasites.nl\httpdocs\functions\zoek.php:3) in D:\Inetpub\vhosts\Iprop-groep7.icasites.nl\httpdocs\functions\zoek.php on line 36
de code is deze :
PHP:
<?php require 'functions/connect.php';
function zoekwoord($zoekwoord) {
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
$sql = mssql_query("SELECT count(*) FROM tblVoorwerp WHERE titel LIKE '%".$zoekwoord."%' OR beschrijving LIKE '%".$zoekwoord."%'");
$totalSearch = mssql_result($sql, 0 ,0);
//print '<p style="float:right;"><b>'.$totalSearch.'</b> resultaten voor <b>'.$zoekwoord.'</b></p><br />';
//print '<p style="float:left;"><h1>Gevonden resultaten:</h1></p>';
$sql = mssql_query("SELECT * FROM tblVoorwerp WHERE titel LIKE '%".$zoekwoord."%' OR beschrijving LIKE '%".$zoekwoord."%'");
while($res = mssql_fetch_array($sql))
{ ?>
<div class="productindex">
<div class="productfoto">
foto
</div>
<div class="productnaam">
<?php
print $res['titel']."<br />";
print $res['beschrijving'];
?>
</div>
<div class="productverkoper">
<?php
print $res['verkoper'];
?>
</div>
</div>
<?php
}
}
}; ?> <?
function zoekdropdownbox() {
$Query = 'SELECT rubrieknaam FROM tblRubriek WHERE superrubrieknr IS NULL';
$results = mssql_query($Query);?>
<select name ="rubrieknaam" size="1">
<option value=" ">Selecteer een rubriek:</option><?
for ($u = 0; $u < mssql_num_rows($results); $u++)
{
$id = mssql_result($results,$u,'rubrieknaam');?>
<option value="<? echo($id); ?>"><? echo($id); ?></option><?
} ?>
</select> <?
}
?>
Laatst bewerkt door een moderator: