sudo apt-get install geany geany-plugins gedit gedit-plugins
<html>
<body>
<form action="some.php" method="POST">
<table>
<td><p>Email:</p></td>
<td><input type="text" name="email"></td>
<td><p>Password:</p></td>
<td><input type="password" name="password"></td>
<td><input type="submit" value="Login"</td>
</table>
</form>
</body>
</html>
<?php
$email = $_POST["email"];
$password = $_POST["password"];
?>
.... <form action="some.php" method="POST"> ...
<?php
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
?>
<html>
<body background="./wallpaper-1707339.jpg">
<center>
<form id="Initial_form" method='post' action="index.php" onsubmit="return getLoginInfo('Initial_form');" >
<div style="width:300px;">
<label for="name" style="float:left;">Username:</label>
<input type="text" name="Username" value="Enter your name here!"
onfocus="if(this.value == 'Enter your name here!') { this.value = ''; }"
onblur="if(this.value == '') { this.value = 'Enter your name here!'; }"><br>
<label for="mode" style="float:left;clear:left">Mode:</label>
<select name="Mode" >
<option selected> -- </option>
<option> Επισκέπτης </option>
<option> Διαχειριστής </option>
</select>
<br></br>
<input type="submit" name="submit_login" value="Είσοδος" />
<button type="reset" value="Reset">Reset</button>
</form>
</center>
<?php
if(isset($_POST['Username'])){
// connect to a database
if($_POST['Mode'] == 'Διαχειριστής'){
?>
<center>
<form action="index.php" name="Query_area" method="POST">
<textarea cols="75" rows="10">
Enter your query here...
</textarea><br>
<input type="submit" name="submit_query" value="Execute query">
<input type="reset">
</form>
</center>
<?php
}
}
?>
</body>
</html>
<?php
$name = 'Default name';
if (!empty($_POST['name'])) {
$name = $_POST['name'];
}
$surname = 'Default Surname';
if (!empty($_POST['surname']){
$surname = $_POST['surname'];
}
$gender = 'M';
if (!empty($_POST['gender'])){
$gender = $_POST['gender'];
}
?>
<form ..... method = "POST" action = ''>
<label>Name:</label> <input type="text" name="name" value="<?php echo $name;?>" />
<label>Surname:</label> <input type="text" name="surname" value="<?php echo $surname;?>" />
<label>Gender:</label>
<select name="gender">
<option value="M" <?php if ($gender == "M"): echo "selected"; endif;?>>Male</value>
<option value="F" <?php if ($gender == "F"): echo "selected"; endif;?>Female</value>
</select>
..................
</form>