Jump to content

PHP Unidentified Index


LegendSama

Recommended Posts

Dear everyone!

 

I am working on a project for my school... sadly i need help!!!!

 

i need to make a survey with the use of CSS, HTML and PHP.

The HTML and CSS part is done:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Hypotheek Shop</title>
<style type="text/css">
body
{
   background-color: #000000;
   background-image: url(images/4_01.jpg);
   background-repeat: no-repeat;
   background-position: center top;
   color: #000000;
}
</style>
<style type="text/css">
p, span, div, ol, ul, li, td, button, input, textarea, form
{
   margin: 0;
   padding: 0;
}
a
{
   color: #0000FF;
   outline: none;
   text-decoration: underline;
}
a:visited
{
   color: #800080;
}
a:active
{
   color: #0000FF;
}
a:hover
{
   color: #376BAD;
   text-decoration: underline;
}
</style>
<style type="text/css">
#Image1
{
   border: 1px #000000 solid;
}
#Image4
{
   border: 1px #000000 solid;
}
#Image6
{
   border: 0px #000000 solid;
}
#Image7
{
   border: 0px #000000 solid;
}
#wb_Text3 
{
   background-color: transparent;
   border: 0px #000000 solid;
   padding: 0;
}
#wb_Text3 div
{
   text-align: left;
}
#Image12
{
   border: 0px #000000 solid;
}
#Image13
{
   border: 0px #000000 solid;
}
#Image14
{
   border: 0px #000000 solid;
}
#wb_Text7 
{
   background-color: transparent;
   border: 0px #000000 solid;
   padding: 0;
}
#wb_Text7 div
{
   text-align: left;
}
#wb_Form1
{
   background-color: #FAFAFA;
   border: 0px #000000 solid;
}
#wb_Text1 
{
   background-color: transparent;
   border: 0px #000000 solid;
   padding: 0;
}
#wb_Text1 div
{
   text-align: left;
}
#Combobox1
{
   border: 1px #C0C0C0 solid;
   background-color: #FFFFFF;
   color: #000000;
   font-family: Arial;
   font-size: 13px;
}
#wb_Text2 
{
   background-color: transparent;
   border: 0px #000000 solid;
   padding: 0;
}
#wb_Text2 div
{
   text-align: left;
}
#Combobox2
{
   border: 1px #C0C0C0 solid;
   background-color: #FFFFFF;
   color: #000000;
   font-family: Arial;
   font-size: 13px;
}
#wb_Text4 
{
   background-color: transparent;
   border: 0px #000000 solid;
   padding: 0;
}
#wb_Text4 div
{
   text-align: left;
}
#TextArea1
{
   border: 1px #C0C0C0 solid;
   background-color: #FFFFFF;
   color :#000000;
   font-family: Arial;
   font-size: 13px;
   text-align: left;
}
#Button1
{
   color: #000000;
   font-family: Arial;
   font-size: 13px;
}
</style>
</head>
<body>
<div id="wb_Text111" style="position:absolute;left:416px;top:339px;width:180px;height:42px;z-index:36;">
<span style="color:#FF0000;font-family:Arial;font-size:37px;">F Dersjant</span></div>
<div id="wb_Image1" style="position:absolute;left:85px;top:1px;width:842px;height:1415px;z-index:7;padding:0;">
<img src="images/BG%2520darkend.png" id="Image1" alt="" border="1" style="width:840px;height:1413px;"></div>
<div id="wb_Image4" style="position:absolute;left:115px;top:331px;width:780px;height:846px;z-index:8;padding:0;">
<img src="images/BG%2520darkend.png" id="Image4" alt="" border="1" style="width:778px;height:844px;"></div>
<div id="wb_Image6" style="position:absolute;left:440px;top:21px;width:124px;height:44px;z-index:9;padding:0;">
<img src="images/Home.png" id="Image6" alt="" border="0" style="width:124px;height:44px;"></div>
<div id="wb_Image7" style="position:absolute;left:104px;top:100px;width:800px;height:206px;z-index:10;padding:0;">
<img src="images/Remake%2520banner.png" id="Image7" alt="" border="0" style="width:800px;height:206px;"></div>
<div id="wb_Text3" style="position:absolute;left:203px;top:151px;width:610px;height:192px;z-index:11;">
<span style="color:#FFD700;font-family:Arial;font-size:85px;">Web Hypotheek</span></div>
<div id="wb_Image12" style="position:absolute;left:116px;top:332px;width:778px;height:60px;z-index:12;padding:0;">
<img src="images/img0002.png" id="Image12" alt="" border="0" style="width:778px;height:60px;"></div>
<div id="wb_Image13" style="position:absolute;left:440px;top:21px;width:124px;height:44px;z-index:13;padding:0;">
<img src="images/Home.png" id="Image13" alt="" border="0" style="width:124px;height:44px;"></div>
<div id="wb_Image14" style="position:absolute;left:104px;top:100px;width:800px;height:206px;z-index:14;padding:0;">
<img src="images/Remake%2520banner.png" id="Image14" alt="" border="0" style="width:800px;height:206px;"></div>
<div id="wb_Text7" style="position:absolute;left:203px;top:151px;width:610px;height:192px;z-index:15;">
<span style="color:#FFD700;font-family:Arial;font-size:85px;">Web Hypotheek</span></div>
<div id="wb_Form1" style="position:absolute;left:126px;top:403px;width:758px;height:888px;z-index:17;">
<form name="Form1" method="GET" action="script.php" enctype="text/plain" id="Form1">
<div id="wb_Text1" style="position:absolute;left:10px;top:15px;width:285px;height:16px;z-index:0;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Bij hem/haar heb je veel vrijheid</span></div>
<select name="Combobox1" size="1" id="Combobox1" name="Combobox1" style="position:absolute;left:326px;top:15px;width:200px;height:25px;z-index:1;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text2" style="position:absolute;left:10px;top:45px;width:285px;height:16px;z-index:2;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Als je iets niet snapt heeft hij/zij daar begrip voor</span></div>
<select name="Combobox2" size="1" id="Combobox2" name="Combobox2" style="position:absolute;left:326px;top:45px;width:200px;height:25px;z-index:3;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text4" style="position:absolute;left:10px;top:75px;width:285px;height:16px;z-index:4;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Hij/zij doet vriendelijk tegen cursisten</span></div>
<select name="Combobox3" size="1" id="Combobox3" name="Combobox3" style="position:absolute;left:326px;top:75px;width:200px;height:25px;z-index:5;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text5" style="position:absolute;left:10px;top:105px;width:285px;height:16px;z-index:6;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Hij/zij is ontevreden</span></div>
<select name="Combobox4" size="1" id="Combobox4" name="Combobox4" style="position:absolute;left:326px;top:105px;width:200px;height:25px;z-index:7;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text6" style="position:absolute;left:10px;top:135px;width:285px;height:16px;z-index:8;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Hij/zij stelt hoge eisen aan leerlingen</span></div>
<select name="Combobox5" size="1" id="Combobox5" name="Combobox5" style="position:absolute;left:326px;top:135px;width:200px;height:25px;z-index:9;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text8" style="position:absolute;left:10px;top:165px;width:285px;height:16px;z-index:10;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Hij/zij is bereid om iets opnieuw uit te leggen</span></div>
<select name="Combobox6" size="1" id="Combobox6" name="Combobox6" style="position:absolute;left:326px;top:165px;width:200px;height:25px;z-index:11;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text9" style="position:absolute;left:10px;top:195px;width:285px;height:16px;z-index:12;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Hij/zij is uit zijn humeur</span></div>
<select name="Combobox7" size="1" id="Combobox7" name="Combobox7" style="position:absolute;left:326px;top:195px;width:200px;height:25px;z-index:13;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text10" style="position:absolute;left:10px;top:225px;width:285px;height:16px;z-index:14;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Hij/zij laat de leerling hun gang gaan</span></div>
<select name="Combobox8" size="1" id="Combobox8" name="Combobox8" style="position:absolute;left:326px;top:225px;width:200px;height:25px;z-index:15;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text11" style="position:absolute;left:10px;top:255px;width:285px;height:16px;z-index:16;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Hij/zij kan kwaad worden</span></div>
<select name="Combobox9" size="1" id="Combobox9" name="Combobox9" style="position:absolute;left:326px;top:255px;width:200px;height:25px;z-index:17;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text12" style="position:absolute;left:10px;top:285px;width:285px;height:16px;z-index:18;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Hij/zij houdt streng orde</span></div>
<select name="Combobox10" size="1" id="Combobox10" name="Combobox10" style="position:absolute;left:326px;top:285px;width:200px;height:25px;z-index:19;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text13" style="position:absolute;left:10px;top:315px;width:285px;height:16px;z-index:20;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Hij/zij kan goed leiding geven</span></div>
<select name="Combobox11" size="1" id="Combobox11" name="Combobox11" style="position:absolute;left:326px;top:315px;width:200px;height:25px;z-index:21;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text14" style="position:absolute;left:10px;top:345px;width:285px;height:16px;z-index:22;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Hij/zij treedt slap op</span></div>
<select name="Combobox12" size="1" id="Combobox12" name="Combobox12" style="position:absolute;left:326px;top:345px;width:200px;height:25px;z-index:23;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text15" style="position:absolute;left:10px;top:375px;width:285px;height:16px;z-index:24;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Je leert veel bij hem/haar</span></div>
<select name="Combobox13" size="1" id="Combobox13" name="Combobox13" style="position:absolute;left:326px;top:375px;width:200px;height:25px;z-index:25;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text16" style="position:absolute;left:10px;top:405px;width:285px;height:16px;z-index:26;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Hij/zij is driftig</span></div>
<select name="Combobox14" size="1" id="Combobox14" name="Combobox14" style="position:absolute;left:326px;top:405px;width:200px;height:25px;z-index:27;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text17" style="position:absolute;left:10px;top:435px;width:285px;height:16px;z-index:28;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Hij/zij heeft een prettige sfeer in de klas</span></div>
<select name="Combobox15" size="1" id="Combobox15" name="Combobox15" style="position:absolute;left:326px;top:435px;width:200px;height:25px;z-index:29;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text18" style="position:absolute;left:10px;top:465px;width:285px;height:16px;z-index:30;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Hij/zij treedt aarzelend op</span></div>
<select name="Combobox16" size="1" id="Combobox16" name="Combobox16" style="position:absolute;left:326px;top:465px;width:200px;height:25px;z-index:31;">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div id="wb_Text19" style="position:absolute;left:10px;top:505px;width:306px;height:16px;z-index:32;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Kun je aangeven wat je prettig vindt aan de lessen?</span></div>
<textarea name="TextArea1" id="TextArea1" style="position:absolute;left:326px;top:505px;width:198px;height:98px;z-index:33;" rows="5" cols="27"></textarea>
<div id="wb_Text20" style="position:absolute;left:10px;top:610px;width:306px;height:16px;z-index:34;">
<span style="color:#000000;font-family:Arial;font-size:13px;">Kun je aangeven wat je niet leuk vindt aan de lessen</span></div>
<textarea name="TextArea2" id="TextArea2" style="position:absolute;left:326px;top:610px;width:198px;height:98px;z-index:35;" rows="5" cols="27"></textarea>
<input type="submit" id="Button1" name="submit" value="Submit" style="position:absolute;left:326px;top:720px;width:198px;height:20px;z-index:35;">
</form>
</div>
</body>
</html>

 

But now comes my problem! i get a error in PHP but dont know why or how to remove the problem!

 

<?php

$Combobox1 = $_POST['Combobox1'];				
$Combobox2 = $_POST['Combobox2'];
$Combobox3 = $_POST['Combobox3'];
$Combobox4 = $_POST['Combobox4'];
$Combobox5 = $_POST['Combobox5'];
$Combobox6 = $_POST['Combobox6'];
$Combobox7 = $_POST['Combobox7'];
$Combobox8 	= $_POST['Combobox8'];
$Combobox9 	= $_POST['Combobox9'];
$Combobox10 	= $_POST['Combobox10'];
$Combobox11 	= $_POST['Combobox11'];
$Combobox12 	= $_POST['Combobox12'];
$Combobox13 	= $_POST['Combobox13'];
$Combobox14 	= $_POST['Combobox14'];
$Combobox15 	= $_POST['Combobox15'];
$Combobox16 	= $_POST['Combobox16'];
$TextArea1	= $_POST['TextArea1'];
$TextArea2	= $_POST['TextArea2'];



$antwoordOS = ($Combobox1 + $Combobox8);
	echo "<br>";
echo "OS = $antwoordOS";

	$antwoordSO = ($Combobox2 + $Combobox6);
	echo "<br>";
echo "SO = $antwoordSO";

	$antwoordSB = ($Combobox3 + $Combobox15);
	echo "<br>";
echo "SB = $antwoordSB";

	$antwoordTO = ($Combobox4 + $Combobox7);
	echo "<br>";
echo "TO = $antwoordTO";

	$antwoordBT = ($Combobox5 + $Combobox10);
	echo "<br>";
echo "BT = $antwoordBT";

	$antwoordTB = ($Combobox9 + $Combobox14);
	echo "<br>";
echo "TB = $antwoordTB";

	$antwoordBS = ($Combobox11 + $Combobox13);
	echo "<br>";
echo "BS = $antwoordBS";

	$antwoordOT = ($Combobox12 + $Combobox16);
	echo "<br>";
echo "OT = $antwoordOT";									

echo "<br>";
echo "Vraag 17 en 18 zijn altijd goed! (Een mening is altijd goed!)";

?>

 

Now i get the error on every line! am i missing some script??? or do i need to use something els than combo boxes?

 

Notice: Undefined index: Combobox1 in C:\xampp\htdocs\script.php on line 3

Notice: Undefined index: Combobox2 in C:\xampp\htdocs\script.php on line 4

Notice: Undefined index: Combobox3 in C:\xampp\htdocs\script.php on line 5

Notice: Undefined index: Combobox4 in C:\xampp\htdocs\script.php on line 6

Notice: Undefined index: Combobox5 in C:\xampp\htdocs\script.php on line 7

Notice: Undefined index: Combobox6 in C:\xampp\htdocs\script.php on line 8

Notice: Undefined index: Combobox7 in C:\xampp\htdocs\script.php on line 9

Notice: Undefined index: Combobox8 in C:\xampp\htdocs\script.php on line 10

Notice: Undefined index: Combobox9 in C:\xampp\htdocs\script.php on line 11

Notice: Undefined index: Combobox10 in C:\xampp\htdocs\script.php on line 12

Notice: Undefined index: Combobox11 in C:\xampp\htdocs\script.php on line 13

Notice: Undefined index: Combobox12 in C:\xampp\htdocs\script.php on line 14

Notice: Undefined index: Combobox13 in C:\xampp\htdocs\script.php on line 15

Notice: Undefined index: Combobox14 in C:\xampp\htdocs\script.php on line 16

Notice: Undefined index: Combobox15 in C:\xampp\htdocs\script.php on line 17

Notice: Undefined index: Combobox16 in C:\xampp\htdocs\script.php on line 18

Notice: Undefined index: TextArea1 in C:\xampp\htdocs\script.php on line 19

Notice: Undefined index: TextArea2 in C:\xampp\htdocs\script.php on line 20

 

Tnx in advance!!!

 

P.S. I would like to do this without a database!

Link to comment
Share on other sites

Found the problem! tnx anyways!!!

 

For anyone who could get the same problem here is what i did wrong:

 

<form name="Form1" method="GET" action="script.php" enctype="text/plain" id="Form1">

 

and changed it to

 

<form name="Form1" method="POST" action="script.php"  id="Form1">

 

The GET needed to be changed to POST and the enctype="text/plain had to be removed!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.