This is a migrated thread and some comments may be shown as answers.

working with forma data using php

1 Answer 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Benedict
Top achievements
Rank 1
Benedict asked on 28 Jul 2013, 10:27 PM
im using php to access data in mysql database but i would like to store form data into my database using php and how do i select username and password using php in a form created kendoui...thanks in advance.

<?php
 $link = mysql_pconnect("localhost", "root", "") or die("Unable To Connect To Database Server");
     mysql_select_db("db") or die("Unable To Connect To ebusticket");
   
    $request_vars = Array();
    parse_str(file_get_contents('php://input'), $request_vars);

    $arr = array();
   $fname = $request_vars["fname"];
   $lname = $request_vars["lname"];
    
    $rs = mysql_query("insert into table (Pass_Surname, Pass_Fname) values ('" .$lname. "' , '" .$fname. "'");

   if ($rs) {
        echo json_encode($rs);
    }
    else {
        header("HTTP/1.1 500 Internal Server Error");
        echo "Insert Failed";
        
    }
    
     // add the header line to specify that the content type is JSON
    header("Content-type: application/json");
?>

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 31 Jul 2013, 07:04 AM
Hello,

Question is not related to the KendoUI framework itself, but to PHP. Consider asking your question on the appropriate forums.

Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Benedict
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or