473,549 Members | 2,616 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Notice: Undefined offset: 2 in /public/sites/www.mooi-by-rick.nl/afscheid.php on line

3 New Member
This message is shown on the website. Below the PHP code.

Who can tell me what went wrong?

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. include("_includes/head.php");
  3. include("_includes/popup.php");
  4. ?>
  5.  
  6.     <div style="margin: 0px 50px 0px 0px;">
  7.         <img src="_images/menu/titel_afscheid.gif" width="140" height="29" alt="" border="0" align="right" hspace="0" vspace="0">
  8.     </div>
  9.     <p><br><br>
  10. U staat voor het verdrietige moment om afscheid te moeten nemen van een dierbaar familielid. Aan zo’n laatste afscheid wordt veel zorg besteed. Een bloemengroet is daarvan een belangrijk onderdeel.
  11. <br /><br />
  12. Bijvoorbeeld:
  13. <br /><br />
  14. <ul>
  15. <li>Een bloemstuk waarin de lievelingsbloemen van de overledene zijn verwerkt</li> 
  16. <li>Een speciale tekst op lint of kaart</li>
  17. <li>Een persoonlijk aandenken verwerkt in het bloemstuk</li>
  18. </ul>
  19. <br /><br />
  20. </p>
  21. <p>
  22. Om uw wensen in alle rust met u te bespreken, bieden wij u de mogelijkheid om dit bij u thuis in uw eigen vertrouwde omgeving te doen. Wij zullen u een aantal voorbeelden laten zien en de vele mogelijkheden met u doornemen.
  23. <br /><br />
  24. Als u uw keuze heeft gemaakt zullen wij uw opdracht met de grootst mogelijke zorg uitvoeren.
  25. <br />
  26. <br /><?php 
  27.             ////fotoscript
  28.                 $target = '_images/afscheid_nemen/'; //de folder die je wil
  29.                 $breedte = '2'; //de hoeveelheid thumbs naast elkaar
  30.                 $counter = '0'; //maak een variabele aan voor de counter
  31.                 $dir = opendir($target); //nodig voor het script
  32.  
  33.                 echo '<table border="0px" width="99%" cellpadding="5px"><tr>';
  34.                     while (false !== ($file = readdir($dir))) { 
  35.                         if (($file !== ".")&&($file !== "..")&&($file !== ".DS_Store")) { 
  36.                         list($filename, $ext) = explode(".", $file); 
  37.                         list($main, $sub, $include) = explode("/", $_SERVER['PHP_SELF']); 
  38.                             if ($ext == "jpg"||$ext == "png"||$ext == "gif") { 
  39.                                 echo '<td width="300" align="right">';
  40.                                 ?>
  41.                                     <a onclick="javascript:popBeeld ('<? echo ''.$target.$file.''; ?>');" href="javascript:void(0);"><img src="<? echo ''.$target.$file.''; ?>" width="200" alt="" border="0"></a>
  42.                                 <?   
  43.                                 $counter++;
  44.                                 echo '</td>';
  45.                                 if ($counter == "$breedte") {
  46.                                  echo '</tr><tr>';
  47.                                  $counter = 0; }
  48.                             } 
  49.                         } 
  50.                     }
  51.                 echo '</tr></table>';
  52.  
  53.             ?>
  54.  
  55.  
  56. <?php
  57. include("_includes/bottom.php");
  58. ?>
Aug 24 '15 #1
3 1463
keesmoen
3 New Member
If the line numbers are correct the error is found in (37):
list($main, $sub, $include) = explode("/", $_SERVER['PHP_SELF']);

Who can tell me how to solve this error.

Example is found on:
[url]www.mooi-by-rick.nl[url] /Boeketten&Rozen/Afscheid nemen
Aug 24 '15 #2
Bharat383
93 New Member
You can change with this :
@list($main, $sub, $include) = explode("/", $_SERVER['PHP_SELF']);

with the "@" sign, the error will be disappear.
Sep 2 '15 #3
keesmoen
3 New Member
Thanks, I changed the code and now rhere are no more messages.
Sep 2 '15 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4568
by: google | last post by:
Hello, I'm having major problems trying to get my head round this problem. I'm trying to generate an error free script, however, I still cannot sort out this loop. I get a "Notice: Undefined offset: 24 in c:\inetpub\wwwroot\classes\file.php on line 348"
6
18542
by: raydiamond4u | last post by:
Hello. My name is Raymond. My code is generating the following error: Notice: Undefined offset: 2 in C:\wamp\www\imagegallery\supportfile\include\config.php on line 25 How do i correct the error? Here is the code: <?php // Include file for database connectivity $db_server = "localhost";
1
5125
by: atang | last post by:
Hi, I found the code here, it's excately what i am looking for, ie8 give this error "Notice: Undefined offset: 49 in.." which is this line "if ($num_of_chars==$required)", i'm a newbie, i don't know how to overcome this error, so can someone please help me out? thanks, $string = "one two three"; $word_array = explode(" ",$string); for...
6
7519
by: tbebest | last post by:
Hi , i have a form and it has A problem: i upload my 3 image and it uploaded in definded path but in insert in db filed there are empty: Notice: Undefined offset: 0 in C:\wamp\www Notice: Undefined offset: 1 in C:\wamp\www Notice: Undefined offset: 2 in C:\wamp\www i think scope of my Array variable : newsimg has a problem. <div...
4
7318
by: Kevon | last post by:
Hello, I'm designing a photo gallery for my website, I've followed several tutorials online about how to go about doing this, with great success, I have come up with a set of codes, however I keep getting several error messages when I run my code. Furthermore I'm a beginner at PHP programming so please bare with me. the error message I get...
1
2321
by: Essiej | last post by:
Hi, I'm getting the error: undefined offset 1 on line 5 of cart.tpl and undefined offset 2 on line 6 of cart.tpl. The lines in this file are: 1 <?php 2
2
1766
by: hanxiao | last post by:
Notice: Undefined offset: 5 in D:\xampp\htdocs\dianlu2010\sys\inc\function.php on line 237 function showtable($var,$up,$down,$left) { global $tree,$linktype; $a1='<table border="0" cellpadding="0" cellspacing="0" class="mainTB"> <tr> <td '; $a2_w='class="blankFile"'; $a2_b='class="blackFile"'; $a3='></td> <td rowspan="2" ';...
0
7451
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7473
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7810
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6044
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3483
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1944
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1061
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
764
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.