Det er forståeligt. :-)
Her kommer den.
Først min index.html.(det er til jeg har styr på det):
<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>
Derefter min uploader.php:
<?php
$target_path = "files/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}
Den gemmer filen fint i den mappe jeg har lavet til det.
Men nu er opgaven at jeg skal have smidt det ind i mysql, og det vil den ikke. Jeg har prøvet med flere koder uden held.
min XML fil ser sådan ud:
<?xml version="1.0" encoding="UTF-8"?>
-<dataroot generated="2016-01-12T16:31:20" xsi:noNamespaceSchemaLocation="Web.xsd" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:od="urn:schemas-microsoft-com:officedata">
-<Web>
<Id>1</Id>
<Sag>505</Sag>
<Lokation>111</Lokation>
</Web>
-<Web>
<Id>2</Id>
<Sag>80DP</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>3</Id>
<Sag>839</Sag>
<Lokation>8888</Lokation>
</Web>
-<Web>
<Id>4</Id>
<Sag>135778</Sag>
<Lokation>7777</Lokation>
</Web>
-<Web>
<Id>5</Id>
<Sag>50</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>6</Id>
<Sag>137143</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>7</Id>
<Sag>90</Sag>
<Lokation>111</Lokation>
</Web>
-<Web>
<Id>8</Id>
<Sag>90</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>9</Id>
<Sag>90</Sag>
<Lokation>333</Lokation>
</Web>
-<Web>
<Id>10</Id>
<Sag>50</Sag>
<Lokation>111</Lokation>
</Web>
-<Web>
<Id>11</Id>
<Sag>50</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>12</Id>
<Sag>50</Sag>
<Lokation>333</Lokation>
</Web>
-<Web>
<Id>13</Id>
<Sag>505</Sag>
<Lokation>111</Lokation>
</Web>
-<Web>
<Id>14</Id>
<Sag>80DP</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>15</Id>
<Sag>839</Sag>
<Lokation>8888</Lokation>
</Web>
-<Web>
<Id>16</Id>
<Sag>135778</Sag>
<Lokation>7777</Lokation>
</Web>
-<Web>
<Id>17</Id>
<Sag>50</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>18</Id>
<Sag>137143</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>19</Id>
<Sag>80</Sag>
<Lokation>111</Lokation>
</Web>
-<Web>
<Id>20</Id>
<Sag>80</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>21</Id>
<Sag>80</Sag>
<Lokation>333</Lokation>
</Web>
-<Web>
<Id>22</Id>
<Sag>90</Sag>
<Lokation>111</Lokation>
</Web>
-<Web>
<Id>23</Id>
<Sag>90</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>24</Id>
<Sag>90</Sag>
<Lokation>333</Lokation>
</Web>
-<Web>
<Id>25</Id>
<Sag>50</Sag>
<Lokation>111</Lokation>
</Web>
-<Web>
<Id>26</Id>
<Sag>50</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>27</Id>
<Sag>50</Sag>
<Lokation>333</Lokation>
</Web>
-<Web>
<Id>28</Id>
<Sag>505</Sag>
<Lokation>111</Lokation>
</Web>
-<Web>
<Id>29</Id>
<Sag>80DP</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>30</Id>
<Sag>839</Sag>
<Lokation>8888</Lokation>
</Web>
-<Web>
<Id>31</Id>
<Sag>135778</Sag>
<Lokation>7777</Lokation>
</Web>
-<Web>
<Id>32</Id>
<Sag>50</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>33</Id>
<Sag>137143</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>34</Id>
<Sag>80</Sag>
<Lokation>111</Lokation>
</Web>
-<Web>
<Id>35</Id>
<Sag>80</Sag>
<Lokation>222</Lokation>
</Web>
-<Web>
<Id>36</Id>
<Sag>80</Sag>
<Lokation>333</Lokation>
</Web>
</dataroot>