Parašė raima220· 2011 Bal. 3 16:04:25
#1
<?php
$c = 0;
$task = $_POST['task'];
switch( $task ) {
case 'septyniolika':
$c = 17;
break;
case 'trisdesimt':
$c = 30;
break;
default:
doform();
}
function doForm()
{
echo "
<form method='post' action=''>
<input type='submit' name='task' value='septyniolika'>
<input type='submit' name='task' value='trisdesimt'>
</form>
";
} ?>
Meta error:
Notice: Undefined index: task in C:\wamp\www\a.php on line 38
padėkit :/