[Solved] Javascript ajax don’t work

First callback is not defined and second you also need to call get_lan() function to get it work Updated code function get_lan() { var lan_code = document.getElementById(‘customDropdown1′).value; var params = “lan=” + lan_code; $.ajax({ type: “POST”, url: “api/get_lan.php”, data: params, success: function(result) { document.getElementById(“lan_code”).innerHTML = result; } }); } get_lan(); solved Javascript ajax don’t work

[Solved] how to post data to two php pages simultaneously & parallely execute them? [closed]

You can send two ajax request using javascript. Using jQuery it will be something like $.post(‘first_page.php’, {data: ‘Some Data’}, function(response) { // process 1st page }); $.post(‘second_page.php’, {data: ‘Some Data’}, function(response) { // process 2nd page }); solved how to post data to two php pages simultaneously & parallely execute them? [closed]

[Solved] How do I post multiple parameters to a URL

If I’ve understood your requirements you need to pass method as a string, then JSON encode the params object. If so, this should work for you: $.post(‘https://liceoeuroamericano.territorio.la/webservices/persona.php’, { method: ‘activateUser’, params: JSON.stringify({ auth_key: “123456”, user: “[email]”, active: “[0/1]” }) }, function(data){ console.log(‘request completed successfully’); }) 1 solved How do I post multiple parameters to a … Read more

[Solved] ( ! ) Parse error: syntax error, unexpected ‘}’ in C:\wamp\www\mybbeklents\rapor\gonder.php on line 11 [duplicate]

You are missing semicolons: if($ad==””){header(“location:index.php?kls=1″);}else {if($email==””){header(“location:index.php?kls=2″);}else {if($mesaj==””){header(“location:index.php?kls=3″);}else {if($kiriklink==””){header(“location:index.php?kls=4”);}else {mysql_query(“INSERT INTO bildirim (`ad`,`email`,`acklama`,`kiriklink`,`tarih`) VALUES (‘$ad’,’$email’,’$mesaj’,’$kiriklink’,now())”);header(“location:index.php?kls=5″);}}}} Btw. if you don’t use, then you should start using some IDE like netbeans or phpdesigner, it will show you where error is NEW CODE: if($ad==””){header(“location:index.php?kls=1″);}else {if($email==””){header(“location:index.php?kls=2″);}else {if($mesaj==””){header(“location:index.php?kls=3″);}else {if($kiriklink==””){header(“location:index.php?kls=4”);}else { $query = “INSERT INTO bildirim (`ad`,`email`,`acklama`,`kiriklink`,`tarih`) VALUES (‘$ad’,’$email’,’$mesaj’,’$kiriklink’,now())”; $result = mysql_query($query); … Read more

[Solved] Form that logs in to a website?

A lot of websites on the internet (not nearly enough though) have protection in place that prevents sites other then their own to post forms (log in for example) to their site. A site that does not have this protection is vulnerable to: Cross Site Request Forgery (CSRF): http://en.wikipedia.org/wiki/Cross-site_request_forgery This is a major security risk … Read more

[Solved] Change PHP code to JS

I echo the comment above. I believe StackOverflow is not a code writing service unless something changed very recently. However, let’s look at the code you posted. I think it would help to refactor this code into a more logical sense before attempting this in Javascript. That should make it easier to transpose. Every time … Read more

[Solved] How to write REST web service in cakephp using Post ..? [closed]

you can sent json through Http post in cakephp <?php $data = array(‘Users’=>array(‘id’=>’1′,’username’=>’xyz’,’password’=>’pass’,’email’=>’[email protected]’,’age’=>’28’,’gender’=>’male’)); $url = “http://localhost/appname/Controllername/functionname”; $content = json_encode($data); $curl = curl_init($url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, ‘data=”.$content); $json_response = curl_exec($curl); echo $json_response;?> 2 solved How to write REST web service in cakephp using Post ..? [closed]

[Solved] Login PHP it’s not working [closed]

You have many errors in your code : $result = mysql_query(“SELECT * FROM utilizatori WHERE username=”” . $loginUsername . “” and parola=””. $loginUsername.”””); You check username and parola on same var. You probably want : $result = mysql_query(“SELECT * FROM utilizatori WHERE username=”” . $loginUsername . “” and parola=””. $loginPassword.”””); You are also affecting vars … Read more

[Solved] How to ‘$_POST’ back to the same page or to a different result page in php? [closed]

<FORM action=”info.php” method=”post”> <P> <LABEL for=”firstNum”>First Number: </LABEL> <INPUT type=”text” name=”firstNum” id=”firstNumberLabel”><BR> <LABEL for=”secondNum”>Second Number: </LABEL> <INPUT type=”text” name=”secondNum” id=”secondNumberlabel”><BR> <INPUT type=”radio” name=”calc” value=”1″> Add<BR> <INPUT type=”radio” name=”calc” value=”2″> Subtract<BR> <INPUT type=”radio” name=”calc” value=”3″> Multiply<BR> <INPUT type=”radio” name=”calc” value=”4″> Divide<BR> <INPUT type=”submit” value=”Send”> <INPUT type=”reset”> </P> </FORM> <form action= <?php echo $_SERVER[‘PHP_SELF’] ?> method=”post”> <label … Read more