הרשם שאלות ותשובות רשימת חברים לוח שנה חיפוש הודעות מהיום סמן פורומים כנקראו

   
|!|

סגור את ההודעה
 
כלים לאשכול תצורת הצגה
ישן 23-04-08, 19:33   # 1
דור
אחראי קהילה
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
גיל: 33
הודעות: 3,724

דור לא מחובר  

UPDATE - עידכון נתונים [ בעיה ]

שפת asp
עשיתי שאם המשתמש והסיסמא נכונים, זה מעביר לקובץ עידכון נתונים ששם מופיע כבר הנתונים והת.ז לא ניתנת לעריכה

שאתה לוחץ שלח כמובן זה מעדכן
אין שגיאה אבל זה לא מעדכן

אשמח אם תעזרו לי למצוא את הבעיה

edit.html - טופס משתמש וסיסמא לראות אם זה נכון -
קוד:
<html dir=rtl>
	<head>
	<script language="javascript">

		function test(x)

		{

			function onlydigits(str)
			{
				for (i=0; i < str.length; i++)
				{
				if((str.charAt(i))>'9' || (str.charAt(i))<'0')
				return (false)
				}
				return (true);
			}// -------------------------------------------------

			if (x.id.value=="")

			{

				alert ("חובה לכתוב מספר תעודת זהות");

				x.id.focus();

				x.id.select();

				return false;

			}
// -------------------------------------------------
			if (onlydigits(x.id.value)==false)

			{

				alert ("תעודת זהות לא תקינה");

				alert ("תעודת זהות חייבת להכיל רק ספרות");
				x.id.focus();

				x.id.select();

				return false;

			}
// -------------------------------------------------


			if (x.id.value.length!=9)

			{

				alert ("תעודת הזהות לא תקינה");

				alert ("תעודת הזהות חייבת להיות בת 9 ספרות בלבד");
				x.id.focus();

				x.id.select();

				return false;

			}
// -------------------------------------------------

			if (x.Password.value=="")

			{

				alert ("חסר סיסמה");

				x.Password.focus();

				x.Password.select();

				return false;

			}
// -------------------------------------------------

	        		if (x.Password.value.length<6)

			{

			 alert ("סיסמה חייבת להכיל שישה תווים לפחות");

			 x.Password.focus();

			 x.Password.select();
			 return false;

			}
// -------------------------------------------------

			return true;  // אם הבדיקה הגיעה עד כאן - סימן שהכל תקין

		    }

	</script>
	</head>
	<body link="blue" alink="blue" vlink="blue">
	<font size="2" face="arial">
	<font size="4">שינוי סיסמא:</font>
	<form name="myform" method="post" action="edit.asp" onsubmit="return test(myform)">
	<table border="1" align="center">
		<tr>		
			<td>		
				ת"ז:
			</td>
			<td><input type="text" name="id" size="13"><br></td>

		</tr>
		<tr>
			<td>
				סיסמא:
			</td>
			<td>
				<input type="password" name="Password" size="13"><br>
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="submit" name="submit" value="שלח">
	                        <input type="reset" name="reset" value="נקה">
			</td>
		</tr>
	</table>
	</center>
	</font>
	</body>
</html>
שנשלח לקובץ edit.asp
קוד:
<%
		
	i=Request.Form("id")
	p=Request.Form("Password")
	sq="select*from dor_data where (id='"&i&"' and Password='"&p&"')"
	path=Server.mappath("MY_Order.mdb")
	
	set con= Server.createobject("ADODB.Connection")
       
 	con.mode=3	
     
   	con.open "Provider=Microsoft.Jet.OLEDB.4.0;data source=" &path
 
	set R=con.execute(sq)
	if R.eof then
		response.write "פרטים לא נכונים"
	else
%>
<html dir=rtl>
	<head>
	</head>
	<body link="blue" alink="blue" vlink="blue">
	<font face="arial" size="2">
	עידכון פרטים:
	<!-- תחילת קוד הטופס -->
	<form name="myform" method="post" action="update.asp">
	<table border="1" align="center">
		<tr>		
			<td>		
				שם פרטי:
			</td>
			<td><input type="text" name="firstname" value="<%=R.fields("firstname")%>" size="13"><br></td>

		</tr>
		<tr>
			<td>
				שם משפחה:
			</td>
			<td>
				<input type="text" name="familyname" value="<%=R.fields("familyname")%>" size="13"><br>
			</td>
		</tr>
		<tr>
			<td>
				תעודת זהות:
			</td>
			<td>
				<input type="text" name="id"  disabled value="<%=R.fields("id")%>" size="13">
			</td>
		</tr>
		<tr>
			<td>
				הזמנת כרטיסים למשחק:
			</td>
			<td>
				<select name="game">
					<option><%=R.fields("game")%></option>>
					<option>6.9 ישראל-שוויץ</option>
					<option>28.3 ישראל-יוון </option>
					<option>5.9 ישראל-לטביה</option>
					<option>9.9 ישראל-לוקסמבורג</option>
					<option>10.10 ישראל-מולדובה</option>
				</select>
			</td>
		</tr>
		<tr>
		<tr>
			<td>
				אימייל:
			</td>
			<td>
				<input type="text" name="email" value="<%=R.fields("email")%>" size="13">
			</td>
		</tr>
		<tr>
			<td>
				טלפון/פלאפון:
			</td>
			<td>
				<input type="text" name="number" value="<%=R.fields("number")%>" size="13">
				<select name="kidomet">
					<option><%=R.fields("kidomet")%></option>
					<option>02</option>
					<option>03</option>
					<option>04</option>
					<option>08</option>
					<option>050</option>
					<option>052</option>
					<option>054</option>
					<option>057</option>
				</select>
			</td>
		</tr>
			<td>
				שם הרחוב:
			</td>
			<td>
				<input type="text" name="namestreet" value="<%=R.fields("namestreet")%>" size="13"><br>
			</td>
		</tr>
		<tr>
			<td> מספר בית:
			</td>
			<td>
				 <input type="text" name="numhome" value="<%=R.fields("numhome")%>" size="4"><br>
			</td>
		</tr>
		<tr>
			<td> שם העיר: </td>
			<td>
				<select name="city">
					<option><%=R.fields("city")%></option>
					<option>כפר יונה</option>
					<option>ראשון לציון</option>
					<option>אחוזת ברק</option>
					<option>קרית שמונה</option>
					<option>רמת גן</option>
					<option>תל אביב</option>
					<option>כפר סבא</option>
					<option>אשדוד</option>
					<option>בת ים</option>
					<option>אריאל</option>
				</select>
				<br>
			</td>
		</tr>
		<tr>
			<td> בקשות מיוחדות:
			</td>
			<td>
				<textarea name="comment" cols="20" rows="3"><%=R.fields("comment")%></textarea>
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="submit" name="submit" value="שלח">
	                        <input type="reset" name="reset" value="נקה">
			</td>
		</tr>				 
	</table>
	<!-- סיום קוד הטופס -->
	</form>
	</font>
	</body>
</html>
<%
end if 
%>



שנשלח לקובץ update.asp [ששם כנראה יש את הבעיה]
קוד:
<%

	fname=Request.Form("firstname")
	sname=Request.Form("familyname")
	i=Request.Form("id")
	e=Request.Form("email")
	num=Request.Form("number")
	nstreet=Request.Form("namestreet")
	numh=Request.Form("numhome")
	c=Request.Form("comment")
	g=Request.Form("game")
	k=Request.Form("kidomet")
	town=Request.Form("city")
	sq="UPDATE `dor_data` SET `firstname`='"&fname&"',`familyname`='"&sname&"',`email`='"&e&"',`number`='"&num&"',`namestreet`='"&nstreet&"',`numhome`='"&numh&"',`comment`='"&c&"',`kidomet`='"&k&"',`game`='"&g&"',`city`='"&town&"' WHERE `id`='"&i&"'"	
	path=Server.mappath("MY_Order.mdb")
	
	set con= Server.createobject("ADODB.Connection")
       
 	con.mode=3   
   	con.open "Provider=Microsoft.Jet.OLEDB.4.0;data source=" &path
     
	
	con.Execute sq

%>



נתוניך עודכנו בהצלחה
 
ישן 23-04-08, 20:12   # 2
דור
אחראי קהילה
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
גיל: 33
הודעות: 3,724

דור לא מחובר  

תודה לליאור וול התותח,
אפשר לנעול.
 
סגור את ההודעה

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 

כלים לאשכול
תצורת הצגה

חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 23:26.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ