This code displays the date on the page:
<input type="text" name="regDate" id="regDate" value="<?php echo(str_replace('"', '"', $row_WADAoxadmain['regDate'])); ?>" size="12" />
you can use the date() function to change the format of the date that is displayed:
<input type="text" name="regDate" id="regDate" value="<?php echo(str_replace('"', '"', date("d.m.Y",strtotime($row_WADAoxadmain['regDate'])))); ?>" size="12" />
at line 1 you have this code to convert the date top Y-m-d format:
<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_POST['dateReg'] = "".((isset($_POST["dateReg"]))?date("Y-m-d", strtotime($_POST["dateReg"])):"") ."";
}
?>
that is incorrect for this form since the form element being used is named "regDate" not "dateReg", you need to edit that code to use the correct form element name:
<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_POST['regDate'] = "".((isset($_POST["regDate"]))?date("Y-m-d", strtotime($_POST["regDate"])):"") ."";
}
?>