View Single Post
ישן 05-11-05, 22:23   # 1
dani419
חבר חדש
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 12

dani419 לא מחובר  

בעיה בכנסת נתונים ל SQL!

טוב אז הבעיה היא כזאת:
בניתי טופס הרשמה פשוט ב HTML ככה:

HTML קוד:
<html dir="rtl">
<head>
<title></title>
</head>
<body background="Images/BackGround.gif" link="#364D67" vlink="#364D67" alink="#364D67">

<form action="Reg.php" method="Post">
  Username: <input type="text" id="User" name="User"><br>
  Password: <input type="text" id="Pass" name="Pass"><br>

  <input type="submit" value="send" />
</form>

</body>
</html>
והנה הקובץ שאני שולח אליו את הנתונים(Reg.php):

PHP קוד:
<html dir="rtl">
<head>
<title></title>
</head>
<body background="Images/BackGround.gif" link="#364D67" vlink="#364D67" alink="#364D67">

נרשמת בהצלחה!

<?php
$User 
$_POST['User'];
$Pass $_POST['Pass'];

include(
'db.php');//Connection DB

mysql_query("INSERT INTO User (User,Password)
VALUES ($User,$Pass)"
);// Add User and Passowrd to Db

?>

</body>
</html>
רציתי לדעת עם יש בזה בעיה כל שהיא... פשוט אני מתחיל בכל הקטע הזה ואני
לא יודע להוציא נתונים המסדר ולהציג אותם! (אם מישהו יכול לעזור לי גם בזה? אז סבבה!)

בתודה דני!
  Reply With Quote