
angello
New Members-
Posts
7 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
angello's Achievements

Newbie (1/5)
0
Reputation
-
thank both of you guys, it works just great with explode, let me show you what im doing, i bought a template and i want to have a travel site with an affiliate program, and i dont know too much php as you can see but im learning, you can see the template http://www.vacacionesytours.com/ please go to the left and go to the "Prepare for traveling Form", then click on the field to choose the date (date picker was not part of the template, i put it myself from jquery ui) so you can see the date you choosed, but in the backend i will send the date in 3 variables, day, month and yeat to the server and i will get an xml response and then with html and css i have to show the results , hotels, flight etc. so if you have a better idea (exept to change the form to have 3 fields for date) i?m all ears Thkans again pals christianf and sycho
-
thanks for your answer cristianF, the thing is that im building a travel simple webpage, and i have a date form where you select the date from a datepicker as i explain in my post, but to see the results of hotels/flights (im in an traveling affiliate program) they ask me to interrogate or to ask their server for this search in 3 diferen variables, so you would pick the date automatic from a datepicker in my web page like this: 15/05/2012,with only 1 click, but i have to send the xml request to their server like this: find me a flight to this date: $day $month $year See now why im asking to solve this? ill try what you just told me, but if with this explanation you thing there is an easier way please let me know, thanks again
-
hi, i have a form that get?s date from a datepicker like this 12/05/2012 in 1 variable, but i want it after get the date from the datepicker, to put date it in 3 diferent variables: $day $month $year How can i do this? code example: <form action="destiniaXMLrequest.php" method="post" name="getxmlrequest"> <label>Check In</label> <input type="date" name="CheckIn" id="checkinflight"/><br/> <label>Check Out</label><input type="date" name="CheckOut" id="checkoutflight"/><br/> <input type="submit" value="Send" /> <input type="reset" value="Clear Fields" /> </form> this is the php code: $checkin_day = $_POST['CheckIn']; $checkout_day = $_POST['CheckOut']; echo "this is the data you enter in the form:<br>"; echo $checkin_day."<br>"; echo $checkout_day."<br>"; echo("What i want to do is to put the date of the datepicker (in 1 variable) in 3 diferent variables<br>"); echo("like this:<br>"); echo ('$checkin_day'."<br>"); echo ('$checkin_month'."<br>"); echo ('$checkin_year'."<br>"); Thanks for any help guys
-
Thank you very much, i solve it my self, and i really still don?t know what was, but the new code in html is this: <form action="destiniaXMLrequest.php" method="post" name="getxmlrequest"> <label>Ciudad</label><input name="location_name" type="text"/><br/> <label>Idioma</label><input name="idioma" type="text" /><br/> <label>Cantidad de habitaciones</label> <select name="cantidad_habitaciones"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select><br/> <label>Adultos</label> <select name="adultos"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select><br/> <label>Ni?os</label> <select name="ninos"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select><br/> <label>Dia de entrada</label> <input type="text" name="dia_de_entrada" id="chkinday"/><br/> <label>Mes de entrada</label><input type="text" name="mes_de_entrada" id="chkinmnt"/><br/> <label>A?o de entrada</label><input type="text" name="ano_de_entrada" id="chkinyr"/><br/> <label>Dia de salida</label><input type="text" name="dia_de_salida" id="chkoutday"/><br/> <label>Mes de salida</label><input type="text" name="mes_de_salida" id="chkoutmnt"/><br/> <label>A?o de salida</label><input type="text" name="ano_de_salida" id="chkoutyr"/><br/> <label>Codigo Afiliado Destinia </label> <input type="text" name="codigo_afiliado"/><br/> <label>Identificador Afiliado destinia</label> <input type="text" name="identificador_afiliado"/><br/> <input type="submit" value="Enviar" /><br/> <input type="reset" value="Borrar Todo" /> </form> if you check , i was missing a lot of "=" equals, in the "name" attribute and i don?t know what else, but this is the new php code: $location_name = $_POST['location_name']; $language_code = $_POST['idioma']; $num_rooms = $_POST['cantidad_habitaciones']; $num_adults = $_POST['adultos']; $num_children = $_POST['ninos']; $checkin_day = $_POST['dia_de_entrada']; $checkin_month = $_POST['mes_de_entrada']; $checkin_year = $_POST['ano_de_entrada']; $checkout_day = $_POST['dia_de_salida']; $checkout_month = $_POST['mes_de_salida']; $checkout_year = $_POST['ano_de_salida']; $codigo_afiliado = $_POST['codigo_afiliado']; $identificador_afiliado = $_POST['identificador_afiliado']; echo $location_name."<br>" ; echo $language_code."<br>"; echo $num_rooms."<br>"; echo $num_adults."<br>"; echo $num_children."<br>"; echo $checkin_day."<br>"; echo $checkin_month."<br>"; echo $checkin_year."<br>"; echo $checkout_day."<br>"; echo $checkout_month."<br>"; echo $checkout_year."<br>"; echo $codigo_afiliado ."<br>"; echo $identificador_afiliado."<br>"; Now it work great, now i have to send the request to the server, i still don?t have an idea of how but i will find out, thanks guys
-
Hi, im trying to make a very simple script, but i just can?t make it work, i want something like this, this is the HTML code: <form action="procesar.php" method="post" name="frm"> <input type="text" name="nombre" /> <input type="text" name="apellido" /> <input type="password" name="pw" /> <input type="submit" value="Enviar" /> </form> and this woul?d be the PHP code in the respective file "procesar.php" $nombre = $_POST['nombre']; $apellido = $_POST['apellido']; $pw = $_POST['pw']; echo $nombre. "<br>"; echo $apellido. "<br>"; echo $pw; as you can see, it just works great, you don?t even have to run it to see what it does, now my question is WHY my code does NOT work, this is the HTML code: <form action="destiniaXMLrequest.php" method="post" name="getxmlrequest"> <label>Ciudad</label><input class"inputbox" name="location_name" type="text"/><br/> <label>Idioma</label><input class"inputbox" name="idioma" type="text" /><br/> <label>Cantidad de habitaciones</label> <select name="cantidad_habitaciones"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select><br/> <label>Adultos</label> <select name="adultos"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select><br/> <label>Ni?os</label> <select name="ninos"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select><br/> <label>Dia de entrada</label> <input class="inputbox" type="text" name"chkinday" id="chkinday" alt="mm/dd/yy" /><br/> <label>Mes de entrada</label><input class="inputbox" type="text" name"chkinmnt" id="chkinmnt" alt="mm/dd/yy" /><br/> <label>A?o de entrada</label><input class="inputbox" type="text" name"chkinyr" id="chkinyr" alt="mm/dd/yy" /><br/> <label>Dia de salida</label><input class="inputbox" type="text" name"chkoutday" id="chkoutday" alt="mm/dd/yy" /><br/> <label>Mes de salida</label><input class="inputbox" type="text" name"chkoutmnt" id="chkoutmnt" alt="mm/dd/yy" /><br/> <label>A?o de salida</label><input class="inputbox" type="text" name"chkoutyr" id="chkoutyr" alt="mm/dd/yy" /><br/> <label>Codigo Afiliado Destinia</label> <input type="text" name="codigo_afiliado" /><br/> <label>Identificador Afiliado destinia</label> <input type="text" name="identificador_afiliado" /><br/> <input type="submit" value="Enviar" /> </form> and this is the PHP code of the respective file "destiniaXMLrequest.php": $location_name = $_POST['location_name']; $language_code = $_POST['idioma']; $num_rooms = $_POST['cantidad_habitaciones']; $num_adults = $_POST['adultos']; $num_children = $_POST['ninos']; $checkin_day = $_POST['chkinday']; $checkin_month = $_POST['chkinmnt']; $checkin_year = $_POST['chkinyr']; $checkout_day = $_POST['chkoutday']; $checkout_month = $_POST['chkoutmnt']; $checkout_year = $_POST['chkoutyr']; $codigo_afiliado = $_POST['']; $identificador_afiliado = $_POST['destinia']; echo $location_name."<br>" ; echo $language_code."<br>"; echo $num_rooms."<br>"; echo $num_adults."<br>"; echo $num_children."<br>"; echo $checkin_day."<br>"; echo $checkin_month."<br>"; echo $checkin_month."<br>"; echo $checkin_year."<br>"; echo $codigo_afiliado ."<br>"; echo $identificador_afiliado."<br>"; I have a "Notice: Undefined index error", from line 7 to line 14, WHY god, somebody please help me, is a long long road to me, im trying to make work a hotel reservations page, and im trying to make work the searchbox, i have to send this data to the reservacions server as a request, and then get an XML response, but first im trying to see if i can make work this script. THANKS in advance for any help.
-
Hi, i just bought this beautifull joomla 2.5 travel template , and it has a booking component but only with the checkin and checkout field with NO datepicker, so i found a datepicker and i made it work just as i wanted, now i want to install it in the template i called to this people that sold me the template and they told me to put the <head> code of the datepicker file in the head.php template file this is the whole code of the datepicker: <!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> <title>JA PRUEBAS</title> <link rel="stylesheet" href="jquery-ui-1.8.21.custom.css" type="text/css" /> <link rel="stylesheet" href="demos.css"> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jqueryui.js"></script> <script type="text/javascript" src="modice_dates.js"></script> <script type="text/javascript"> window.modicebooking = { DATE_FORMAT: "dd-mm-yy", JANUARY: "Enero", FEBRUARY: "Febrero", MARCH: "Marzo", APRIL: "Abril", MAY: "Mayo", JUNE: "Junio", JULY: "Julio", AUGUST: "Agosto", SEPTEMBER: "Septiembre", OCTOBER: "Octubre", NOVEMBER: "Noviembre", DECEMBER: "Diciembre", MONDAY_MIN: "Lu", TUESDAY_MIN: "Ma", WEDNESDAY_MIN: "Mi", THURSDAY_MIN: "Ju", FRIDAY_MIN: "Vi", SATURDAY_MIN: "Sa", SUNDAY_MIN: "Do", ERROR_DEPARTURE_BEFORE_ARRIVAL: "La salida es anterior a la llegada", ERROR_ARRIVAL_PAST: "La fecha de llegada ya ha pasado", ERROR_DEPARTURE_PAST: "La fecha de salida ya ha pasado", ERROR_DEPARTURE_PAST: "La fecha de salida ya ha pasado", ERROR_RECHECK_DATES: "Por favor, controlar fechas", MIN_BOOKING_DAYS: "1", MAX_BOOKING_DAYS: "", MAX_DATE: "01-11-2013", ARRIVAL_WEEKDAY: "", DEPARTURE_WEEKDAY: "", FIRST_DAY: "1", MODULE_IMAGE_DIR: "images/", SHOW_ICON: "1", INCLUSIVE_BOOKING: "1" }; </script> </head> <body> <div class="form-value"> <div class="clearfix"> <p class="text-form"><label>Encontrar Vuelos a:</label> <input class="inputbox" type="text" name="hotel" value="ex. Paris" size="18" alt="username" /><br /><span>City, airport, attraction</span></p> <p class="text-form check"><label>Entrada:</label><span><input id="iceArrival" readonly="readonly" type="text" name="arrival" value="""" size="18" alt="dd/mm/yy"/></span></p> <p class="text-form check"><label>Salida:</label><span><input id="iceDeparture" readonly="readonly" type="text" name="departure" value="" size="18" alt="dd/mm/yy"/></span></p> </div> <div class="clearfix"> <p class="text-form"><label>Room</label> <select> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select></p> <p class="text-form"><label>Adults:</label> <select> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select><br /><span>18+ yrs.</span></p> <p class="text-form"><label>Children:</label> <select> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select><br /><span>1-17 yrs.</span></p> <input class="button" type="submit" name="Find hotels" value="Find flights" /> </div> </div> <!-- ???? --> <input name='iceItemsInfo' type='hidden' value='{"1":{"adults":"12","childrens":"2","guests":"14"},"3":{"adults":"4","childrens":"2","guests":"6"},"5":{"adults":"10","childrens":"4","guests":"14"},"17":{"adults":"10","childrens":"0","guests":"10"},"19":{"adults":"0","childrens":"0","guests":"0"} ,"21":{"adults":"4","childrens":"0","guests":"4"},"24":{"adults":"10","childrens":"5","guests":"15"},"26":{"adults":"2","childrens":"0","guests":"2"}}'/> <!-- ???? --> </body> </html> Now this is the code of the php head.php file: <?php /** * ------------------------------------------------------------------------ * * ------------------------------------------------------------------------ * Copyright © 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved. * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html * Author: J.O.O.M Solutions Co., Ltd * * ------------------------------------------------------------------------ */ // No direct access defined('_JEXEC') or die; ?> <script type="text/javascript"> var siteurl='<?php echo JURI::base(true) ?>/'; var tmplurl='<?php echo JURI::base(true)."/templates/".T3_ACTIVE_TEMPLATE ?>/'; var isRTL = <?php echo $this->isRTL()?'true':'false' ?>; </script> <jdoc:include type="head" /> <?php if (T3Common::mobile_device_detect()=='iphone'):?> <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1; user-scalable=1;" /> <meta name="apple-touch-fullscreen" content="YES" /> <?php endif;?> <?php if (T3Common::mobile_device_detect()):?> <meta name="HandheldFriendly" content="true" /> <?php endif;?> <link href="<?php echo T3Path::getUrl('images/favicon.ico') ?>" rel="shortcut icon" type="image/x-icon" /> <?php JHTML::stylesheet ('', 'templates/system/css/system.css') ?> <?php JHTML::stylesheet ('', 'templates/system/css/general.css') ?> So i have no clue about how to make work the datepicker this way any help would be really apreciated Thanks SO MUCH in advance