Jump to content
php.lv forumi

Recommended Posts

  • Replies 45
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Tieši tā arī būtu jāraksta.

 

Ja tu kodā izmanto, piemēram, $_GET['id']. Tad address bārā būtu jāraksta ?id=123. Un par to kodu uzdod konkrētus jautājumus, ko tu nesaproti.

Posted

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!

Posted

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>";
?>

Posted (edited)

Paldies, mikijs, tavs posts man mazliet palidzeja! :) Mazliet? Jaa tapec ka šaadi jataisa ir katram ?open=1 , 2 ,3 ,4 :) un ar to nevar atvert no datubazes..

Edited by Re_Boot
Posted (edited)
<!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
Posted
a kam tev pec id? ja var pec name

Tur ir viena probleminja, ja es nelieku visiem radio button vienadus NAME, tad var IECHECKOT visus reizee, a man vajag lai tikai vienu var, nu tur tiek dota izvele!

Posted

<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";

}

?>


×
×
  • Create New...