rename function names
This commit is contained in:
parent
c407495893
commit
bcd41be9a8
|
@ -42,7 +42,7 @@ date_default_timezone_set('Europe/Amsterdam');
|
|||
$text = $_POST['text'];
|
||||
|
||||
echo
|
||||
"<form method='POST' action='".editpost($con)."'>
|
||||
"<form method='POST' action='".edit_post($con)."'>
|
||||
<input type='text' name='title' value='".$title."'><br>
|
||||
<input type='hidden' name='userId' value='".$userId."'>
|
||||
<input type='hidden' name='demandId' value='".$demandId."'><br /> Maximum<br/>
|
||||
|
|
|
@ -99,7 +99,8 @@ function get_post_titles($con)
|
|||
echo "<strong>" . $row['demandTitle'] . "</strong>" . "<br>";
|
||||
echo $row['date'] . "<br>";
|
||||
echo "</p>
|
||||
<form class= 'delete-form' method= 'POST' action='".deletepost($con)."'>
|
||||
<form class= 'delete-form' method= 'POST'
|
||||
action='".delete_post($con)."'>
|
||||
<input type='hidden' name='demandId' value='".$row['demandId']."'>
|
||||
<button type='submit' name= 'deletepost'> Delete</button>
|
||||
</form>
|
||||
|
@ -119,7 +120,7 @@ function get_post_titles($con)
|
|||
|
||||
|
||||
// A function to edit a demand
|
||||
function editpost($con)
|
||||
function edit_post($con)
|
||||
{
|
||||
if (isset($_POST['edit'])) {
|
||||
global $con;
|
||||
|
@ -141,7 +142,7 @@ function editpost($con)
|
|||
}
|
||||
}
|
||||
// A function to delete a post
|
||||
function deletepost($con)
|
||||
function delete_post($con)
|
||||
{
|
||||
if (isset($_POST['deletepost'])) {
|
||||
global $con;
|
||||
|
|
Loading…
Reference in New Issue