Jump to content

lmcm2008

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by lmcm2008

  1. Yeah. In any case right now is working in all navigators, but I lost it in phones and Ipads.... Any advice to fix this??? Thanks. Regards
  2. I´ve change all the <?= $variable ?> to <? echo $variable ?> and also move this lines <script type="text/javascript"> swfobject.registerObject("FlashID"); </script> right under the <object></object> with all the code inside... And works in all navigators!!... Great!!! But... now doesn´t do it in mobiles phones and ipads... jeje... Can you help me now with this matter? just to adapt the code to mobile phones and Ipads? Or its not possible? How can I do it? Thanks a lot to everybody!
  3. Hi: I have a wordpress, and I want to publish a flash animation. I´ve modified the wordpress file sidebar.php with a include to this code in another .php file, but I don´t see nothing, but I don´t have any error... just "white space" instead the animation... Can you help me with the code?? <? $wmode = "opaque"; $refererId = 258; $bannerId = 210; $width = 250; $height = 250; $link = "http://www.bellross.com/index.php?bannerId=".$bannerId."&refererId=".$refererId; $flashLink = "http://www.bellross.com/index.php?bannerId=".$bannerId."%26refererId=".$refererId; ?> <style type="text/css"> body, object { padding:0; margin:0; } #timekeeper, .link { width: <?= $width?>px; height:<?= $height?>px; } .hand { bottom: 0px; left: 107px; } </style> <link href="wp-content/themes/sahifa/template/style.css" rel="stylesheet" type="text/css"/> <script type="text/javascript"> window.onload = function() { if(document.getElementsByTagName('body')[0].style.MozTransform == '' || document.getElementsByTagName('body')[0].style.WebkitTransform == '' || document.getElementsByTagName('body')[0].style.OTransform == '' || document.getElementsByTagName('body')[0].style.transform == '') { function hand() { handS.style.MozTransform = handS.style.WebkitTransform = handS.style.OTransform = handS.style.transform = 'rotate(' + (time * 6) + 'deg)'; handM.style.MozTransform = handM.style.WebkitTransform = handM.style.OTransform = handM.style.transform = 'rotate(' + (time / 10) + 'deg)'; handH.style.MozTransform = handH.style.WebkitTransform = handH.style.OTransform = handH.style.transform = 'rotate(' + (time / 120) + 'deg)'; } var handH = document.getElementById('handH'); var handM = document.getElementById('handM'); var handS = document.getElementById('handS'); var timekeeper = document.getElementById('timekeeper'); var d = new Date(); var time = d.getSeconds() + 60 * d.getMinutes() + 3600 * d.getHours(); hand(); setInterval(function() {time = time+0.20; hand();}, 200); setInterval(function() {r = new Date(); time = r.getSeconds() + 60 * r.getMinutes() + 3600 * r.getHours(); hand()}, 10000); } }; </script> <script src="wp-content/themes/sahifa/swf/Scripts/swfobject_modified.js" type="text/javascript"></script> <script type="text/javascript"> swfobject.registerObject("FlashID"); </script> <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?= $width?>" height="<?= $height?>"> <param name="movie" value="wp-content/themes/sahifa/swf/timekeeper.swf"> <param name="quality" value="high"> <param name="wmode" value="<?= $wmode?>"> <param name="swfversion" value="8.0.35.0"> <param name="FlashVars" value="clickTAG=<?=$flashLink?>" /> <!-- Cette balise <param> invite les utilisateurs de Flash Player en version 6.0 r65 et ultérieure à télécharger la version la plus récente de Flash Player. Supprimez-la si vous ne voulez pas que cette invite soit visible. --> <param name="expressinstall" value="wp-content/themes/sahifa/swf/Scripts/expressInstall.swf"> <!-- La balise <object> suivante est destinée aux navigateurs autres qu'IE. Supprimez-la d'IE à l'aide d'IECC. --> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="wp-content/themes/sahifa/swf/timekeeper.swf" width="<?= $width?>" height="<?= $height?>"> <!--<![endif]--> <param name="quality" value="high"> <param name="wmode" value="<?= $wmode?>"> <param name="swfversion" value="8.0.35.0"> <param name="expressinstall" value="wp-content/themes/sahifa/swf/Scripts/expressInstall.swf"> <param name="FlashVars" value="clickTAG=<?=$flashLink?>" /> <!-- Le navigateur affichera le contenu alternatif suivant pour les utilisateurs d'un lecteur Flash de version 6.0 ou de versions plus anciennes. --> <div id="timekeeper"> <a href="<?= $link; ?>" target="_blank" class="link"></a> <img src="template/images/handH.png" class="hand" id="handH" alt="heure"/> <img src="template/images/handM.png" class="hand" id="handM" alt="minute"/> <img src="template/images/handS.png" class="hand" id="handS" alt="seconde"/> </div> <!--[if !IE]>--> </object> <!--<![endif]--> </object> Do you see anything wrong? How can I make this work in my page? I hope you can help me. Thanks. Regards
  4. Yess... perfect!! What an idiot error!!!! Sorry and thanks.!
  5. Hi: I have an error that will be very basic, but I don´t see it... I have this first php: <?php session_start(); require ("connecting.php"); require ("searchprofile.php"); connect(); $miuser=$_SESSION['usu']; $supas=$_SESSION['pas']; echo " Welcome: $miuser $supas<br />"; if ( busca_perfil_activo($miuser)==1) { echo "show $miuser<br />"; muestra_perfil($miuser); } else { echo "creating $miuser<br />"; crea_perfil($miuser); } mysql_close(); ?> Ok.... maybe the problem is here: if ( busca_perfil_activo($miuser)==1) { echo "show $miuser<br />"; muestra_perfil($miuser); } else { echo "creating $miuser<br />"; crea_perfil($miuser); } and the function "busca_perfil_activo($miuser) is the following: function busca_perfil_activo($activo) { $sql="SELECT * FROM perfil WHERE USUARIO='$activo' "; $result = mysql_query($sql); $totalreg=mysql_num_rows($result); if($result == 1) { return 1; } else { return 0; } } Why this function always return 0 ?? I have a record that is ok with the search... and will return 1 in that case, but never do it... Why?? Can you help me?? thanks.
  6. Hi. I have a problem and don´t know hot to solve it. I guess is a very basic thing but after fighting with it a whole week, I decide to ask here... The thing is the following: I have a database that I read perfectly, but, in that database, I have a field that can be with content or "came" empty. I want to make this ... If that field came empty, don´t do nothing, else (with content) do the other thing... like this; if ( isset ( myfield )) { // DO THE CONDITION in myfield } else { // DONT DO NOTHING } Is this correct?? How can I check thefield empty or not and do things depending on this condition?? Please, help. Thanks. Regards
  7. Hi: Ok, I made this... $cadena="SELECT * FROM mytable WHERE (TIPO='2')"; $result=mysql_query($cadena) or die(mysql_error()); $totalreg=mysql_num_rows($result); echo "Registros: $totalreg<br>"; // running perfectly the selection... // begin the array $contador=0; while ( $registro=mysql_fetch_array($cadena) ) { $numeros[$contador]=$registro["ID"]; // ID is my field in the database $contador++; } $elementos=sizeof($numeros-1); //debug echo"Elementos: $elementos<br>"; Ok, In the debug line that I make a echo... echo"Elementos: $elementos<br>"; I receive -1 Why??? It seems that the array is looking good.. or not?? How can I be sure that I fill the array correctly and I have all the items that I received from the data base ??? How can I make an echo from all the array to see if is good filled or not?? Please, help...
  8. Hi: I would like to do something really easy, but I never know how to do it. Please help me. I have a data base where I make the selection in this way: $cadena="SELECT * FROM table WHERE (TYPE='2')"; $result=mysql_query($cadena) or die(mysql_error()); $totalreg=mysql_num_rows($result); Ok, here not problem... I get all the registers with that condition.... Now is the problem... I want to make this... ARRAY [1][iD register 1] ARRAY [2][iD register 2] ARRAY [3][iD register 3] and so on until finish when no more registers whave that condition... for example: ARRAY [66][iD register 66] <--- of $totalreg before. So I have 66 (or XXX ) records selected in the array, and know the Id of every register that I selected before. AND NOW... I want to make a random selection on that array and operate with the register of that selection and make a select to the database on the ID register X... Can you help me?? Thanks a lot. Regards
  9. Ok, then, If I do this: SELECT * FROM TABLE WHERE MONTH($mydate)="08"; 08 for example... This will run and return me all the records that I have where the month is 08??? Thanks
  10. HI: I?m trying to make a form to get the results from a database that has an DATE record, but I don?t know how to make it. Is there any function in PHP that calling a select * from TABLE where DATE="08"...? for example?? How can I make this? I need it and don?t know what to do... Can you help me? I need to select by month and by year... Thanks a lot. regards
  11. Hi, great, but I do this: ?> <td width=200> <form method=POST action=abrelibro.php> <input type="hidden" name="id_libro" id="id_libro" value="<?PHP echo $iden; ?>"> <img src=<?php echo $libro ?> border=0> <input type=submit value=Submit> </td> <?php But same result... doesn´t work as I want... I don´t send the $iden to the second page that is the value that I want to receive there... More ideas?? Thanks a lot for your help...
  12. I´m really sorry, but I don´t understand what are you telling me... You say something like this??? echo "<td width=200>"; echo "<form method=POST action=abrelibro.php>"; echo "<input type=hidden name=id_libro id=id_libro value=$iden>"; echo "<img src=$libro border=0>"; echo "<input type=submit value=Submit>"; thanks...
  13. Yeah, you´re right... But the thing that I´m trying to do is, to click in a book, and then with the $iden "(ID)" go to the second file and search all the details of that book in the database... The first page shows all the books and a button for each book.... and clicking in that buttons then go to the second file... I dont like the get version with the url and i´m trying to do it using post and hiddens fields... Maybe using sessions?? I really don´t know and I´m sure is easy but I´m block... More suggestions? Thanks...
  14. I´m receiving allways the number of books in my table... I mean.. If I have 3 books, I receive allways 3.. if I have 30 I receive 30... I know how many books I have... BUT I want to receive the ID of the book where I select to open the file of that book(ID) in the second file... Thanks.
  15. Hi: I´m creating a library code for myself, and I´m trying to create a page that shows all the books that I have in my database, and when I make click in one of them, go to another page and show all the details of that book that I have in my data base... But I don´t know what I´m doing wrong... Can you help me?? My first page code: <form method="POST" action="abrelibro.php"> <table border=0> <tr> <?php // search all the books in the data base... $cadena="SELECT * FROM libros"; $result=mysql_query($cadena) or die(mysql_error()); $totalreg=mysql_num_rows($result); //echo "$totalreg"; $i=0; while ($fila=mysql_fetch_array($result)) { $iden=$fila['ID']; $titulo=$fila['TITULO']; $autor=$fila['AUTOR']; $editorial=$fila['EDITORIAL']; $anio=$fila['AÑO']; $npaginas=$fila['NPAGINAS']; $tipo=$fila['TIPO']; $desc=$fila['DESCRIPCION']; $alta=$fila['FECHA']; $nuevo=$fila['NUEVO']; $imagen=$fila['IMAGEN']; if ( $i % 5 == 0 ) { if ( $i == 1 ) { echo "<tr>"; } else { echo "</tr><tr>"; } } // book image $libro="libros/$imagen.jpg"; echo "<td width=200>"; echo "<input type=hidden name=id_libro id=id_libro value=$iden>"; echo "<img src=$libro border=0><br>$desc"; echo "<input type=submit value=Submit>"; echo "</td>"; $i++; } // del while ?> </tr> </table> </form> And the page that receive the code from the first one... <?php $milibro = $_POST["id_libro"]; echo "Received book: $milibro"; ?> Can you help me, please??? All the codes are when I have connection to the database done and not problem at all !!!!... Thanks a lot. Regards
  16. Ok, I´ll put the code on the file2.php... and see what happen.. Meanwhile, I wonder if the sentence: <input type="hidden" name="valf" value='".$iden."'> ... is running, but I think i does.. so... may be work and solve the problem... thanks.
  17. Hi: i have 2 files, the first one is ok, and in the second I receive an error telling me that "undefined index...", I´m sure that is a stupid thing, but I don´t see it... can you help me?? I write comments on the code to see the errors that I receive... and to find them better instead read all the code... Of course are only in this post, not in the code... File1: <?php session_start(); // database conection... $conn=mysql_connect ('zzzzz','xxx','yyy' ); mysql_select_db('jjjjjj'); if (!$conn) { die ("no conn".mysql_error() ); } //echo "ok"; ?> <title>trying</title> </head> <body> <?php // conect... ( false values to post this comment...) $cadena="SELECT * FROM mytabla WHERE CAT='APOL' "; $result=mysql_query($cadena) or die(mysql_error()); $totalreg=mysql_num_rows($result); $i=0; ?> <div align="center"> <img src="im/titapol.jpg" alt="" /><br> <br> ----------------> HERE IS THE FORM...MAYBE I NEED THE ACTION="" ???????? <form method="post"> <table summary="galfot"> <tbody> <tr class="par"> <?php $camino="im/pic/apol/thumbs/"; while ($fila=mysql_fetch_array($result)) { $iden=$fila['ID']; $nompic=$fila['NOMFOTO']; $desc=$fila['DESCRIPCION']; $titulo=$fila['TITULO']; $thumb="th"; $foto="$camino$thumb$iden.jpg"; list($ancho,$alto)=getimagesize($foto); $nuevo_ancho=110; $nuevo_alto=round($nuevo_ancho*$alto/$ancho); if ( $i % 6 == 0 ) { if ( $i == 1 ) { echo "<tr class=par>"; } else { echo "</tr><tr class=par>"; } } echo "<td>"; echo "<a href=gala_f1_v1.php>"; ?> // ---------------->>>> HERE IS THE ERROR...WHY????? <input type="hidden" name="valf" value='".$iden."'> <?php echo" <img src=$foto width=$nuevo_ancho height=$nuevo_alto alt=$titulo border=0></a>"; echo "</td>"; $i++; } ?> </tr> </tbody> </table> </form> <br> <?php mysql_close(); ?> </body> </html> And the second file where I receive the error "undefined index...."... <?php session_start(); // conect... ( false values to post this comment...) $conn=mysql_connect ('zzzzz','xxx','yyy' ); mysql_select_db('jjjjjj'); if (!$conn) { die ("no conecto".mysql_error() ); } //echo "ok"; ?> <title>result</title> </head> <body> <div align="center"> <p class="texto_normal_blanco"> <?php // MAYBE THIS IS THE ERROR??? -----> Why???? $mivar=$_POST['valf']; // HERE I WANT TO USE THE VALUE FROM THE FORM USED IN FIRST PAGE AND RECEIVE UP HERE------------- $cadena="SELECT * FROM fotss WHERE ID=$mivar"; $result=mysql_query($cadena) or die(mysql_error()); while ($fila=mysql_fetch_array($result)) { $desc=$fila['DESCRIPCION']; $titulo=$fila['TITULO']; } ///---------- $nomfotoact="image$mivar.jpg"; $dir="im/pic/apol/"; $foto="$dir$nomfotoact"; list($ancho,$alto)=getimagesize($foto); $nuevo_ancho=1000; $nuevo_alto=round($nuevo_ancho*$alto/$ancho); echo "$titulo<br><br>"; echo "<img src=$foto width=$nuevo_ancho height=$nuevo_alto><br><br>"; echo "$desc<br>"; ?> </p> </div> <?php mysql_close(); session_destroy(); ?> </div> </body> </html> Help, please! Thanks. Regards
  18. The thing that I´m trying is to avoid when i made a <href=file2.php> and thansmit a variable I had to do it using href=file2.php?=$var, so it transmit the variable on the URL and I would like to avoid that... BUT.. I don´t know how to do it... I have a lot of images like thumbs on a first file and when you click, go to other file and with the variable that I transmit... open bigger that image... Any idea..?? Thanks.
  19. Hi: I would like to pass a value inside a variable between files... without usng sessions. I don´t want to use sessions... I don´t know if I can do this... File1.php: $transmit=$_POST['123']; File2.php: $receive=$_GET['$transmit']; echo "value receipt: $receive"; And in the file2.php, $receive.... I will receive 123 as I want to transmit from file1.php ( example string "123" as a value ) ???? Thanks a lot. Regards
  20. Hi: I wrote the following code, that is a form, that pass a result to another form that actuate depending on the result of the first... but I´ve never receive the value of the first form in to the second... Can you help me to see what I´m doing wrong??? Please. I need help with this. Thanks. regards Code Form.php ( main code ): <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>inicio</title> </head> <?php include ("provmain.php"); ?> <body bgcolor="#FFFFFF"> <center> <form METHOD="POST" action="busca.php" name=frminsertar> <table border="1"> <tr> <td>PROVINCIA:<br> <select name=provincias> <?php $cuenta = array_count_values ($provincias); $i = 0; reset($provincias); foreach ($provincias as $value ) { echo "<option name='".$provincias[$i]."' value='".$provincias[$i]."'>".$provincias[$i]."</option>"; $i++; } ?> </select> </td> </tr> </table> <br> <br> <input name="submit" type="submit" value="enviar"> </center> </form> </body> </html> Code busca. php, where I have to receive the value of the form.php... <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Documento sin título</title> </head> <?php include ("localidades.php"); $laprov=$_POST['provincias']; ?> <body> <center> <form METHOD="POST" action="abuscar.php" name=buscadatos> <select name=localidad> <?php switch ($laprov) { case "A coruña": $cuenta1 = array_count_values ($coruna); $ix = 0; reset($coruna); foreach ($coruna as $value ) { echo "<option name='".$coruna[$ix]."' value='".$coruna[$ix]."'>".$coruna[$ix]."</option>"; $ix++; } break; case "Madrid": $cuenta2 = array_count_values ($madrid); $ix = 0; reset($madrid); foreach ($madrid as $value ) { echo "<option name='".$madrid[$ix]."' value='".$madrid[$ix]."'>".$madrid[$ix]."</option>"; $ix++; } break; } // del switch de provincias ?> </select> </form> </center> </body> </html> The includes are only the arrays of the values for the selects of the form of the files... Thanks.
  21. Hi, not, it doesn´t work. I receive: Notice: Use of undefined constant provincias - assumed 'provincias' in C:\wamp\www\busca.php on line 13, and Notice: Undefined index: provincias in C:\wamp\www\busca.php on line 13. the file busca.php is the following: <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Documento sin título</title> </head> <body> <?php echo $_POST[provincias]; ?> </body> </html> thanks. regards, and thankyou for your help. I really apreciate it.
  22. Hi. Now the code is looking good and work fine... <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>inicio</title> </head> <?php // Provincias de España $provincias = array("A Coruña", "Madrid","A Coruña", "Álava", "Albacete", "Alicante", "Almeria", "Asturias", "Ávila", "Badajoz", "Baleares", "Barcelona", "Burgos", "Cáceres", "Cádiz", "Cantabria", "Castellón", "Ceuta", "Ciudad Real", "Córdoba", "Cuenca", "Girona", "Granada", "Guadalajara", "Guipúzcoa", "Gran Canaria", "Huelva", "Huesca", "Jaén", "La Rioja", "Las Palmas", "León", "Lleida", "Lugo", "Madrid", "Málaga", "Melilla", "Murcia", "Navarra", "Ourense", "Palencia", "Pontevedra", "Salamanca", "Tenerife", "Segovia", "Sevilla", "Soria", "Tarragona", "Teruel", "Toledo", "Valencia", "Valladolid", "Vizcaya", "Zamora", "Zaragoza" ); // localidades de Madrid $madrid = array ( "Alcalá de Henares", "Alcobendas", "Alcorcón", "Aldea del Fresno", "Alpedrete", "Aranjuez", "Arganda del Rey", "Arroyomolinos", "Alcalá de Henares", "Alcobendas", "Alcorcón", "Aldea del Fresno", "Alpedrete", "Aranjuez", "Arganda del Rey", "Arroyomolinos", "Batres", "El Berrueco", "Boadilla del Monte", "El Boalo", "Buitrago del Lozoya", "La Cabrera", "Cadalso de los Vidrios", "Cenicientos", "Chinchón", "Collado Mediano", "Collado Villalba", "Colmenar de Oreja", "Colmenar Viejo", "Coslada", "El Escorial", "Fresnedillas de la Oliva", "Fuenlabrada", "Fuente el Saz de Jarama", "Fuentidueña de Tajo", "Galapagar", "Getafe", "Guadarrama", "Humanes de Madrid", "Leganés", "Loeches", "Madrid", "Majadahonda", "Manzanares el Real", "Mejorada del Campo", "Móstoles", "Navacerrada", "Navalagamella", "Navalcarnero", "Nuevo Baztán", "Parla", "Patones", "Pinto", "Pozuelo de Alarcón", "Puebla de la Sierra", "Puentes Viejas", "Rascafría", "Robledo de Chavela", "Las Rozas de Madrid", "San Fernando de Henares", "San Lorenzo de El Escorial", "San Martín de la Vega", "San Martín de Valdeiglesias", "San Sebastián de los Reyes", "Santa María de la Alameda", "Santorcaz", "Talamanca de Jarama", "Torrejón de Ardoz", "Torrejón de Velasco", "Torrelaguna", "Torrelodones", "Valdemaqueda", "Valdemorillo", "Valdemoro", "Villaconejos", "Villanueva de la Cañada", "Villar del Olmo", "Villarejo de Salvanés" ); ?> <body bgcolor="#FFFFFF"> <center> <form METHOD="POST" action="busca.php" name=frminsertar> <table border="1"> <tr> <td>PROVINCIA:<br> <select name=provincia> <?php $cuenta = array_count_values ($provincias); $i = 0; reset($provincias); foreach ($provincias as $value=>$prov) { echo "<option value='".$provincias[$i]."'>".$provincias[$i]."</option>"; $i++; } ?> </td> <td>LOCALIDAD: <br> <select name=localidad> <?php $cuenta2 = array_count_values ($madrid); $ix = 0; reset($madrid); foreach ($madrid as $value=>$loc ) { echo "<option value='".$madrid[$ix]."'>".$madrid[$ix]."</option>"; $ix++; } ?> </select> </td> </tr> </table> <br> <br> <input name="submit" type="submit" value="enviar"> </center> </form> </body> </html> And Now, Im trying to receive the results of the form in another php file, BUT, I don´t receive anything. I don´t know how to post the results to use them in another file... <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Documento sin título</title> </head> <body> <?php $laprov=$_POST["$provincias"]; echo "valores recibidos: $laprov <br>"; ?> </body> </html> Please, can you help me to see what I´m receiving from the first form????? Thanks a lot for your help.
  23. Hi. I´m learning PHP and trying to develope a Form using arrays. In this case I want to show 2 lists from an arrays for themselves, but I´m having problems, and don´t know how to solve the error that I receive. The error is something related with undefined variables or something like that. Please, can you help me??? Thanks, My code is the following: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>inicio</title> </head> <?php // Provincias de España $provincias = array("A Coruña", "Madrid","A Coruña", "Álava", "Albacete", "Alicante", "Almeria", "Asturias", "Ávila", "Badajoz", "Baleares", "Barcelona", "Burgos", "Cáceres", "Cádiz", "Cantabria", "Castellón", "Ceuta", "Ciudad Real", "Córdoba", "Cuenca", "Girona", "Granada", "Guadalajara", "Guipúzcoa", "Gran Canaria", "Huelva", "Huesca", "Jaén", "La Rioja", "Las Palmas", "León", "Lleida", "Lugo", "Madrid", "Málaga", "Melilla", "Murcia", "Navarra", "Ourense", "Palencia", "Pontevedra", "Salamanca", "Tenerife", "Segovia", "Sevilla", "Soria", "Tarragona", "Teruel", "Toledo", "Valencia", "Valladolid", "Vizcaya", "Zamora", "Zaragoza" ); // localidades de Madrid $madrid = array ( "Alcalá de Henares", "Alcobendas", "Alcorcón", "Aldea del Fresno", "Alpedrete", "Aranjuez", "Arganda del Rey", "Arroyomolinos", "Alcalá de Henares", "Alcobendas", "Alcorcón", "Aldea del Fresno", "Alpedrete", "Aranjuez", "Arganda del Rey", "Arroyomolinos", "Batres", "El Berrueco", "Boadilla del Monte", "El Boalo", "Buitrago del Lozoya", "La Cabrera", "Cadalso de los Vidrios", "Cenicientos", "Chinchón", "Collado Mediano", "Collado Villalba", "Colmenar de Oreja", "Colmenar Viejo", "Coslada", "El Escorial", "Fresnedillas de la Oliva", "Fuenlabrada", "Fuente el Saz de Jarama", "Fuentidueña de Tajo", "Galapagar", "Getafe", "Guadarrama", "Humanes de Madrid", "Leganés", "Loeches", "Madrid", "Majadahonda", "Manzanares el Real", "Mejorada del Campo", "Móstoles", "Navacerrada", "Navalagamella", "Navalcarnero", "Nuevo Baztán", "Parla", "Patones", "Pinto", "Pozuelo de Alarcón", "Puebla de la Sierra", "Puentes Viejas", "Rascafría", "Robledo de Chavela", "Las Rozas de Madrid", "San Fernando de Henares", "San Lorenzo de El Escorial", "San Martín de la Vega", "San Martín de Valdeiglesias", "San Sebastián de los Reyes", "Santa María de la Alameda", "Santorcaz", "Talamanca de Jarama", "Torrejón de Ardoz", "Torrejón de Velasco", "Torrelaguna", "Torrelodones", "Valdemaqueda", "Valdemorillo", "Valdemoro", "Villaconejos", "Villanueva de la Cañada", "Villar del Olmo", "Villarejo de Salvanés" ); ?> <body bgcolor="#FFFFFF"> <center> <form METHOD="POST" action=""> <table border="1"> <tr> <td>PROVINCIA: <?php $cuenta = array_count_values ($provincias); $i = 0; reset($provincias); while($i <= $cuenta){ echo "<option value='".$provincias[$i]."'>".$provincias[$i]."</option>"; $i++; } ?></td> <td>LOCALIDAD: <?php $cuenta2 = array_count_values ($madrid); $ix = 0; reset($madrid); while($ix <= $cuenta2){ echo "<option value='".$madrid[$ix]."'>".$madrid[$ix]."</option>"; $ix++; } ?></td> </tr> </table> <br> <br> <input type="submit" value="enviar"> </center> </form> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.