21 Replies Latest reply: Mar 24, 2013 5:09 PM by omunidades RSS

    error during execution

    omunidades Community Member

      Because this line is giving error:

       

      Notice: Undefined index: pagina in E:\wamp\www\html\conteudo.php on line 11.

       

      Line 11 switch ($_GET['pagina'])

       

      And

       

      SCREAM: Error suppression ignored for

        • 1. Re: error during execution
          Bjacz Community Member

          I have the same problem...

          • 2. Re: error during execution
            MurraySummers ACP/MVPs

            Your post looks truncated.  Can you try again, please?

            • 3. Re: error during execution
              omunidades Community Member

              WHY THE ERROR OCCURS DURING THIS STRETCH.

               

              ERROR 1>      Notice: Undefined index: pagina in E:\wamp\www\html\conteudo.php on line 11.

               

              This Line 11        switch ($_GET['pagina'])

               

              And

               

              ERROR 2>        SCREAM: Error suppression ignored for,

              • 4. Re: error during execution
                MurraySummers ACP/MVPs

                switch ($_GET['pagina'])

                 

                Are you calling this page with a URL variable (for example <a href="page_name.php?pagina=12"...)?

                 

                ERROR 2>        SCREAM: Error suppression ignored for,

                 

                What is the rest of this error message?

                 

                Have you tried reading the hits when you google this phrase - scream error suppression ignored for?

                • 5. Re: error during execution
                  omunidades Community Member

                  The entire file is this:

                  =========================

                  <!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">

                  <head>

                  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

                  <title>Documento sem título</title>

                  </head>

                  <body>

                  <?php

                   

                  ======================

                            line 11    ==>        switch ($_GET['pagina'])  {

                  -----------------------------

                           Notice: Undefined index: pagina in E:\wamp\www\html\conteudo.php on line 11.

                  ============================

                   

                    case 'servicos';

                            include "servicos.php";

                            break;

                   

                            case 'contato';

                            include "contato.php";

                            break;

                   

                   

                            default:

                            include "home.php";

                            break;

                  }

                  ?>

                  </body>

                  </html>

                   

                  ===================================

                  • 6. Re: error during execution
                    MurraySummers ACP/MVPs

                    Please give me a link to the page so I can see for myself what is happening.

                     

                    Also, this code is incorrect -

                     

                    case 'servicos';

                              include "servicos.php";

                              break;

                     

                              case 'contato';

                              include "contato.php";

                              break;

                     

                    It should be this -

                     

                    case 'servicos':

                              include "servicos.php";

                              break;

                     

                              case 'contato':

                              include "contato.php";

                              break;

                     

                    Finally, is this ACTUALLY in the page's code?

                     

                    ======================

                              line 11    ==>        switch ($_GET['pagina'])  {

                    -----------------------------

                             Notice: Undefined index: pagina in E:\wamp\www\html\conteudo.php on line 11.

                    ============================

                    • 7. Re: error during execution
                      omunidades Community Member

                      Hello Murray Summers

                      Thank you for replying,

                      He stated that according to the value of the variable "pagina" command will switch to one of the case.

                      Use the $ _GET to get the value of "pagina" for each case.

                      • 8. Re: error during execution
                        omunidades Community Member

                        Hello Murray Summers

                        Tank you for replying

                        Hello Murray Summers

                        Thank you for replying,

                        This is the error message


                         

                        SCREAM: supressão de erro ignorado
                        Notice: Undefined index: pagina in E: \ wamp \ www \ html conteudo.php \ na linha 11
                        Chamada de pilha
                        #TempoMemóriaFunçãoLocalização
                        10,0004244872{Main} ().. \ Index.php : 0
                        20,0013250144include ( 'E: \ wamp \ www \ html \ conteudo.php' )Index.php .. \ : 10

                        • 9. Re: error during execution
                          omunidades Community Member

                          Hello Murray Summers

                            As shown in the above error message continues.

                          Again thank you very much.

                          If possible answer here or in my email ==> scurachi@gmail.com .

                          I am Brasilian.

                          I have great difficulty in expressing myself in English.

                          My Dreamwavwe this in Pt-Br.

                           

                           

                           

                          file: conetudo.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">

                          <head>

                          <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

                          <title>Documento sem título</title>

                          </head>

                                                       <=== line in balnk

                          <body>

                                                         <==== line in blank

                          <?php

                                      switch ($_GET['pagina']){

                                   case 'servicos':

                                    include "servicos.php";

                                    break;

                           

                                    case 'contato':

                                    include "contato.php";

                                    break;

                           

                           

                                    default:

                                    include "home.php";

                                    break;

                          }

                          ?>

                          </body>

                          </html>

                           

                          ====================

                           

                          Thank you, now.

                          • 10. Re: error during execution
                            MurraySummers ACP/MVPs

                            Thank you!

                             

                            How is this page being loaded? Some other page must link to it with a URL variable specified, e.g., <a href="conetudo.php?pagina=contato">Contato</a>. Please tell me what that code is for the link.

                            • 11. Re: error during execution
                              omunidades Community Member

                              Hello Murray Summers.

                               

                              Of index.php for topo.php conteudo.php rodape. php (Headr, content and footer) of conteudo.php for menu.php (and home.php).

                               

                              home.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">

                              <head>

                              <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

                              <title>Documento sem título</title>

                              </head>

                              <?php

                              include "css.php";

                              ?>

                              <body>

                              <div id="geral_conteudo">

                                        <?php

                                        include "menu.php";

                                         ?>

                                  <div id="box_right">

                                  <h2>Box direito</h2>

                                  </div>

                              </div>

                              </body>

                              </html>

                               

                              menu.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">

                              <head>

                              <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

                              <title>Untitled Document</title>

                              </head>

                              <body>

                                        <div id="box_left">

                                  <ul>

                                            <li><a href="$pagina=home">Home</a></li>

                                            <li><a href="$pagina=servicos">Serviços</a></li>

                                            <li><a href="$pagina=contato">Contato</a></li>       

                                  </ul>

                                  </div>

                              </body>

                              </html>

                              • 12. Re: error during execution
                                omunidades Community Member

                                In index.php with ===> include "conteudo.php";

                                <a href = " conetudo.php pagina? = Contato "> Contato </ a>

                                 

                                This path will be done in MENU.

                                • 13. Re: error during execution
                                  bregent MVP

                                  You've got the question mark on the wrong side:

                                   

                                  <a href = " conetudo.php pagina? = Contato "> Contato </ a>

                                   

                                  should be

                                   

                                  <a href = "conetudo.php?pagina=Contato"> Contato </ a>

                                   

                                  You should also be testing if the querystring value is set and if not, generate a friendly error message, rather than allowing a runtime error.

                                  • 14. Re: error during execution
                                    omunidades Community Member

                                    You wrote.

                                     

                                    You should also be testing if the querystring value is set and if not, generate a friendly error message, rather than allowing a runtime error.


                                    I do not know how.

                                    Could teach me.

                                    I spent all the codes for you.

                                    Could test them and send them back.

                                    I would be very grateful.

                                    • 15. Re: error during execution
                                      MurraySummers ACP/MVPs

                                      I wonder why you are doing it this way in the first place.  There's no benefit to you other than making things much more complicated.

                                       

                                      In addition, your CSS is improperly placed on the page -

                                       

                                      </head>

                                      <?php

                                      include "css.php";

                                      ?>

                                      <body>

                                       

                                      Nothing should go between the </head> and the <body> tags.

                                       

                                      Finally, your css.php file contains spurious HTML (it's as if you would want the css.php page to be a stand-alone HTML page) - that's not going to work at all. It should be only this -

                                       

                                      <link href="css/topo.css" rel="stylesheet" type="text/css" />

                                      <link href="css/conteudo.css" rel="stylesheet" type="text/css" />

                                      <link href="css/rodape.css" rel="stylesheet" type="text/css" />

                                       

                                      I'll say again, this scheme is grossly overcomplicated. There's no reason to have all of this redirection and all of these files, when simple flat files would work fine.

                                      • 16. Re: error during execution
                                        omunidades Community Member

                                        Hello

                                        I have very little knowledge of HTML and CSS.

                                        During studies of video lessons the teacher explained it this way, which I thought was the best.

                                        I did not have a teacher present to answer my questions and difficulties. I had the feeling I was finishing my problems started when you answer me.

                                        My problem is on display in the corresponding area - (center) - the contents of the selected item in the menu without changing the header and footer and menu

                                        In the reports that have sent me a better and simpler.

                                        I need to figure out is how you will help me.

                                        I need a simple complete example. (Similarly my).

                                        Internet pages and the code is great for anyone who is in the beginning is very difficult.

                                        Finally, I'm not building a business page, but try to learn to build a website. Do not use frames brands. (No frames)

                                        My case is not commercial'm learning, I bought Dreamweaver to learn. (It was until I bought for it)

                                        I will always say THANK YOU, THANK YOU, THANK YOU.

                                        • 17. Re: error during execution
                                          MurraySummers ACP/MVPs

                                          Let me speak candidly (frankly). This is an absurd way for someone who has 'very little knowledge of HTML and CSS' to build this site. It's like trying to go from Venice to Rome by way of Barcelona.

                                           

                                          Each page on your site should be a derivative of this code -

                                           

                                          <!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">

                                          <head>

                                          <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

                                          <title>JOSE FERREIRA DA SILVA</title>

                                          <link href="css/topo.css" rel="stylesheet" type="text/css" />

                                          <link href="css/conteudo.css" rel="stylesheet" type="text/css" />

                                          <link href="css/rodape.css" rel="stylesheet" type="text/css" />

                                          </head>

                                           

                                          <body>

                                          <div id="geral_conteudo">

                                                    <div id="box_left">

                                              <ul>

                                                        <li><a href="home.html">Home</a></li>

                                                        <li><a href="servicos.html">Serviços</a></li>

                                                        <li><a href="contato.html">Contato</a></li>      

                                              </ul>

                                              </div>

                                              <div id="box_right">

                                              <h2>Box direito</h2>

                                              </div>

                                          </div>

                                          </body>

                                          </html>

                                           

                                          There are no tricky includes, no PHP, everything is straight forward and simple. There is no need and definitely no benefit to the contorted approach you have posted here, particularly for someone who is just learning!

                                          • 18. Re: error during execution
                                            omunidades Community Member

                                            The codes are really hard, I was not I who "created" just typed the videos describing the lessons.

                                            The way you reported in the previous message I must have:

                                            a) a header.

                                            b) a menu     ===> box direito

                                            c) a footer

                                            And every time you decide for one of the menu options, show the three items again.

                                            Or does not need to show the header, menu ==> right box, and footer

                                            • 19. Re: error during execution
                                              MurraySummers ACP/MVPs

                                              Sorry - I do not understand this post.

                                              • 20. Re: error during execution
                                                bregent MVP

                                                >I have very little knowledge of HTML and CSS.

                                                 

                                                What is it you are trying to learn? What tutorial are you following?

                                                 

                                                It generally a good idea to have a solid knowledge of HTML and CSS before learning PHP or other scripting language. I'd suggest learning to walk before you run.

                                                • 21. Re: error during execution
                                                  omunidades Community Member

                                                  Hello

                                                  I would like to thank you once again.

                                                  I make a very simple site.

                                                  Gave great result.

                                                  More my doubts You do not understand, was:

                                                  1 - How to put new information on a screen that already has content without changing it.

                                                  2 - When placing new information on the screen to the previous screen information is deleted.

                                                  3 - How to solve this.

                                                   

                                                   

                                                  It is very difficult for me to communicate in English.

                                                  I have to use Google Trandutor. And you do not understand anything of what I write.

                                                  Do you have any tutorial of HTML and CSS that could indicate me.

                                                   

                                                   

                                                  Thank you.

                                                  I finish here.

                                                  Congratulations for the great work done here.