Title says it all.
I cant get the code to run within the html page. If I paste it to an a5w page it works fine. I am trying to write a listener page to respond to Paypal Payflowlink system. The system doesn't respond to an a5w page (voids transaction due to communication error) but its very happy with the same code in an html page......except it won't write to the db....just prints code to screen. The issue appears to be that it is only printing code to screen...not running it.
This code doesn't deal with the Paypal stuff.....it just tries to insert a record. Doesn't work in html page....works fine in a5w.
What am I missing??
I cant get the code to run within the html page. If I paste it to an a5w page it works fine. I am trying to write a listener page to respond to Paypal Payflowlink system. The system doesn't respond to an a5w page (voids transaction due to communication error) but its very happy with the same code in an html page......except it won't write to the db....just prints code to screen. The issue appears to be that it is only printing code to screen...not running it.
This code doesn't deal with the Paypal stuff.....it just tries to insert a record. Doesn't work in html page....works fine in a5w.
What am I missing??
HTML Code:
<!DOCTYPE html> <html> <head> <meta name="generator" content="Alpha Five HTML Editor Version 11 Build 2765-3967"> <!-- must use in order to make XP Themes render --> <meta HTTP-EQUIV="MSThemeCompatible" content="Yes" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title></title> </head> <body> <%a5 'Insert a new record into a remote SQL database. 'DIM a connection variable DIM cn as SQL::Connection dim flagResult as l flagResult = cn.open("::Name::Conference") if flagResult = .f. then 'ui_msg_box("Error","Could not connect to database. Error reported was: " + crlf() + cn.CallResult.text) end end if 'Specify that we are using Portable SQL syntax cn.PortableSQLEnabled = .t. 'Dim a SQL arguments object, create arguments and set their values DIM args as sql::arguments args.add("MemberID","123456789") dim sqlInsertStatement as c sqlInsertStatement = <<%txt% INSERT INTO con__registration (MemberID) VALUES (:MemberID) %txt% dim flag as l flag = cn.Execute(sqlInsertStatement,args) if flag = .f. then 'ui_msg_box("Error","Record was not inserted. Error reported was: " + crlf(2) + cn.CallResult.text,UI_STOP_SYMBOL) else if cn.AffectedRows() = 1 then 'ui_msg_box("Notice","Record was created.",UI_INFORMATION_SYMBOL) else 'ui_msg_box("Error","Record was not inserted." ,UI_STOP_SYMBOL) end if end if 'Table has an auto-increment field. Get the value that was assigned to this field and store it in 'a variable. dim LastIdentityValue as a if cn.AffectedRows() = 1 then LastIdentityValue = cn.callResult.LastInsertedIdentity end if 'Now, close the connection cn.close() %> </body> </html>
Comment