Hi,
Just some code improvements
Add name attribute to button
<input class="buttonstyle" type="submit" value="حفظ" name="حفظ">
<?php
if (filter_input(INPUT_POST, 'حفظ', FILTER_SANITIZE_STRING)) {
$post_name = filter_input(INPUT_POST, 'name');
}
?>
I think you should separate the sql queries in another file
Last thing is the multiple echo, maybe you can try
$html =
'<table>' .
'<tr>';
if(mysql_num_rows($result)>0){
while($row=mysql_fetch_array($result)){
$html .= 'other html';
}
}
echo $html;