Hey, nu er jeg saa her igen, igen..
jeg har lavet et eller andet galt i min kode, problemet er at jeg ikke aner hvad det er, men den virker ikke.. (God beskrivelse ikk'..
)
her er min kode:
<?php
// Inkluder starten af siden \\\include("../include/kalender.php");
?>
<?php
$maaneder = array("Januar","Febuar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December",);
$pos = date("n")-1; //Er det i Marts giver date funktionen 3, trækkes 1 fra har vi positionen i arrayet ovenfor
$pos_nu = date("n");
$pos_1 = date("n")+1;
$aar = date("o");
?>
<div class="content">
<h3>Tilføg ewent</h3>
<form method="post" name="guestform">
<div class="area100">
<label for="title">Overskrift</label><br />
<input type="text" name="txttitle" />
</div>
<div class="area100">
<label for="hvem">for</label><br />
<input type="text" name="txthvem" value="Alle" />
</div>
<div class="area100">
<table width="100%">
<tr>
<td>Dag</td>
<td>Måned</td>
<td width="90%">år</td>
</tr>
<tr>
<td>
<select name="txtday" size="1">
<option>01</option>
<option>02</option>
<option>03</option>
<option>04</option>
<option>05</option>
<option>06</option>
<option>07</option>
<option>08</option>
<option>09</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
</select>
</td>
<td>
<select name="txtmonth" size="1">
<option>01</option>
<option>02</option>
<option>03</option>
<option>04</option>
<option>05</option>
<option>06</option>
<option>07</option>
<option>08</option>
<option>09</option>
<option>10</option>
<option>11</option>
<option>12</option>
</select>
</td>
<td><input type="text" name="txtyear" maxlength="4" value="<?php echo date("o"); ?>" /></td>
</tr>
</table>
</div>
<div class="area100">
<table>
<tr>
<td>Time</td>
<td>Minnuter</td>
</tr>
<tr>
<td>
<select name="txttime" size="1">
<option>00</option>
<option>01</option>
<option>02</option>
<option>03</option>
<option>04</option>
<option>05</option>
<option>06</option>
<option>07</option>
<option>08</option>
<option>09</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
</select>
</td>
<td>
<select name="txtmin" size="1">
<option>00</option>
<option>01</option>
<option>02</option>
<option>03</option>
<option>04</option>
<option>05</option>
<option>06</option>
<option>07</option>
<option>08</option>
<option>09</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
<option>32</option>
<option>33</option>
<option>34</option>
<option>35</option>
<option>36</option>
<option>37</option>
<option>38</option>
<option>39</option>
<option>40</option>
<option>41</option>
<option>42</option>
<option>43</option>
<option>44</option>
<option>45</option>
<option>46</option>
<option>47</option>
<option>48</option>
<option>49</option>
<option>50</option>
<option>51</option>
<option>52</option>
<option>53</option>
<option>54</option>
<option>55</option>
<option>56</option>
<option>57</option>
<option>58</option>
<option>59</option>
</select>
</td>
</tr>
</table>
</div>
<div class="area100">
Gentag <br />
<select name="txtrepite" size="1">
<option value="0">Aldrig</option>
<option value="1">årligt</option>
</select>
</div>
<input type="submit" name="btnSign" value="Send kommentar" class="submit" />
</form>
</div>
<?php
include("../connect.php"); //Inkluder filen der connecter til min database
if(isset($_POST['btnSign']))
{
include("../connect.php"); //Inkluder filen der connecter til min database
$title = trim($_POST['txttitle']);
$hvem = trim($_POST['txthvem']);
$day = trim($_POST['txtday']);
$month = trim($_POST['txtmonth']);
$year = trim($_POST['txtyear']);
$time = trim($_POST['txttime']);
$min = trim($_POST['txtmin']);
$query = "INSERT INTO kalender (title,
hvem,
day,
beskmonthed,
year,
time,
min)
VALUES ('$title',
'$hvem',
'$day',
'$month',
'$year',
'$time',
'$min')";
mysql_query($query) or die('Error, query failed');
header('Location: kalender_index.php');
exit;
}
?>
</div>
<br class="clear" />
</div>
<br class="clear" />
</div>
<img src="../images/tab_over.gif" style="display: none; visibility:hidden; width:0; height:0; position:absolute; top: -100px; left: -200px;" alt="I am soooo fake pre-loading this image so the navigation doesn't skip while loading the over state. I know I could use the sliding doors technique to avoid this fate, but I am too lazy." />
</body>
</html>
Ville blive meget glad, hvis i kunne finde fejlen, og tager ogsaa meget gerne imod forbedringer til min kodestil..
/Duck