| 
	
 | 
 Posted by The Godfather on 12/06/06 15:43 
Hi, 
i write an entire site using sajax and php and I found it very powerful 
and useful. 
But yesterday my client had formatted the ubuntu server and when server 
is come back online a strange thing happened. 
Sajax seems to work fine (i use the debug mode) while send parameters 
to the exported function but when the server function has been called 
the parameters sended by javascript are lose and the function receive 
the string "Array". 
 
I miss some php/apache module? 
Maybe some security module installed don't let pass the parameter? 
 
Any other idea are appreciated... 
 
Thanks 
 
MicKy 
 
This is my code: 
 
<?php 
 require("include/Sajax.php"); 
 function checkuser($usr) { 
//The paramenter $usr receive always the string "Array" 
  $query="SELECT * FROM users WHERE username = '".$usr."'"; 
  query($query,$res,$rows); 
 
  if ($rows > 0) { 
   // TODO: ... 
  } 
 } 
 
 sajax_init(); 
 //$sajax_debug_mode = 1; 
 sajax_export("checkuser"); 
 sajax_handle_client_request(); 
?> 
 
 <?php sajax_show_javascript(); ?> 
 
 function do_check_ris(ris) { 
  document.getElementById("ris").value = ris; 
 } 
 
 function do_check() { 
  // get the folder name 
  var usr; 
  usr = document.getElementById("txtNick").value; 
 
  x_checkuser(usr, do_check_ris); 
 } 
 </script> 
 
// form... 
<input name="txtNick" type="text" id="txtNick" /> <input type="button" 
name="check" value="check!" onclick="do_check(); return false;" > 
<input type="text" name="ris" id="ris" value="" >
 
  
Navigation:
[Reply to this message] 
 |