اذهب إلى المحتوى

ايمن ميلاد

الأعضاء
  • المساهمات

    149
  • تاريخ الانضمام

  • تاريخ آخر زيارة

  • عدد الأيام التي تصدر بها

    1

آخر يوم ربح فيه ايمن ميلاد هو مارس 31

ايمن ميلاد حاصل على أكثر محتوى إعجابًا!

آخر الزوار

لوحة آخر الزوار معطلة ولن تظهر للأعضاء

إنجازات ايمن ميلاد

عضو نشيط

عضو نشيط (3/3)

70

السمعة بالموقع

  1. انا كل الذي دكرته تعلمته انا مشكلتي في mvc ما قصدك با كيفية تصميم النماذج models لقواعد البيانات. ثم تعلم كيف تقوم بتنفيذ Routing باستخدام PHP.
  2. السلام عليكم ماذا قبل تعلم اطار عمل لارافيل انا تعلمت بعض من لغة برمجة php من يوتيوب هدا اغلب تعلمته كيفية تعريف متغيرات جمل شرطية if switch جمل تكرار while for do wile المصفوفات بانواعها تعامل مع الوقت والتاريخ تعامل مع رفع ملفات تعلمت opp برمجة كائنية التوجه تعامل مع قواعد بيانات عن طريق mysqli ماذا احتاج لكن افهم اطار عمل لارافيل ياريت نصائحكم اخواني المبرمجين للعلم كل يوم اجد شي جديد عالم كبير برمجة اما احتاج تعلم مزيد في php انا عارف انه اطار عمل لارافيل مبني بلغة php نصائحكم اخواني مبرمجين وبارك الله فيكم
  3. تم تحميل صورة في مجلد لكن لم يتم تخزين بيانات في جدول
  4. صورة لم تحفظ في مجلد uploads وكذلك سجل في قاعدة بيانات لماذا تظهر رسالة تم حفظ بنجاح
  5. قمت بتغير حقل img_std الي varchar حجمه 255 انا اريد حفظ اسم فقط لماذا لا يحفظ كود الان if (isset($_POST['submit'])) { $id_std = $_POST['num_std']; $full_name = $_POST['name_std']; $dept_std = $_POST['dept']; $email_STD = $_POST['email_STD']; $pass = $_POST['Pass']; $group = $_POST['group_ID']; $id_teah = $_POST['teah']; $file_name = $_FILES['image']['name']; $tempname = $_FILES['image']['tmp_name']; $folder = "uplodas/" . $file_name; if (empty($id_std) or empty($full_name)) { echo "<div style='margin-top:10px;' class='text-center alert alert-danger' role='alert'><h3> الرجاء كتابة بيانات صحيحة </h3></div>"; echo '<meta http-equiv="refresh" content="4;url=student.php" />'; } else { if (filter_var($id_std, FILTER_VALIDATE_INT)) { $sql_std = "SELECT * FROM `student` where `Num_std`='$id_std' AND Name_std='$full_name'"; $query_std = mysqli_query($con, $sql_std); $count_std = mysqli_num_rows($query_std); if ($count_std == 0) { $sql = "INSERT INTO `student`(`Name_std`, `Num_std`, `Email_STD` , `Password`, `dept_ID`, `group_ID`,`id_teah`,`img_std`) VALUES ( '$full_name' , $id_std , '$email_STD' , '$pass' , $dept_std , $group,$id_teah,$file_name)"; mysqli_query($con, $sql); move_uploaded_file($tempname, $folder); echo "<script> Swal.fire({ title: 'رسالة تأكيد', text: 'تم إضافة بيانات الطالب بنجاح!', icon: 'success', customClass: 'rak', }); </script>"; echo '<meta http-equiv="refresh" content="2;url=student.php" />'; } else { echo "<div style='margin-top:10px;' class='text-center alert alert-danger' role='alert'><h3> هذا الطالب موجود مسبقا </h3></div>"; } } } } else { echo '<meta http-equiv="refresh" content="50;url=student.php" />'; } ?> للعلم مجلد gpms هو مجلد مشروع داخله مجلد admin وايضا يوجد مجلد uploads انا كود اكتبه في صفحة add_student داخل مجلد admin يعني مفروض يكون هكدا مسار تخزين صورة $folder = "..uplodas/" . $file_name; تظهر رسالة تم حفظ لكن لا يتم تخزين سجل او صورة $sql = "INSERT INTO `student`(`Name_std`, `Num_std`, `Email_STD` , `Password`, `dept_ID`, `group_ID`,`id_teah`,`img_std`) VALUES ( '$full_name' , '$id_std' , '$email_STD' , '$pass' , '$dept_std' , '$group','$id_teah','$file_name')";
  6. انا اريد حفظ اسم صورة في قاعدة بيانات وصورة في مجلد uploads هذا كود يحفظ صورة فقط ولكن لا يحفظ بيانات في قاعدة بيانات ممكن تعدل عليه <?php include('header.php'); ?> <!--------------------------------------------------------------------------------> <!------------------------------------header--------------------------------------> <!--------------------------------------------------------------------------------> <head> <!-- مكتبة SweetAlert2 --> <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script> <style> .rak { width: 400px; height: 300px; font-size: 14px !important; } </style> </head> <div class="col-md-9 pan1"> <ol class="breadcrumb" style="background-color: #fff;padding-top:8px;padding-bottom:8px;color:#000;font-size:16px;"> <li><a href="student.php">الطلبة</a></li> <li class="active">اضافة طالب جديد</li> </ol> </div> </div> <div class="row"> <?php // mysql_query("set character_set_server='utf8'"); // mysql_query("SET NAMES 'utf8'"); //get subjects data // $sql3 = mysqli_query($con, "select * from teachers"); // $sql1 = mysqli_query($con, "select * from departments"); //get student data $sql2 = mysqli_query($con, "select * from group_names"); //get class data // $sql3 = mysqli_query($con,"select * from class WHERE `stat`=1"); ?> <div class="col-md-9 pan1"> <div class="panel" style="color:#000;"> <div class="panel-body" style="font-size:14px; padding-left:40px;padding-right:40px;padding-bottom:25px;padding-top:25px;"> <form method="POST" enctype="multipart/form-data"> <div class="form-group" style="margin-top:10px;"> <label> رقم القيد </label> <input name="num_std" type="text" class="form-control" placeholder="قم بكتابة رقم القيد هنا "> </div> <div class="form-group" style="margin-top:10px;"> <label> أسم الطالب </label> <input name="name_std" type="text" class="form-control" placeholder=" الرجاء كتابة الاسم كامل "> </div> <div class="form-group"> <label>صورة للطالب</label> <input type="file" name="file" /> </div> <div class="form-group" style="margin-top:10px;"> <label> البريد الالكتروني </label> <input name="email_STD" type="email" class="form-control" placeholder=" الرجاء كتابة بريد الالكتروني "> </div> <div class="form-group" style="margin-top:10px;"> <label> كلمة السر </label> <input name="Pass" type="Password" class="form-control" placeholder=" الرجاء كتابة كلمة السر "> </div> <!-------------------------------------------------------------------------------------------------------------------------------> <!-------------------------------------------------------------------------------------------------------------------------------> <div class="form-group" style="margin-top:10px;margin-bottom:25px;"> <label> القسم </label> <select name="dept" class="form-control" style="height: auto;"> <?php while ($row_sub = mysqli_fetch_array($sql1)) { echo '<option value="' . $row_sub['id_dept'] . '">' . $row_sub['Name_dept'] . '</option>'; } ?> </select> </div> <div class="form-group" style="margin-top:10px;margin-bottom:25px;"> <label> المشرف </label> <select name="teah" class="form-control" style="height: auto;"> <?php while ($row_std = mysqli_fetch_array($sql3)) { echo '<option value="' . $row_std['id_teah'] . '">' . $row_std['Name_teah'] . '</option>'; } ?> </select> </div> <div class="form-group" style="margin-top:10px;margin-bottom:25px;"> <label> المجموعة </label> <select name="group_ID" class="form-control" style="height: auto;"> <?php while ($row_std = mysqli_fetch_array($sql2)) { echo '<option value="' . $row_std['id_group'] . '">' . $row_std['Name_group'] . '</option>'; } ?> </select> </div> <!-------------------------------------------------------------------------------------------------------------------------------> <!-------------------------------------------------------------------------------------------------------------------------------> <button name="submit" type="submit" class="btn-blue"> إضافة <span class="ion-android-add"></span></button> <button type="reset" class="btn-def"> إلغاء <span class="ion-android-delete"></span></button> </form> <?php // mysql_query("set character_set_server='utf8'"); // mysql_query("SET NAMES 'utf8'"); if (isset($_POST['submit'])) { $id_std = $_POST['num_std']; $full_name = $_POST['name_std']; $dept_std = $_POST['dept']; $email_STD = $_POST['email_STD']; $pass = $_POST['Pass']; $group = $_POST['group_ID']; // $id_teah = $_POST['teah']; // $image = $_FILES['file']['name']; $target = "../uploads/" . basename($image); $imageFileType = strtolower(pathinfo($target, PATHINFO_EXTENSION)); if (empty($id_std) or empty($full_name)) { echo "<div style='margin-top:10px;' class='text-center alert alert-danger' role='alert'><h3> الرجاء كتابة بيانات صحيحة </h3></div>"; echo '<meta http-equiv="refresh" content="4;url=student.php" />'; } else { if (filter_var($id_std, FILTER_VALIDATE_INT)) { $sql_std = "SELECT * FROM `student` where `Num_std`='$id_std' AND Name_std='$full_name'"; $query_std = mysqli_query($con, $sql_std); $count_std = mysqli_num_rows($query_std); if ($count_std == 0) { if ( $imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" && $imageFileType != "gif" ) { echo "الملفات المسموح بها فقط هي JPG, JPEG, PNG, GIF."; } else { if (move_uploaded_file($_FILES['file']['tmp_name'], $target)) { include('../config.php'); $sql = "INSERT INTO `student`(`Name_std`, `Num_std`, `Email_STD` , `Password`, `dept_ID`, `group_ID`,`id_teah`,`img_std`) VALUES ( '$full_name' , $id_std , '$email_STD' , '$pass' , $dept_std , $group,$id_teah,$target )"; // mysql_query("set character_set_server='utf8'"); // mysql_query("set names 'utf8'"); mysqli_query($con, $sql); echo "<script> Swal.fire({ title: 'رسالة تأكيد', text: 'تم إضافة بيانات الطالب بنجاح!', icon: 'success', customClass: 'rak', }); </script>"; // echo "<div style='margin-top:10px;' class='text-center alert alert-success' role='alert'><h3> تم اضافة الطالب بنجاح </h3></div>"; echo '<meta http-equiv="refresh" content="2;url=student.php" />'; } else { echo "<div style='margin-top:10px;' class='text-center alert alert-danger' role='alert'><h3> هذا الطالب موجود مسبقا </h3></div>"; } //echo $pass; } } else { echo "<div style='margin-top:10px;' class='text-center alert alert-danger' role='alert'><h3> يجب ان يكون رقم القيد ارقام وليس حروف </h3></div>"; echo '<meta http-equiv="refresh" content="50;url=student.php" />'; } } } } ?> </div> </div> </div> </div> <!--------------------------------------------------------------------------------> <!------------------------------------Footer--------------------------------------> <!--------------------------------------------------------------------------------> <?php include('footer.php'); ?>
  7. ياريت رد علي سؤال اضافة صورة طالب اخي خالد
  8. السلام عليكم لدي كود تالي ممكن تعديل عليه ليتم اضافة صورة للطالب علم بان حقل اسمه std_img الذي يتم تخزين صورة به من نوع text $img_name=$_FILES['file']['name']; $img_type = $_FILES['file']['type']; $img_tmp = $_FILES['file']['tmp_name']; $img_dir = '../uploads/'; if(in_array($img_type,array("image/jpeg","image/jpg","image/png","image/gif"))){ move_uploaded_file($img_tmp,$img_dir); <?php include('header.php'); ?> <!--------------------------------------------------------------------------------> <!------------------------------------header--------------------------------------> <!--------------------------------------------------------------------------------> <head> <!-- مكتبة SweetAlert2 --> <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script> <style> .rak { width: 400px; height: 300px; font-size: 14px !important; } </style> </head> <div class="col-md-9 pan1"> <ol class="breadcrumb" style="background-color: #fff;padding-top:8px;padding-bottom:8px;color:#000;font-size:16px;"> <li><a href="student.php">الطلبة</a></li> <li class="active">اضافة طالب جديد</li> </ol> </div> </div> <div class="row"> <?php // mysql_query("set character_set_server='utf8'"); // mysql_query("SET NAMES 'utf8'"); //get subjects data // $sql3 = mysqli_query($con, "select * from teachers"); // $sql1 = mysqli_query($con, "select * from departments"); //get student data $sql2 = mysqli_query($con, "select * from group_names"); //get class data // $sql3 = mysqli_query($con,"select * from class WHERE `stat`=1"); ?> <div class="col-md-9 pan1"> <div class="panel" style="color:#000;"> <div class="panel-body" style="font-size:14px; padding-left:40px;padding-right:40px;padding-bottom:25px;padding-top:25px;"> <form method="POST"> <div class="form-group" style="margin-top:10px;"> <label> رقم القيد </label> <input name="num_std" type="text" class="form-control" placeholder="قم بكتابة رقم القيد هنا "> </div> <div class="form-group" style="margin-top:10px;"> <label> أسم الطالب </label> <input name="name_std" type="text" class="form-control" placeholder=" الرجاء كتابة الاسم كامل "> </div> <div class="form-group"> <label>صورة للطالب</label> <input type="file" name="file" /> </div> <div class="form-group" style="margin-top:10px;"> <label> البريد الالكتروني </label> <input name="email_STD" type="email" class="form-control" placeholder=" الرجاء كتابة بريد الالكتروني "> </div> <div class="form-group" style="margin-top:10px;"> <label> كلمة السر </label> <input name="Pass" type="Password" class="form-control" placeholder=" الرجاء كتابة كلمة السر "> </div> <!-------------------------------------------------------------------------------------------------------------------------------> <!-------------------------------------------------------------------------------------------------------------------------------> <div class="form-group" style="margin-top:10px;margin-bottom:25px;"> <label> القسم </label> <select name="dept" class="form-control" style="height: auto;"> <?php while ($row_sub = mysqli_fetch_array($sql1)) { echo '<option value="' . $row_sub['id_dept'] . '">' . $row_sub['Name_dept'] . '</option>'; } ?> </select> </div> <div class="form-group" style="margin-top:10px;margin-bottom:25px;"> <label> المشرف </label> <select name="teah" class="form-control" style="height: auto;"> <?php while ($row_std = mysqli_fetch_array($sql3)) { echo '<option value="' . $row_std['id_teah'] . '">' . $row_std['Name_teah'] . '</option>'; } ?> </select> </div> <div class="form-group" style="margin-top:10px;margin-bottom:25px;"> <label> المجموعة </label> <select name="group_ID" class="form-control" style="height: auto;"> <?php while ($row_std = mysqli_fetch_array($sql2)) { echo '<option value="' . $row_std['id_group'] . '">' . $row_std['Name_group'] . '</option>'; } ?> </select> </div> <!-------------------------------------------------------------------------------------------------------------------------------> <!-------------------------------------------------------------------------------------------------------------------------------> <button name="submit" type="submit" class="btn-blue"> إضافة <span class="ion-android-add"></span></button> <button type="reset" class="btn-def"> إلغاء <span class="ion-android-delete"></span></button> </form> <?php // mysql_query("set character_set_server='utf8'"); // mysql_query("SET NAMES 'utf8'"); if (isset($_POST['submit'])) { $id_std = $_POST['num_std']; $full_name = $_POST['name_std']; $dept_std = $_POST['dept']; $email_STD = $_POST['email_STD']; $pass = $_POST['Pass']; $group = $_POST['group_ID']; // $id_teah = $_POST['teah']; // if (empty($id_std) or empty($full_name)) { echo "<div style='margin-top:10px;' class='text-center alert alert-danger' role='alert'><h3> الرجاء كتابة بيانات صحيحة </h3></div>"; echo '<meta http-equiv="refresh" content="4;url=student.php" />'; } else { if (filter_var($id_std, FILTER_VALIDATE_INT)) { $sql_std = "SELECT * FROM `student` where `Num_std`='$id_std' AND Name_std='$full_name'"; $query_std = mysqli_query($con, $sql_std); $count_std = mysqli_num_rows($query_std); if ($count_std == 0) { $sql = "INSERT INTO `student`(`Name_std`, `Num_std`, `Email_STD` , `Password`, `dept_ID`, `group_ID`,`id_teah`) VALUES ( '$full_name' , $id_std , '$email_STD' , '$pass' , $dept_std , $group,$id_teah )"; // mysql_query("set character_set_server='utf8'"); // mysql_query("set names 'utf8'"); mysqli_query($con, $sql); echo "<script> Swal.fire({ title: 'رسالة تأكيد', text: 'تم إضافة بيانات الطالب بنجاح!', icon: 'success', customClass: 'rak', }); </script>"; // echo "<div style='margin-top:10px;' class='text-center alert alert-success' role='alert'><h3> تم اضافة الطالب بنجاح </h3></div>"; echo '<meta http-equiv="refresh" content="2;url=student.php" />'; } else { echo "<div style='margin-top:10px;' class='text-center alert alert-danger' role='alert'><h3> هذا الطالب موجود مسبقا </h3></div>"; } //echo $pass; } else { echo "<div style='margin-top:10px;' class='text-center alert alert-danger' role='alert'><h3> يجب ان يكون رقم القيد ارقام وليس حروف </h3></div>"; echo '<meta http-equiv="refresh" content="50;url=student.php" />'; } } } ?> </div> </div> </div> </div> <!--------------------------------------------------------------------------------> <!------------------------------------Footer--------------------------------------> <!--------------------------------------------------------------------------------> <?php include('footer.php'); ?>
  9. لا لا اخي نظام متبع هو انه طالب يضيف مشروع تخرج واحد فقط مشرف يتبع لقسم واحد فقط انا اريد رسمه حسب كلام هدا علاقات هيا يضيف وي يتبع
  10. نظام متبع اخي خالد هو طالب لديه مشروع فقط مشرف يتبع لقسم فقط مشرف يشرف علي أكثر من طالب طالب يشرف عليه مشرف فقط ممكن توضيح كيف تكون علاقة من جهة ومن جهة اخري يعني اين اضع واحد واين اضع m
  11. انا اخي طه اريد رسم مخطط علاقات كيانات نظام وليس عمل صلاحيات اريد فقط هل علاقات صحيحة التي في صورة اول لا توصيل سهم بينهم او واحد او m علي سبيل مثال هدا اريد رسمه
  12. هناك ثلاث أنواع للعلاقات بين الكينونات وهي: علاقة واحد إلي واحد تعني ان سجل في كيان قد يرتبط بسجل واحد لا أكثر في كيان أخر. علاقة واحد الي عديد يكون سجل من كيان قد يرتبط بسجل واحد أو أكثر في كيان اخر . علاقة عديد الي عديد تشير هذه العلاقة إلى عدة سجلات في كيان قد ترتبط بعدة سجلات في كيان أخر. في حالة لدي 4 كيانات وهي كالتالي الطالب المشرف القسم المشاريع الطالب يضيف المشاريع الطالب يتبع القسم المشرف يتبع للقسم هل صحيح علاقات التي في الصورة ياريت توضيح اخواني الكرام
  13. الله يرحم والديك كيف اعمل خط فاصل داخل جدول بين صفوف واعمدة وكيف اظهر كلام مكتوب داخل select في طباعة
×
×
  • أضف...