
datlaravi
Deleted
Jun 6, 2000, 12:42 PM
Post #1 of 5
(101 views)
|
|
Please help me in insert statement
|
Can't Post
|
|
Hi, I want to get the form value and insert into the database. The html for the formfield is for example //file work.cgi use CGI; $query = new CGI; $building =$query->param{'buildName'}; &printform; sub printform { <form name ="build" method ="post" action="work.cgi"> (same file has sub routines) <TD> <input type="text" size="10" name="buildName"></TD> <TD> <input type ="submit" name = "buildAdd" value ="BAdd"> } The code i have is if (($in{buildAdd} eq "BAdd")) { &addBuilding; } sub addBuilding { $insert = "insert ConferenceRooms values ('$building', "a123", 234, 0,0,0,0,0,"234-567-7890","345-346-8798")"; $sybHandle=$syb->prepare($insert); $sybHandle->execute() | | &writeError('User cannot be added'); $sybHandle->finish(); #$message = "<b>User Added</b><p>"; } I am getting an error at the insert statement.Please help me. Can you send me an email so i can send as an attachment. Can i have 2 submit buttons in the same form with the post method going to the same file (eg: work.cgi)
|