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
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?
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>
===================================
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.
============================
Hello Murray Summers
Tank you for replying
Hello Murray Summers
Thank you for replying,
This is the error message
| Chamada de pilha | ||||
|---|---|---|---|---|
| # | Tempo | Memória | Função | Localização |
| 1 | 0,0004 | 244872 | {Main} () | .. \ Index.php : 0 |
| 2 | 0,0013 | 250144 | include ( 'E: \ wamp \ www \ html \ conteudo.php' ) | Index.php .. \ : 10 |
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.
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).
<!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>
<!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>
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.
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.
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!
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
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.
North America
Europe, Middle East and Africa
Asia Pacific