[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - Probleem (php)
aan alle goede dingen komt een eind, webmasterplein.net 2003 - 2013
wij danken jullie voor al mooie momenten die dankzij dit forum ontstonden - Derk, Rutger en Stef

Probleem (php)

Je komt er niet helemaal uit bij het scripten? Übergoede functie geschreven? Alles met betrekking tot scripting, kun je hier terecht.

Probleem (php)

Berichtdoor phntje » 19 aug 2005 09:48

phntje
 

Berichtdoor Derk » 19 aug 2005 09:51

je hebt niet het hele script gepost dat maakt het wat moeilijker....
ik ga ervanuit dat bovenin een loopje staat....

[syntax="php"]echo"<table border=\"1\" width=\"100%\" id=\"table1\"> ";
{
echo "
<tr>
<td width=\"149\"><b>Naam</b></td>
<td width=\"171\"><b>Positie</b></td>
<td width=\"168\"><b>Geboortedatum</b></td>
<td><b>Club</b></td>
<td width=\"110\"><b>Nationaliteit</b></td>
</tr>
<tr>
<td width=\"149\"><a href='speler.php?id=".$show->id."'>".$show->naam.", ".$show->achternaam."</td>
<td width=\"171\">".$show->naam."</td>
<td width=\"168\">".$show->geboortedatum."</td>
<td>".$show->club."</td>
<td width=\"110\"><img src=\"".$show->nationaliteit.".gif\"</img></td>
</tr>
";

}
echo'</table><br>';
?>[/syntax]
Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Berichtdoor phntje » 19 aug 2005 10:07

Het volledige index.php:


[syntax="php"]
<?
include("config.inc.php");
echo'<link rel="stylesheet" type="text/css" href="style.css">';

$letterArray = array("D","V","M","A","S");

echo "<center>[<a href='".$PHP_SELF."?pos=D'>Doel</a>&nbsp;
<a href='".$PHP_SELF."?pos=V'>Verdediging</a>&nbsp;
<a href='".$PHP_SELF."?pos=M'>Middenveld</a>&nbsp;
<a href='".$PHP_SELF."?pos=A'>Aanval</a>&nbsp;
]<br></center>
<hr width='35%' align='center'><br><br>";

if(isset($_GET['pos']))
{
if(in_array($_GET['pos'],$letterArray))
{
$letter = $_GET['pos'];
}
else
{
exit;
}
if($letter == "V")
{
$positieResult = "Verdediging";
}
elseif($letter == "M")
{
$positieResult = "Middenveld";
}
elseif($letter == "A")
{
$positieResult = "Aanval";
}
elseif($letter == "S")
{
$positieResult = "Aanval";
}
elseif($letter == "D")
{
$positieResult = "Doel";
}
}

if(!$letter)
{
exit;
}
elseif($letter != "0-9")
{
$query = mysql_query("SELECT * FROM spelers WHERE positie LIKE '".$letter."%' ORDER BY positie ASC") or die (mysql_error());
}
else
{
$query = mysql_query("SELECT * FROM spelers WHERE positie LIKE '1%' OR naam LIKE '2%' OR naam LIKE '3%' OR naam LIKE '4%' OR naam LIKE '5%' OR naam LIKE '6%' OR naam LIKE '7%' OR naam LIKE '8%' OR naam LIKE '9%' ORDER BY positie ASC") or die (mysql_error());
}

echo "U heeft gekozen voor: <b>" . $positieResult . "</b><p><b>Resultaten:</b><hr>";

if(mysql_num_rows($query) == 0)
{
echo "Er zijn geen spelers gevonden met de positie: " . $positieResult . "</td>";
}
while ($show = mysql_fetch_object($query))
{
echo " <table border=\"1\" width=\"100%\" id=\"table1\">
<tr>
<td width=\"149\"><b>Naam</b></td>
<td width=\"171\"><b>Positie</b></td>
<td width=\"168\"><b>Geboortedatum</b></td>
<td><b>Club</b></td>
<td width=\"110\"><b>Nationaliteit</b></td>
</tr>
<tr>
<td width=\"149\"><a href='speler.php?id=".$show->id."'>".$show->naam.", ".$show->achternaam."</td>
<td width=\"171\">".$show->naam."</td>
<td width=\"168\">".$show->geboortedatum."</td>
<td>".$show->club."</td>
<td width=\"110\"><img src=\"".$show->nationaliteit.".gif\"</img></td>
</tr>
</table><br>";

}
?> [/syntax]
phntje
 

Berichtdoor Derk » 19 aug 2005 11:06

[syntax="php"]<?
include("config.inc.php");
echo'<link rel="stylesheet" type="text/css" href="style.css">';

$letterArray = array("D","V","M","A","S");

echo "<center>[<a href='".$PHP_SELF."?pos=D'>Doel</a>&nbsp;
<a href='".$PHP_SELF."?pos=V'>Verdediging</a>&nbsp;
<a href='".$PHP_SELF."?pos=M'>Middenveld</a>&nbsp;
<a href='".$PHP_SELF."?pos=A'>Aanval</a>&nbsp;
]<br></center>
<hr width='35%' align='center'><br><br>";

if(isset($_GET['pos']))
{
if(in_array($_GET['pos'],$letterArray))
{
$letter = $_GET['pos'];
}
else
{
exit;
}
if($letter == "V")
{
$positieResult = "Verdediging";
}
elseif($letter == "M")
{
$positieResult = "Middenveld";
}
elseif($letter == "A")
{
$positieResult = "Aanval";
}
elseif($letter == "S")
{
$positieResult = "Aanval";
}
elseif($letter == "D")
{
$positieResult = "Doel";
}
}

if(!$letter)
{
exit;
}
elseif($letter != "0-9")
{
$query = mysql_query("SELECT * FROM spelers WHERE positie LIKE '".$letter."%' ORDER BY positie ASC") or die (mysql_error());
}
else
{
$query = mysql_query("SELECT * FROM spelers WHERE positie LIKE '1%' OR naam LIKE '2%' OR naam LIKE '3%' OR naam LIKE '4%' OR naam LIKE '5%' OR naam LIKE '6%' OR naam LIKE '7%' OR naam LIKE '8%' OR naam LIKE '9%' ORDER BY positie ASC") or die (mysql_error());
}

echo "U heeft gekozen voor: <b>" . $positieResult . "</b><p><b>Resultaten:</b><hr>";

if(mysql_num_rows($query) == 0)
{
echo "Er zijn geen spelers gevonden met de positie: " . $positieResult . "</td>";
}
echo" <table border=\"1\" width=\"100%\" id=\"table1\">
<tr>
<td width=\"149\"><b>Naam</b></td>
<td width=\"171\"><b>Positie</b></td>
<td width=\"168\"><b>Geboortedatum</b></td>
<td><b>Club</b></td>
<td width=\"110\"><b>Nationaliteit</b></td>
</tr>";
while ($show = mysql_fetch_object($query))
{
echo "
<tr>
<td width=\"149\"><a href='speler.php?id=".$show->id."'>".$show->naam.", ".$show->achternaam."</td>
<td width=\"171\">".$show->naam."</td>
<td width=\"168\">".$show->geboortedatum."</td>
<td>".$show->club."</td>
<td width=\"110\"><img src=\"".$show->nationaliteit.".gif\"</img></td>
</tr>
";

}
echo'</table><br>';
?> [/syntax]

probeer dit eens volgens mij is hij zo goed Smile
Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Berichtdoor phntje » 19 aug 2005 11:48

phntje
 


Keer terug naar PHP, ASP, SQL



cron