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>";
it is suppose to show in the browser the data typed in the fields, but instead I have a "Notice: Undefined index,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.