Autor |
Nachricht |
Andro007
Threadersteller
Dabei seit: 13.12.2006
Ort: FFM
Alter: -
Geschlecht:
|
Verfasst Mo 26.02.2007 14:53
Titel [php] Problem mit html und php |
|
|
Hallo,
habe ein kleines problem. undzwa habe ich ein php datei erstellt die mit ein session beginnt.
Jedoch zeigt er mit den TIETEL der Seite nicht an.
Mein code sieht so aus.
Code: |
<?php session_start();?>
<?php require("connect.inc.php");?>
<?php if(!isset($_POST['submit'])){ ?>
<form action="index2.php" method="post">
<head>
<title>MEIN TITEL</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="author" content="ANDRO">
<meta name="keywords" content="KEYWORDS">
<meta name="description" content="DESCRIPTION.">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel="stylesheet" type="text/css" href="daten/link.css">
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:200px;
height:115px;
z-index:2;
left: 842px;
top: 2px;
}
.Stil1 {
color: #FE6869;
font-weight: bold;
}
.Stil2 {
color: #78A7EF;
font-weight: bold;
}
#Layer2 {
position:absolute;
width:166px;
height:64px;
z-index:2;
left: 42px;
top: 708px;
}
.Stil3 {color: #FFFFFF}
-->
</style>
<style>
.rahmen {
border: #000000;
border-style: dotted;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
}
.Stil4 {color: #000000}
</style>
</head> |
Was ist daran falsch das es mir im IE und Firefox im Fenstertitel / Unbekannte Seite anzeig?
Wenn ich den Code direkt aus dem explorer auswähle sieht er so aus :
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=iso-8859-1" />
<title>Unbenanntes Dokument</title>
</head>
<body>
</body>
</html>
<form action="index2.php" method="post">
<head>
<title>MEIN TITEL</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="author" content="Andro">
<meta name="keywords" content="KEYWORDS">
<meta name="description" content="DESCRIPTION">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel="stylesheet" type="text/css" href="daten/link.css">
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:200px;
height:115px;
z-index:2;
left: 842px;
top: 2px;
}
.Stil1 {
color: #FE6869;
font-weight: bold;
}
.Stil2 {
color: #78A7EF;
font-weight: bold;
}
#Layer2 {
position:absolute;
width:166px;
height:64px;
z-index:2;
left: 42px;
top: 708px;
}
.Stil3 {color: #FFFFFF}
-->
</style>
<style>
.rahmen {
border: #000000;
border-style: dotted;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
}
.Stil4 {color: #000000}
</style>
</head>
|
Was machen?
//edit by barett
Dein Capslock klemmt.
Zuletzt bearbeitet von Barett am Mo 26.02.2007 15:36, insgesamt 1-mal bearbeitet
|
|
|
|
|
saucer
Dabei seit: 19.05.2002
Ort: München
Alter: 43
Geschlecht:
|
Verfasst Mo 26.02.2007 14:56
Titel Re: [PHP] PROBLEM mit HTML und PHP |
|
|
Andro007 hat geschrieben: |
WAS MACHEN?? |
dein <title> ist nicht im <head> sondern in einem <form>.
|
|
|
|
|
Anzeige
|
|
|
Benutzer 28377
Account gelöscht
Ort: -
|
Verfasst Mo 26.02.2007 15:01
Titel
|
|
|
Sorry, aber dein Quelltext von PHP und HTML sieht grottenhaft aus !
Bevor du jetzt weitermachst, schaue dir erstmal den Grundaufbau einer HTML-Seite an.
Wenn das schon nicht klar ist, brauchst du mit PHP nicht weitermachen.
Zitat: | <?php session_start();?>
<?php require("connect.inc.php");?>
<?php if(!isset($_POST['submit'])){ ?> |
Was soll ?
Besser so:
Code: | <?php
session_start();
require("connect.inc.php");
if(!isset($_POST['submit'])){
?> |
Wird SESSION überhaupt benötigt ?
oder das:
Zitat: | <form action="index2.php" method="post">
<head> |
Seit wann kommt ein FORM-Tag vor Body ?
Wo hast du das gesehen ?
Oder das:
Zitat: | </body>
</html>
<form action="index2.php" method="post">
<head> |
Das ist totaler Unfug !
Zuletzt bearbeitet von am Mo 26.02.2007 15:02, insgesamt 1-mal bearbeitet
|
|
|
|
|
kYk1
Dabei seit: 21.02.2007
Ort: -
Alter: -
Geschlecht: -
|
Verfasst Mo 26.02.2007 15:02
Titel
|
|
|
Kannst du mir erklären was du mit diesem <form action="index2.php" method="post"> vor dem head bezwecken willst?
Head kommt vor Inhalt... also was du da geschrieben hast ist sehr konfus
Kennst du den normalen Aufbau einer HTML Datei?
<html><head></head><body></body></html>
Im Head muss dien Titel stehen und 'alles' was angezeigt werden soll, sollte im body stehen.
Da zwar head definiert hast, aber sonst nichts anderes, hast du am ende 2x head und damit kann der browser nichts mehr anfangen, muss schon im 1. stehen... Oo
EDIT: zuuu langsam. ^^
Zuletzt bearbeitet von kYk1 am Mo 26.02.2007 15:04, insgesamt 2-mal bearbeitet
|
|
|
|
|
magicslider
Dabei seit: 04.02.2007
Ort: WW
Alter: -
Geschlecht:
|
Verfasst Mo 26.02.2007 15:03
Titel
|
|
|
oh backe ist das ein schwachflug, lern mal html, bevor du was mit php machen willst:
Code: |
<html>
<head><title>etwas bleede ?</title><meta ... /></head>
<body><form> ...</form></body>
</html>
|
|
|
|
|
|
Benutzer 28377
Account gelöscht
Ort: -
|
Verfasst Mo 26.02.2007 15:08
Titel
|
|
|
Ich glaube er hat es verstanden
|
|
|
|
|
saucer
Dabei seit: 19.05.2002
Ort: München
Alter: 43
Geschlecht:
|
Verfasst Mo 26.02.2007 15:10
Titel
|
|
|
haben wohl alle zeitgleich gepostet cix.
|
|
|
|
|
|
|
|
Ähnliche Themen |
HTML/CSS Problem mit <html><body> komischer Abstand unten
Problem mit HTML/CSS
html problem
[PROBLEM] mit VB In HTML
HTML & CSS Problem
Flash - Html - problem
|
|