mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-08 23:19:04 +01:00
Updated CodeCorner2 (markdown)
parent
404bdc46e6
commit
c4c2a17d31
@ -8,3 +8,41 @@ Lets start with the traditional way to climb the hill
|
|||||||
We decided that we wanted to have some input possibilities to affect the output of our greeting of the world.
|
We decided that we wanted to have some input possibilities to affect the output of our greeting of the world.
|
||||||
Our index.php file now includes a form to start with and a form that comes into action to
|
Our index.php file now includes a form to start with and a form that comes into action to
|
||||||
display the users input and a button to reload the whole thing.
|
display the users input and a button to reload the whole thing.
|
||||||
|
```php
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
prepare some application information for eGroupware to know
|
||||||
|
If the applicationname of your application (e.g.: test) and the value of
|
||||||
|
currentapp does not match, you will recieve an authentication error
|
||||||
|
*/
|
||||||
|
|
||||||
|
$GLOBALS['egw_info'] = array('flags' => array(
|
||||||
|
'currentapp'=> 'test' ,
|
||||||
|
'noheader' => False,
|
||||||
|
'nonavbar' => False,
|
||||||
|
));
|
||||||
|
/*
|
||||||
|
include THE eGroupware header, that takes care of the sessionhandling
|
||||||
|
and the other background stuff
|
||||||
|
the information provided above is used/required here in order to get the application running
|
||||||
|
*/
|
||||||
|
include('../header.inc.php');
|
||||||
|
|
||||||
|
if (trim($_POST['fname'].$_POST['sname'])!='')
|
||||||
|
{
|
||||||
|
echo "<br>Hello ".$_POST['fname']." ".$_POST['sname']."<br>";
|
||||||
|
echo "<form action='".$_SERVER['PHP_SELF']."' method='post'>
|
||||||
|
<input type='submit' value=' Reload '>
|
||||||
|
</form>";
|
||||||
|
} else {
|
||||||
|
echo "Type a name to be greeted accordingly <br>";
|
||||||
|
echo "<form action='".$_SERVER['PHP_SELF']."' method='post'>
|
||||||
|
<p>first name:<br><input name='fname' type='text' size='30' maxlength='30'></p>
|
||||||
|
<p>name:<br><input name='sname' type='text' size='30' maxlength='40'></p>
|
||||||
|
<input type='submit' value=' Submit '>
|
||||||
|
<input type='reset' value=' Cancel'>
|
||||||
|
</form>";
|
||||||
|
}
|
||||||
|
//display the eGroupware footer
|
||||||
|
common::egw_footer();
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user