Comunidad de diseño web y desarrollo en internet online

Problema al insertar

Citar            
MensajeEscrito el 01 Ago 2010 07:10 pm
Hola a todos, esta vez tengo un problemita con HTTPService, lo que pasa es que no me inserta bien; osea si inserta pero no los valores que necesito, les muestro el ejemplo. Primero el HTTPService:
<mx:HTTPService id="RegAlumno" url="php/Registra.php" showBusyCursor="true" fault="ErrReg()" method="POST" >
<mx:request xmlns="">
<AlFlex>{txtUs.text}</AlFlex>
<GrFlex>{cbGrupo.selectedItem.toString()}</GrFlex>
<TeFlex>{cbTema.selectedItem.toString()}</TeFlex>
<BuFlex>{TotB}</BuFlex>
<MaFlex>{TotM}</MaFlex>
<NoFlex>{NotaF}</NoFlex>
</mx:request>
</mx:HTTPService>

Las variables:
[Bindable] private var TotB:uint;
[Bindable] private var TotM:uint;
[Bindable] private var NotaF:Number = 0;

El php, que no se si ese sea el erro pues me inserta pero no lo hace bien:
<?php
include('conex.php');
$al = $_POST['AlFlex'];
$gr = $_POST['GrFlex'];
$te = $_POST['TeFlex'];
$bu = $_POST['BuFlex'];
$ma = $_POST['MaFlex'];
$not = $_POST['NoFlex'];

$sql=mysql_query("INSERT INTO tblusuarios VALUES ('$al','$gru','$te','bu','ma','not')");
?>

Cuando verifico la base de datos me inserta pero siempre mete valores como el nombre de la variable, muestro un ejemplo de lo inserto alguna vez
Alumno Tema Grupo Buenas Malas Nota
Joan Manuel Salazar [object Object] bu ma not
Como puede ver solo inserta bien el nombre del alumno y lo otro lo hace como si fuese la variable, ademas que el Tema y el grupo tiene otro error, uno vacio y el otro con el objeto; seguro al seleccionar de un comboBox.

Por la ayuda que me puedan prestar muchas gracias,

Por acumulador

28 de clabLevel



 

chrome
Citar            
MensajeEscrito el 01 Ago 2010 10:36 pm
En tu insert, los primeros tres valores son variables (tienen el signo $) y los siguientes tres literales, ¿quieres todos variables? Ponle el signo $ a todos

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 02 Ago 2010 01:23 am
Jorge, que pena, discúlpame no vi ese grandisiiiiiiimo error, ya mismo lo arreglo y les informo. Muchas gracias.

Por acumulador

28 de clabLevel



 

chrome

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.