AnanthaKN / jquery-in-place-editor

Automatically exported from code.google.com/p/jquery-in-place-editor
Other
0 stars 0 forks source link

No post to server.php #79

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Demo files, added some php/database details
2.
3.

What is the expected output? What do you see instead?
I would like to catch a POST to the server.php and post it to a MySqlDb.

What version of the product are you using? On what operating system?
2.2.0
Jquery version 1.3 & 1.4 (I tried both)
Windows 7, Dutch, x64
USBW server

Please provide any additional information below.
I am not getting a post at all.
Php: does not receive any post. 
Tried different options; changed path to php-file, etc

php part:
$element_id = $_POST['element_id'];
//  $original_html = $_POST['original_html'];  
$update_value = $_POST['update_value'];

mysql_connect("localhost","root",""); 
mysql_select_db("lab"); 
$commando="INSERT INTO bluescreen (value,element_id) VALUES 
('$update_value','$element_id')";
mysql_query($commando);

Original issue reported on code.google.com by timhageb...@gmail.com on 24 Dec 2010 at 9:41

GoogleCodeExporter commented 8 years ago
if (this.settings.callback)
            this.handleSubmitToCallback(enteredText);
        else
            this.handleSubmitToServer(enteredText);

Delete the first three lines if you don't have a callback anyway

Original comment by Alexande...@gmail.com on 5 Jan 2011 at 8:36

GoogleCodeExporter commented 8 years ago
its showing the edited value, but its not invoking server.php at all, i have 
been mentioned it in the url. following is my code.

$("#Company_Name").editInPlace({
   callback: function(original_element, html, original){
            url: "server.php";
            $("#updateDiv1").html(html);
            $("#updateDiv2").html(html);
            this.handleSubmitToServer(html);
            return(html);

        }
    });

it is the line in my server.php
<?php
require_once ("sessions.php");
$_SESSION['cn'] =  $_POST['update_value'];
?>

Original comment by asifqua@gmail.com on 11 Jan 2011 at 12:45