Hallo,
Ik heb een probleempje met het includen van een pagina. In de top.php staat een header met een inloggedeelte deze werkt goed. Het inlogsysteem is gemaakt met ajax.
Wanneer ik top.php include in index.php geeft hij een foutmelding (zie bijlage voor screenshots). Linksonderin staat een geel driehoekje met gereed.
Hieronder zal ik de codes geven:
PHP Code:
//top.php
<?php
session_start();
require_once('config/dbaccess.php');
require_once('adodb/adodb.inc.php');
require_once('config/dbconnect.php');
require_once('config/functions.php');
require_once('class/profilUsers.class.php');
$profilUsers = new profilUsers();
$profilUsers->checkTicket();
#print_r($db);
#print_r($profilUsers);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<link rel="stylesheet" type="text/css" href="style/style.css" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/json2.js"></script>
<script type="text/javascript" src="js/plugins/tools/jquery.tools_overlay.min.js"></script>
<script type="text/javascript" src="js/plugins/jquery-validate/jquery.validate.min.js"></script>
<script type="text/javascript"><!--
var blankSrc = "wpscripts/blank.gif";
--></script>
<script type="text/javascript" src="wpscripts/jsRollover.js"></script>
<script type="text/javascript">
<!--
PPImgInit('roll_8','wpimages/wp2f289f4c.png','wpimages/wpede197f5.png','','',0,0);
PPImgInit('roll_10','wpimages/wp08b24e56.png','wpimages/wpf14f153a.png','','',0,0);
PPImgInit('roll_11','wpimages/wpb4215dcc.png','wpimages/wp9947cb0c.png','','',0,0);
PPImgInit('roll_1','wpimages/wp2d173e81.png','wpimages/wp2d3b6cb4.png','','',0,0);
//-->
</script>
<div text="#000000" style="background-color:#ffffff; text-align:center; height:250px;">
<div style="background-color:transparent;text-align:left;margin-left:auto;margin-right:auto;position:relative;width:750px;height:250px;">
<div style="position:absolute; left:0px; top:4px; width:750px; height:246px;">
<img src="wpimages/wp1449d00b.png" width="750" height="246" border="0" id="qs_4" name="qs_4" title="" alt="" onload="OnLoadPngFix()"></div>
<div style="position:absolute; left:0px; top:4px; width:750px; height:222px;">
<img src="wpimages/wp0e607876_05.jpg" width="750" height="222" border="0" id="meta_1" name="meta_1" title="" alt=""></div>
<div style="position:absolute; left:17px; top:225px; width:176px; height:25px;">
<img src="wpimages/wp2f289f4c.png" width="176" height="25" border="0" id="roll_8" name="roll_8" title="" alt="" onMouseOut="PPImgAction('out','roll_8')" onMouseOver="PPImgAction('over','roll_8')" onload="OnLoadPngFix()"></div>
<div style="position:absolute; left:377px; top:224px; width:176px; height:26px;">
<img src="wpimages/wp08b24e56.png" width="176" height="26" border="0" id="roll_10" name="roll_10" title="" alt="" onMouseOut="PPImgAction('out','roll_10')" onMouseOver="PPImgAction('over','roll_10')" onload="OnLoadPngFix()"></div>
<div style="position:absolute; left:556px; top:225px; width:176px; height:25px;">
<img src="wpimages/wpb4215dcc.png" width="176" height="25" border="0" id="roll_11" name="roll_11" title="" alt="" onMouseOut="PPImgAction('out','roll_11')" onMouseOver="PPImgAction('over','roll_11')" onload="OnLoadPngFix()"></div>
<div style="position:absolute; left:197px; top:225px; width:176px; height:25px;">
<img src="wpimages/wp2d173e81.png" width="176" height="25" border="0" id="roll_1" name="roll_1" title="" alt="" onMouseOut="PPImgAction('out','roll_1')" onMouseOver="PPImgAction('over','roll_1')" onload="OnLoadPngFix()"></div>
<div id="txt_2_C01" style="position:absolute; left:4px; top:13px; width:736px; height:236px;">
<div class="Body-P">
<span class="Body-C"></span>
<?php
// check to see if we have to run the verification for the registration
if( !empty($_REQUEST['verification']) )
{
if( $profilUsers->registrationVerification($_REQUEST['verification']) )
{
echo "Uw account is succesvol geverifieerd. U kunt nu inloggen.<br /><br />";
}
}
// check to see if we have to run the verification for the password change
if( !empty($_REQUEST['uid']) AND !empty($_REQUEST['auth_code']) )
{
if( $profilUsers->lostPasswordChangePassword($_REQUEST['uid'], $_REQUEST['auth_code']) )
{
echo "Uw wachtwoord is gereset. Uw tijdelijke wachtwoord is verzonden naar uw e-mail adres.<br /><br />";
}
}
?>
<span style="float:right;">
<!-- login state -->
<div id="loggedInBox">U bent ingelogd als: <span id="loggedInBoxUsername"><?php echo $profilUsers->UserName; ?></span>, <a href="#" rel="#profilUsers_settings_box" id="profilUsers_settings_link" class="profilUser_box">Instellingen</a>, <a href="#" id="profilUsers_logout">Uitloggen</a></div>
<!-- login state -->
<!-- registration and login links -->
<div id="loggedOutBox"><a href="#" rel="#profilUsers_login_rel" class="profilUser_box">Inloggen</a> <a href="#" rel="#profilUsers_registration_rel" class="profilUser_box">Registreren</a> </div>
<!-- /registration and login links -->
</span>
<!-- registration overlay -->
<div class="profilUsers_registration_box" id="profilUsers_registration_rel">
<form id="regForm" action="" method="get">
<table width="300" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center" class="profilUsers_header"><a href="#" rel="#profilUsers_login_rel" class="profilUser_box">Inloggen</a> | <a href="#" rel="#profilUsers_forgotten_password_rel" class="profilUser_box">Wachtwoord vergeten</a></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table border="0" align="center" cellpadding="5" cellspacing="5" id="reg_form">
<tr>
<td colspan="2" class="profilUsers_instruction">Vul alle velden in</td>
</tr>
<tr>
<td class="profilUsers_instruction_email">E-mail adres:</td>
<td><input type="text" name="EMail" id="profilUsersRegEmail" class="profilUsers_email reg_field" rel="req" value="" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_username">Gebruikersnaam:</td>
<td><input type="text" name="UserName" id="profilUsersRegUserName" class="profilUsers_username reg_field" rel="req" value="" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_password">Wachtwoord:</td>
<td><input type="password" name="PassWord" id="profilUsersRegPassWord" class="profilUsers_password reg_field" rel="req" value="" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_password2">Herhaal wachtwoord:</td>
<td><input type="password" name="PassWord2" id="profilUsersRegPassWord2" class="profilUsers_password2 reg_field" rel="req" value="" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_FirstName">Bedrijfsnaam:</td>
<td><input type="text" name="FirstName" id="profilUsersRegFirstName" class="profilUsers_FirstName reg_field" value="" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_LastName">Contactpersoon :</td>
<td><input type="text" name="LastName" id="profilUsersRegLastName" class="profilUsers_LastName reg_field" value="" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_Address">Adres:</td>
<td><input type="text" name="Address" id="profilUsersRegAddress" class="profilUsers_Address reg_field" value="" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_PostCode">Postcode:</td>
<td><input type="text" name="PostCode" id="profilUsersRegPostCode" class="profilUsers_PostCode reg_field" value="" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_PostName">Woonplaats:</td>
<td><input type="text" name="PostName" id="profilUsersRegPostName" class="profilUsers_PostName reg_field" value="" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_Phone1">Telefoonnummer:</td>
<td><input type="text" name="Phone1" id="profilUsersRegPhone1" class="profilUsers_Phone1 reg_field" value="" /><div class="form_error"></div></td>
</tr>
<tr>
<td colspan="2" align="center"> <span class="profilUsers_reg_return_msg"></span></td>
</tr>
<tr>
<td colspan="2" align="right" class="profilUsers_instruction_next"><input type="hidden" name="req_check" id="req_check" value="" /><a href="#" id="profilUsers_reg">Volgende</a></td>
</tr>
</table>
<table border="0" align="center" cellpadding="5" cellspacing="5" width="100%" id="reg_msg">
<tr>
<td class="profilUsers_registration_msg" id="reg_msg_inner"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
<!-- /registration overlay -->
<!-- login overlay -->
<div class="profilUsers_login_box" id="profilUsers_login_rel">
<form id="loginForm" action="" method="get">
<table width="300" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center" class="profilUsers_header"><a href="#" rel="#profilUsers_registration_rel" class="profilUser_box">Registreren</a> | <a href="#" rel="#profilUsers_forgotten_password_rel" class="profilUser_box">Wachtwoord vergeten</a></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table border="0" align="center" cellpadding="5" cellspacing="5">
<tr>
<td colspan="2" class="profilUsers_instruction">Vul uw gebruikersnaam en wachtwoord in</td>
</tr>
<tr>
<td class="profilUsers_instruction_username">Gebruikersnaam:</td>
<td><input type="text" name="username" id="profilUsersLoginUsername" class="profilUsers_username" value="" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_password">Wachtwoord:</td>
<td><input type="password" name="password" id="profilUsersLoginPassword" class="profilUsers_password" value="" /><div class="form_error"></div></td>
</tr>
<tr>
<td colspan="2" align="center"> <span class="profilUsers_login_return_msg"></span></td>
</tr>
<tr>
<td colspan="2" align="right" class="profilUsers_instruction_next"><a href="#" id="profilUsers_login">Volgende</a></td>
</tr>
</table></td>
</tr>
</table>
</form>
</div>
<!-- /login overlay -->
<!-- settings overlay -->
<div class="profilUsers_settings_box" id="profilUsers_settings_box">
<form id="settingsForm" action="" method="get">
<table width="300" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center" class="profilUsers_header">U bent ingelogd als: <span id="settingsLoggedInBoxUsername"><?php echo $profilUsers->UserName; ?></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table border="0" align="center" cellpadding="5" cellspacing="5">
<tr>
<td colspan="2" class="profilUsers_instruction">Hier kunt uw gegevens wijzigen</td>
</tr>
<tr>
<td class="profilUsers_instruction_email">E-mail:</td>
<td><input type="text" name="EMail" id="profilUsersSettingsEmail" class="profilUsers_email" value="<?php echo $profilUsers->EMail; ?>" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_password_new">nieuw wachtwoord:</td>
<td><input type="password" name="password_new" id="profilUsersSettingsPassword_new" class="profilUsers_password_new" value="" /></td>
</tr>
<tr>
<td class="profilUsers_instruction_password_new2">herhaal wachtwoord:</td>
<td><input type="password" name="password_new2" id="profilUsersSettingsPassword_new2" class="profilUsers_password_new2" value="" /></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td class="profilUsers_instruction_FirstName">Bedrijfsnaam:</td>
<td><input type="text" name="FirstName" id="profilUsersSettingsFirstName" class="profilUsers_FirstName" value="<?php echo $profilUsers->FirstName; ?>" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_LastName">Contactpersoon:</td>
<td><input type="text" name="LastName" id="profilUsersSettingsLastName" class="profilUsers_LastName" value="<?php echo $profilUsers->LastName; ?>" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_Address">Adres:</td>
<td><input type="text" name="Address" id="profilUsersSettingsAddress" class="profilUsers_Address" value="<?php echo $profilUsers->Address; ?>" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_PostCode">Postcode:</td>
<td><input type="text" name="PostCode" id="profilUsersSettingsPostCode" class="profilUsers_PostCode" value="<?php echo $profilUsers->PostCode; ?>" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_PostName">Woonplaats:</td>
<td><input type="text" name="PostName" id="profilUsersSettingsPostName" class="profilUsers_PostName" value="<?php echo $profilUsers->PostName; ?>" /><div class="form_error"></div></td>
</tr>
<tr>
<td class="profilUsers_instruction_Phone1">Telefoonnummer:</td>
<td><input type="text" name="Phone1" id="profilUsersSettingsPhone1" class="profilUsers_Phone1" value="<?php echo $profilUsers->Phone1; ?>" /><div class="form_error"></div></td>
</tr>
<tr>
<td colspan="2" align="center"> <span class="profilUsers_settings_return_msg"></span></td>
</tr>
<tr>
<td colspan="2" align="right" class="profilUsers_instruction_next"><input type="hidden" name="Id" id="profilUsersSettingsId" value="<?php echo $profilUsers->Id; ?>" /><a href="#" id="profilUsers_settings">volgende</a></td>
</tr>
</table></td>
</tr>
</table>
</form>
</div>
<!-- /settings overlay -->
<!-- forgotten password overlay -->
<div class="profilUsers_forgotten_password_box" id="profilUsers_forgotten_password_rel">
<form id="pozabljenoGesloForm" action="" method="get">
<table width="300" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center" class="profilUsers_header"><a href="#" rel="#profilUsers_registration_rel" class="profilUser_box">Registreren</a> | <a href="#" rel="#profilUsers_login_rel" class="profilUser_box">Inloggen</a></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table border="0" align="center" cellpadding="5" cellspacing="5" id="lost_pass_form">
<tr>
<td colspan="2" class="profilUsers_instruction">Geef uw e-mail adres op</td>
</tr>
<tr>
<td class="profilUsers_instruction_email">E-mail:</td>
<td><input type="text" name="email" id="profilUsersForgottenPasswordEmail" class="profilUsers_email" value="" /><div class="form_error"></div></td>
</tr>
<tr>
<td colspan="2" align="center"> <span class="profilUsers_pozabljeno_geslo_return_msg"></span></td>
</tr>
<tr>
<td colspan="2" align="right" class="profilUsers_instruction_next"><a href="#" id="profilUsers_forgotten_password_go">Volgende</a></td>
</tr>
</table>
<table border="0" align="center" cellpadding="5" cellspacing="5" width="100%" id="lost_pass_msg">
<tr>
<td class="profilUsers_lost_pass_msg" id="lost_pass_msg_inner"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
<!-- /forgotten password overlay -->
</div>
</div>
</div>PHP Code:
//index.php
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Home</title>
<style type="text/css">
<!--
body {margin: 0px; padding: 0px;}
a:link {color: #2c3651;}
a:visited {color: #1f5b8b;}
a:hover {color: #2c3651;}
a:active {color: #2c3651;}
-->
</style>
<script type="text/javascript" src="wpscripts/jspngfix.js"></script>
<script type="text/javascript"><!--
var blankSrc = "wpscripts/blank.gif";
--></script>
</head>
<body>
<div text="#000000" style="background-color:#4bd7fa; text-align:center; height:1050px;">
<div style="background-color:transparent;text-align:left;margin-left:auto;margin-right:auto;position:relative;width:750px;height:1020px;">
<div style="position:absolute; left:0px; top:1px; width:750px; height:750px;">
<?php include("top.php"); ?>
<img src="wpimages/wpaa3097e5.png" width="750" height="750" border="0" id="qs_2" name="qs_2" title="" alt="" onload="OnLoadPngFix()"></div>
</div>
</body>
- probleempje met includen php (inlogscript )
-
23-02-2011, 08:51 #1
- Berichten
- 316
- Lid sinds
- 17 Jaar
probleempje met includen php (inlogscript )
Laatst aangepast door LéonH : 23-02-2011 om 09:33
-
In de schijnwerper
[SNELLE LEVERING] Laat je website / webshop snel en professioneel bouwen!Freelance / WerkLinkbuilding uitbesteden - 25 jaar ervaring - Zie behaalde resultatenAdvertentieruimteProduct feed grid V1.7 - Creer een affiliate shop in 2 min - WP plugin - V1.7 NU LIVEPHP scripts[BELANGRIJK] Festinger Vault - Download 25.000 thema's en pluginsPromotie -
23-02-2011, 09:24 #2
- Berichten
- 1.263
- Lid sinds
- 16 Jaar
Re: probleempje met includen php (inlogscript )
Waarom uberhaupt 2x doctypes, head elementen, png fix etcetera includen?
-
23-02-2011, 09:31 #3
- Berichten
- 316
- Lid sinds
- 17 Jaar
Re: probleempje met includen php (inlogscript )
afgezien van het feit dat ik een aantal dingen dubbel included, waar zit de fout volgens jou?
-
23-02-2011, 09:50 #4
- Berichten
- 372
- Lid sinds
- 17 Jaar
Re: probleempje met includen php (inlogscript )
De fout zit volgens mij niet in deze pagina's, maar de fout zit in het ophalen van de gegevens. $profilUsers herkent die niet. Ik weet niet hoe je precies alle gegevens ophaalt maar probeer anders het volgende:
$select_data = mysql_query("SELECT * FROM leden WHERE id = '".$_SESSION['id']."'");
$get_liddata = mysql_fetch_assoc($select_data);
<? echo ''.$get_liddata['UserName'].''; ?>
-
23-02-2011, 10:48 #5
- Berichten
- 1.263
- Lid sinds
- 16 Jaar
Re: probleempje met includen php (inlogscript )
@Roy, NTUI
-
24-02-2011, 23:15 #6
- Berichten
- 316
- Lid sinds
- 17 Jaar
Re: probleempje met includen php (inlogscript )
probleem is opgelost. Ik moest zowel in top.php en index.php het volgende plaatsen:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Waarom weet ik ook niet, maar het werkt iig.
Thnx allen voor het meedenken
Plaats een
- + Advertentie
- + Onderwerp
Marktplaats
Webmasterforum
- Websites algemeen
- Sitechecks
- Marketing
- Domeinen algemeen
- Waardebepaling
- CMS
- Wordpress
- Joomla
- Magento
- Google algemeen
- SEO
- Analytics
- Adsense
- Adwords
- HTML / XHTML
- CSS
- Programmeren
- PHP
- Javascript
- JQuery
- MySQL
- Ondernemen algemeen
- Belastingen
- Juridisch
- Grafisch ontwerp
- Hosting Algemeen
- Hardware Info
- Offtopic