Creo en nosotros. Wikipedia.
ShareCode
Permalink: http://www.treeweb.es/u/974/ 01/02/2011

ShareCode

1 2 <?php3 4  require('Telefonos.class.php');5 6  // acciones:7  if (array_key_exists('ACTION', $_POST)) {8  9  if ($_POST['ACTION'] == 'ADD_MARK') Telefonos::addMark($_POST['mark']);10  11  }12 13 14 15 16  $marcas = Telefonos::getMarks();17  $marca_sel = $_GET['mark'];18  $admin = true;19 20 ?>21 22 23 24 <div class="marcas">25 <?php26  foreach ($marcas as $m) {27  $sel = $_GET['mark'] == $m ? ' class="selected" ' : '';28  echo '<a '.$sel.' href="?mark='.$m.'">'.$m.'</a><br>';29  }30 ?>31 <form action="" method="post">32  <input type="hidden" name="ACTION" value="ADD_MARK">33  <input name="mark"> <input type="submit" value="Add mark">34 </form>35 </div>36 37 38 39 40 <style type="text/css">41  A {color:midnightblue;}42  A.selected {color:red;}43 </style>44 45 


Este ShareCode tiene versiones:
  1. A {color:m... (24/04/2013)
  2. A {color:m... (24/04/2013)
  3. A {color:m... (24/04/2013)
  4. A {color:m... (24/04/2013)
Enlace
El enlace para compartir es: