[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/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/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/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/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/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/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/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 - Fout in script wat ik maar niet kan ontdekken.
Pagina 1 van 2

Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 24 apr 2006 20:00
door Rik
Hallo,

Ik probeer nu weer eens een CMS in elkaar te knutselen.
Het lukt nog redelijk, tijdens het scripten zelf ging alles goed.
Maar blijkbaar zit er toch een fout in.
Ik heb vanalles geprobeerd, maar de fout niet kunnen vinden.
Ik vraag me af of jullie me daar bij willen helpen.
Ik heb tot nu toe alleen de index, en verder nog niets.
Maar in principe zou 't wel al moeten werken.
De fout ligt niet in functions, deze heb ik al eens een keer weggecomment.
Dit is wat ik heb:
[code="php"]
<?php
#########################
#Copyright Bloe #
#Bloe.net #
#########################

//Include alle functies
include("functions.php");
//Gegevens voor het connecten met de database
$db_user="bloe_cms";
$db_ww="***";
$db="bloenet";
//Maak de connectie variable aan.
$con = mysql_connect("localhost", $db_user, $db_ww);
//Selecteer de database
mysql_select_db($db, $con);
//Check voor links in 't menu
$menukwerrie = mysql_query("SELECT * FROM cms WHERE menulink = '1'");
//Check of een pagina is opgegeven.
if(!empty($_GET['pageid'])){
//Ja, laten we er een wat fijner vartje van maken.
$pageid = $_GET['pageid'];
} else {
//Nee, dan geven we gewoon de beginpagina.
$pageid = "1";
}
//Check op de content
$contentkwerrie = mysql_query("SELECT * FROM cms WHERE id = '$pageid'");
$rows = mysql_num_rows($contentkwerrie);
if($rows == 0){
$titel = "Pagina niet gevonden";
$tekst = "Helaas, de pagina is niet gevonden.<br />Wordt de pagina vanuit deze site gegeven?<br />Contacteer dan a.u.b. de webmaster: administrator@bloe.net.";
} else {
while($row == $mysql_fetch_array($contenkwerrie)){
$titel = $row->onderwerp;
$tekst = $row->tekst;
}
}
mysql_close($con);
?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Bloe.net :: <? echo $titel ?></title>
<link rel="stylesheet" type="text/css" media="all" href="style/style.css" />
</head>
<body>
<center>
<table id="container">
<tr>
<td id="upper_menu" colspan="2">
&nbsp;&raquo; <a href="index.php?pageid=1">Website</a> | <a href="forum.php">Forum</a> | <a href="blog/index.php">Weblog</a>
</td>
</tr>
<tr>
<td id="menu">
<div id="top_cell">
Menu
</div>
<div id="content_cell">
<?php
//Laten we 't menu weergeven!
while($menu == $mysql_fetch_array($menukwerrie)){
echo '<a href="index.php?pageid=' . $menu->id . '">' . $menu->onderwerp . '</a><br />';
}
?>
</div>
</td>
<td id="content">
<div id="content_cell_text">
<b><? echo $titel ?></b><br /><br />
<? echo $tekst ?>
</div>
</td>
</tr>
<tr>
<td id="footer" colspan="2">
&nbsp;Copyright by Bloe
</td>
</tr>
</center>
</table>
</body>
</html>
[/code]
Alvast bedankt,

Bloe.

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 24 apr 2006 20:09
door LinkinTED

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 25 apr 2006 05:29
door Rik

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 25 apr 2006 14:09
door KillerSponge

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 25 apr 2006 15:29
door Rik
Wow, echt fantastisch trucje. :aanbid:
Heel erg bedankt.
De fout lag hier in, gigantisch stom. Razz
[code="php"]
while($row = $mysql_fetch_array($contenkwerrie)){
[/code]
mysql_fetch_array() moet natuurlijk geen variable zijn. Razz
Bedankt,

Bloe.

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 25 apr 2006 15:49
door KillerSponge
Je moet eigenlijk Derk bedanken, hij heeft dat truucje bedacht ^^

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 25 apr 2006 15:51
door Rik
Bij deze dan, bedankt Derk. Smile

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 25 apr 2006 19:59
door Derk

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 25 apr 2006 20:00
door Stef

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 25 apr 2006 20:10
door KillerSponge

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 25 apr 2006 20:36
door Stef

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 25 apr 2006 21:13
door KillerSponge

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 26 apr 2006 05:37
door Rik
Dan kan je beter zoiets schrijven als:
[code="php"]mysql_query($kwerrie) or die ("Er is een fout opgetreden.<br />Naam a.u.b. contact op met de webmaster.");[/code]

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 26 apr 2006 07:32
door KillerSponge
Dat kan ook ja, maar dan kan je niet precies zien wat de fout is.

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 26 apr 2006 12:44
door Dotcpu
Zet het volgende stukje code eens bovenin je script:[code="php"]<?php
error_reporting( E_ALL );
?>[/code] Dit zorgt ervoor dat alle errors worden weergegeven. Als je site live gaat kan je het weghalen, maar het is gewoon netter als je zonder errors programmeert, dan hou je de kans op bugs zeer klein Smile Ik heb het altijd bovenin staan.

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 26 apr 2006 17:20
door Derk

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 27 apr 2006 00:15
door Dotcpu

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 27 apr 2006 09:33
door Derk

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 01 mei 2006 20:17
door Rik
Ik zit weer met een script wat niet werkt.
Deze keer werken beide trucjes niet, tenzij hier de fout in moet zitten:
[code="php"]<?php[/code]
Lijkt me niet dus.
Dit is wat ik heb:
[code="php"]
<?php
session_start();
include("../normal_settings.php");
?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Bloe.net &raquo; CMS</title>
<link rel="stylesheet" type="text/css" media="all" href="../style.css" />
<link rel="stylesheet" type="text/css" media="all" href="2tables.css" />
</head>
<body>
<table class="container" align="center">
<tr>
<td class="topfooter" colspan="2">
<a href="../index.php?pageid=1"><?php echo $site_name ?></a> <?php echo $seperator ?> <a href="index.php">CMS</a>
</td>
</tr>
<tr>
<td class="menu">
<div class="menuheader">
Menu
</div>
<div class="menudiv">
<div class="tekst">
<?php
include("menu.php");
?>
</div>
</div>
</td>
<td class="content_cell">
<div class="content_div">
<div class="tekst">
<?php
if(!isset($_SESSION['user'])){
echo 'Log a.u.b. in.';
include('login.php');
} else {
if(!empty($_POST['onderwerp'])){
$onderwerp = $_POST['onderwerp'];
$tekst = $_POST['tekst'];
$menuplaats = $_POST['plek'];
$menulink = $_POST['menulink'];
if($menulink == true){
$menulink = 1;
} else if ($menulink == false) {
$menulink = 0;
$menuplaats = 0;
} else {
exit 'Fatale fout';
}
$con = mysql_connect($db_host, $db_user, $db_ww);
mysql_select_db($db_db, $con);
if($menulink == 1){
$kwerrie_update_menu_1("SELECT * FROM cms WHERE menulink='1' AND menuplaats >= '$teller'");
while($row = mysql_fetch_array){
$plek_1 = $row['menuplaats'];
$id_1 = $row['menuplaats'];
$plek_1++
mysql_query("UPDATE cms SET menuplaats = '$plek_1' WHERE id='$id_1'");
}
}
$menuplaats++
if (mysql_query("INSERT INTO cms(onderwerp, tekst, menulink, plek) VALUES ('$onderwerp','$tekst','$menulink','$menuplaats')")){
echo 'Gegevens met succes ingevuldt';
else {
echo 'Fout met invoeren gegevens';
}
}
} else {
echo 'Gegevens zijn niet correct ingevuld, <a href="schrijven.php">klik hier.</a>';
}
}
?>
</form>
</div>
</div>
</td>
</tr>
<tr>
<td class="topfooter" colspan="2">
Powered by DreamCMS
</td>
</tr>
</table>
</body>
</html>
[/code]
Iemand die weet waar 't aan ligt?
Alvast heel erg bedankt,

Bloe.

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 01 mei 2006 20:30
door KillerSponge
Er staat hier voor de rest niks boven? Dat t niet zo is dat die session_start de fout veroorzaakt Razz

Btw, wat is de fout eigenlijk?

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 01 mei 2006 21:53
door Derk

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 02 mei 2006 07:43
door Rik

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 02 mei 2006 07:48
door KillerSponge

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 02 mei 2006 07:50
door Rik

Re: Fout in script wat ik maar niet kan ontdekken.

BerichtGeplaatst: 02 mei 2006 08:17
door Derk