
05-11-2007, 02:41
|
|
|
|
חבר מתאריך: 05.11.07
הודעות: 1
|
|
|
בעיה באיחזור נתוני טופס בASP - עזרה בבקשה
היי.
יש לי בעיה, אני מנסה לאחזר שדות טופס אבל אני לא מצליח.
אני מתכוון, שהנתונים יהייו בשדות הטופס.
אני ממש אודה לכם, אם מישהו יוכל להציץ ולהגיד מה אני עושה לא בסדר, אני כבר מתחיל להשתגע.
<%@Language=VBScript %>
<%
operation=trim(request("Save"))
if operation="Save"then
%>
<formaction="HTlogger.asp"method="post">
<strong>date:</strong><INPUTtype="text"name="CallDate"value="<%=server.htmlencode(CallDate)%>"<br>
<strong>Time:</strong><INPUTtype="text"name="CallTime"value="<%=server.htmlencode(CallTime)%>"readonly="readonly"><br>
<strong>Name:</strong><selectname="name">
<optionvalue=choose>Choose your name</option>
<optionvalue=nh>c</option>
<optionvalue=rty>ju7</option>
<optionvalue=k>dfh</option>
<optionvalue=m>j</option>
<optionvalue=gfh>fg</option>
</select><br/>
<strong>Hospital:</strong>
<selectname="hospital">
<optionvalue=gfh>,k</option>
<optionvalue=fj>,lo</option>
<optionvalue=jg>mb,</option>
<optionvalue=mj>ju</option>
</select><br>
<strong>Caller:</strong><INPUTname="caller"value="<%=server.htmlencode(caller)%>"<br><br>
<strong>Description:</strong><br><textareaname="description"style="height: 150px; width: 635px"><%=server.htmlencode(description)%></textarea>
<br/>
<br/>
<inputtype="submit"value="Save"id=Submit1name=Save>
<inputtype="submit"value="Close"id=Submit2name=Close>
</form>
<br><br><br>
<%endif%>
<%
if operation<>"Save"then
dim conn,callTime,CallDate,currentSession
callTime=time()
callDate=date()
set conn=Server.CreateObject("ADODB.connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& Server.MapPath("HTlogger.mdb")
dim sql
sql="INSERT INTO LoggerDB (timeOfCall, dateOfCall) values"
sql= sql &"('" &callTime &"','" &callDate &"')"
conn.Execute sql
conn.Close
set conn=nothing
%>
<palign=left><imgsrc="header_1.gif"></p>
<title>E&C support call logger</title>
<html>
<head>
</head>
<bodybgcolor=#ffcc99>
<formaction="HTlogger.asp"method="post">
<strong>date:</strong><INPUTtype="text"name="CallDate"value=<%=date()%> ID="date"readonly="readonly"><br>
<strong>Time:</strong><INPUTtype="text"name="callTime"value=<%=time()%> ID="time"readonly="readonly"><br>
<strong>Name:</strong><selectname="name">
<optionvalue=choose>Choose your name</option>
<optionvalue=fh>hjy</option>
<optionvalue=fg>jh</option>
<optionvalue=mm>gfh</option>
<optionvalue=my>gfh</option>
<optionvalue=klu>g5</option>
</select><br/>
<strong>Hospital:</strong>
<selectname="hospital">
<optionvalue=f4>as</option>
<optionvalue=bn>df</option>
<optionvalue=mj>gf</option>
<optionvalue=mu>yt</option>
</select><br>
<strong>Caller:</strong><INPUTname="caller"><br><br>
<strong>Description:</strong><br><textareaid=descriptionAreaname="description"style="height: 150px; width: 635px"></textarea>
<br/>
<br/>
<inputtype="submit"value="Save"id=Savename=Save>
<inputtype="submit"value="Close"id=Closename=Close>
</form>
<br><br><br>
</body>
</html>
<%endif %>
|