2008. 02. 22, péntek keltezéssel 12.03-kor germana ezt írta:
> Hi!!
>
> Im trying to sent data to and php with Ajax, so..
> this is what im sending>_url= "table='historia'$'='$''$'string'$''&";
>
> then i do:
>
> _url = _url.substring(0,_url.length-1) //quita el & de sobra al final
> var ajax = nuevoAjax();
> ajax.open("POST", "atrapalo_x.php", true);
> ajax.setRequestHeader("Content-Type",
> "aplication/x-www-form-urlencoded");
> ajax.send(_url);
>
> ajax.onreadystatechange = function()
> {
> if(ajax.readyState == 4)
> {
> alert(ajax.responseText)
> .
> .
> .
> ..............
>
> and in the php i do:
>
> $datafield=explode("$",str_replace("\'","'",$_POST["table"]));
> $main_table="".str_replace("'","",$datafield[0])."";
> $main_table=strtolower($main_table);
>
> but when i do and echo $datafield[0] or echo $main_table
>
> it returns nothing... just blank
>
and if you var_dump($_POST) what does it show?
greets
Zoltán Németh
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php