Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
function sama_forma()
{
echo "<form method='post' name='register_form' target='_top'>";
echo "*Ваше имя: <input name='youname' type='text' size='25' maxlength='30' /> <br /><br />";
echo "*Ваш возраст: <input name='vozrast' type='text' size='15' maxlength='15' />";
echo "<input name='hidden' type='hidden' value='i' />";
echo "<input name='knopka' type='submit' />";
echo "</form>";
}
function sama_forma()
{
$you_name = isset ($_REQUEST["youname"]) ?
$_REQUEST["youname"] : "";
$you_vozrast = isset ($_REQUEST["vozrast"]) ?
$_REQUEST["vozrast"] : "";
echo "<form method='post' name='register_form' target='_top'>";
echo "*Ваше имя: <input name='youname' type='text' size='25' maxlength='30'
.........
function sama_forma()
{
echo "<form method='post' name='register_form' target='_top'>";
echo "*Ваше имя: <input name='youname' value='".$_POST['youname']."' type='text' size='25' maxlength='30' /> <br /><br />";
echo "*Ваш возраст: <input name='vozrast' value='".$_POST['vozrast']."' type='text' size='15' maxlength='15' />";
echo "<input name='hidden' type='hidden' value='i' />";
echo "<input name='knopka' type='submit' />";
echo "</form>";
}
Конкатенация строк тут не к чему.Такой вариант будет работать быстрее.что-то намудрено с кавычками глаз сломаешь
PHP:function sama_forma() { echo "<form method='post' name='register_form' target='_top'>"; echo "*Ваше имя: <input name='youname' value='".$_POST['youname']."' type='text' size='25' maxlength='30' /> <br /><br />"; echo "*Ваш возраст: <input name='vozrast' value='".$_POST['vozrast']."' type='text' size='15' maxlength='15' />"; echo "<input name='hidden' type='hidden' value='i' />"; echo "<input name='knopka' type='submit' />"; echo "</form>"; }
function sama_forma()
{
echo "<form method='post' name='register_form' target='_top'>";
echo "*Ваше имя: <input name='youname' value='{$_POST['youname']}' type='text' size='25' maxlength='30' /> <br /><br />";
echo "*Ваш возраст: <input name='vozrast' value='{$_POST['vozrast']}' type='text' size='15' maxlength='15' />";
echo "<input name='hidden' type='hidden' value='i' />";
echo "<input name='knopka' type='submit' />";
echo "</form>";
}
function sama_forma()
{
$age = $name = '';
//проверка
if(preg_match("/^[\w]+$/i", $_POST['youname'])){
$name = $_POST['youname'];
}
if(preg_match("/^[\d]+$/i", $_POST['vozrast'])){
$age = $_POST['vozrast'];
}
echo "<form method='post' name='register_form' target='_top'>";
echo "*Ваше имя: <input name='youname' value='$age' type='text' size='25' maxlength='30' /> <br />";
echo "*Ваш возраст: <input name='vozrast' value='$name' type='text' size='15' maxlength='15' />";
echo "<input name='hidden' type='hidden' value='i' />";
echo "<input name='knopka' type='submit' />";
echo "</form>";
}