Jump to content
php.lv forumi

Problema ar zinasanam!


Re_Boot

Recommended Posts

  • Replies 45
  • Created
  • Last Reply

Top Posters In This Topic

Man piemeram rada manu ipashumu, (bet man var but daudzi ipashumi), un ja tev ir vairak par vienu ipashumu tad paradas velviens lodzinjsh, kur tu uzpied un paradas tavs otrs ipashums, bet lai man nebutu jaataisa daudzi PHP faili, kur katra ir savs ipashums, man vajag ar to ?=ID, lai paradiitu nakoshu ipashumu vienkaarshi uzpiezhot.. piemeram ID 1 un tad paraada manu pirmo ipashumu, ID 2 parada manu otro ipashumu ja man tads ir!

Link to comment
Share on other sites

es to iemacijos shadi :D

 

piemeram index.php?open=1 , ?open=2

<?php
if ($open == "1") { echo "<h2>Open = 1<h2><br><a href='?open=2'>Open 2?</a>"; }
elseif ($open == "1") { echo "<h2>Open = 2<h2><br><a href='?open=1'>Open 1?</a>"; }
else { echo "<h2>???</h2>"; }
echo "<hr><center>Mikijs</center>";
?>

Link to comment
Share on other sites

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="lv">
<head>

</head>
<body>
<hr />
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="for" id="for">
izvelies: 
<input type="radio" name="radio" id="radio_1" value="ja" /> Ja 
<input type="radio" name="radio" id="radio_2" value="ne" />Ne
<br /><input type="submit" name="submit" id="ok" value="Ok" /></form><br>
</body>
</html>

Edited by Mikijs
Link to comment
Share on other sites

<form type='post' action='<? echo $_SERVER['PHP_SELF']; ?>'>

<input type='radio' name='r' value='1' checked> Jaa

<input type='radio' name='r' value='0'>Nee

<input type='submit' value='ok'>

</form>

<?

echo "Radio izvele:";

if ($_GET['r'] == "1") {

echo "Ja";

}

elseif ($_GET['r'] == "0") {

echo "Ne";

}

?>

Link to comment
Share on other sites


×
×
  • Create New...