Results 1 to 2 of 2

Thread: [RESOLVED] Inline edit with JavaScript and save to PHP file

  1. #1
    Join Date
    Nov 2011

    resolved [RESOLVED] Inline edit with JavaScript and save to PHP file

    I am not sure if this is a question for the JS forum or for the PHP forum but I found this script http://www.yvoschaap.com/instantedit/

    I am trying to get the JS to save to the PHP this is the example they gave for the save.php file

    PHP Code:
    ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
    header("Last-Modified: " gmdate("D, d M Y H:i:s") . " GMT"); // always modified
    header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); // HTTP/1.1
    header("Cache-Control: post-check=0, pre-check=0"false);
    header("Pragma: no-cache"); // HTTP/1.0

    //we get 2 vars: fieldname and content. so you get: $fieldname=$content;
    //and we get the vars set in the function setVarsForm(vars). These could be used 
    //to identify a user with sending userID=1 
    //you also can use $_COOKIE['someID'] in the file.

    //create DB connection

    //update from table set $fieldname = $content where userID = $_COOKIE['userID']


    //if($_GET['fieldname'] == "userName")
    //  setUserName($_GET['content']);
    //if($_GET['fieldname'] == "userCity")
    //  setUserCity($_GET['content']);


    //$handle = fopen($_GET['fieldname'].".txt", "w+");
    //fwrite($handle, stripslashes($_GET['content']));

    $fieldname $_GET['fieldname'];
    stripslashes(strip_tags($_GET['content'],"<br><p><img><a><br /><strong><em>"));
    I've never tried to pull data without using a form tag so I am confused

  2. #2
    Join Date
    Nov 2011
    is there anyway to delete this I finally found a better solution

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center