I have the following form code on my webpage:
Can somebody please give me a changed version of this code so that:
– when the PUBLISH THIS POST BUTTON is clicked
– a file is written into a folder called ‘a’ which is 2 levels higher than the folder containing this file
– the file contains the values in:
select id=“category”
input id=“title”
input id=“subtitle”
select id=“status”
– with each value being preceded and followed by text such as “TEXT-HERE”
for example: TEXT-HERECategory 1TEXT-HERE
– after which (if successful) the user is taken to a file called “success.php”
<form>
<div class="w3-container pnc-label" style="font-size:.85em;"><label for="category"><b>(1) <i>Choose</i> Category:</b></label><br>
<select name="category" id="category">
<option value="cat1"> Name of Category 1 </option>
<option value="cat2"> Name of Category 2 </option>
<option value="cat3"> Name of Category 3 </option>
</select>
</div>
<div><input id="title" name="title" type="text" style="width:65%;margin-left:1em;background: #fff;padding-left:.4em;"
placeholder="click and type here A TITLE...this message will then disappear">
</div>
<div><input id="subtitle" name="subtitle" type="text" style="margin-left:1em;background: #fff;padding-left:.4em;"
placeholder="A Subtitle or Teaser or Date etc (optional)">
</div>
<!-- STATUS DROP-DOWN MENU -->
<label style="font-size:1em;text-align:left;margin:.8em 0 0 1em;line-height:1.2em;" for="status"><b> Choose Status:</b></label>
<select name="status" id="status">
<option value="PY"> Published </option>
<option value="PD"> Draft </option>
<option value="PX"> Deleted </option>
</select>
<div><button type="submit" ><b>PUBLISH THIS POST</b></button></div>
</form>