Thursday, 15 July 2010

php - Data not inserted into table -


I have a problem, I have a stored procedure inclusive query and a PHP form ... me funnel and lin my desk But when I click the button stored in my PHP function, but when I look in my table then no errors were received ... no data was entered ...

PHP Code:

  & lt; ? Php $ serverName = "bongbong-pc"; $ Connection = array ("database" = & gt; "profit_investment"); $ Conn = sqlsrv_connect ($ serverName, $ connection); $ Btn = $ _ Post ['Button']; $ S_fname = $ _ post ['fname']; $ S_lname = $ _ post ['lname']; $ Stmt = sqlsrv_prepare ($ conn, 'Call entry record (@funam, line @)', array (& amp; $ s_fname, & amp; $ s_lname)); Sqlsrv_execute ($ stmt); If (! $ Stmt) {Dead (print_a (true))); } Echo "& lt; script language = javascript & gt; warning ('account saved') "; ? & Gt;   

HTML code:

  & lt; Div id = "login_body" & gt; & Lt; Form method = "post" name = "MyForm" & gt; & Lt; P class = "p3" & gt; First name: & lt; Input type = "text" name = "fname" placeholder = "fname" class = "aaa" /> & Lt; / P & gt; & Lt; P class = "p4" & gt; Last name: & lt; Input type = "text" name = "lname" placeholder = "lname" class = "aaa" /> & Lt; / P & gt; & Lt; Input type = "submit" name = "button" class = "login" value = "login" /> & Lt; / Form & gt; & Lt; / Div & gt;   

Process processed in SQL Server

  USE [Benefit_Innsence] Go to the change direction Go to ANSI_LLS Change the Transformation Process [DBO]. [Insert_record] @fname Varchar (50) output, @lname varchar (50) Log in as the output Troylang (fname, lname) values ​​(@ FNN, @ Elana) END    

You are not checking the errors on the executed statement, only on the statement prepared.

(and store password plain text is not large)

No comments:

Post a Comment