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

Moath Hijazi

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

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

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

آخر الزوار

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

إنجازات Moath Hijazi

عضو مبتدئ

عضو مبتدئ (1/3)

10

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

  1. مع العلم اني لا املك اجهزة اخرى قمت بالتسجيل منها
  2. A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced. To fix this issue, replace the usage of navigator.userAgent, navigator.appVersion, and navigator.platform with feature detection, progressive enhancement, or migrate to navigator.userAgentData. Note that for performance reasons, only the first access to one of the properties is shown. how to fix this issue
  3. كيف اخبر ال PHP في حال زادت الصفوف في قاعدة البيانات افعل الآتي ؟
  4. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="./css/bootstrap.css"> <title>bootstrap</title> </head> <body> <div class="container "> <div class = "row"> <div >test</div> <div >test1</div> <div>test2</div> <div>test3</div> <div >test4</div> </div> </div> <script src="./js/popper.min.js"></script> <script src="./js/jquery-3.6.0.min.js"></script> <script src="./js/bootstrap.js"></script> </body> </html> output : test test1 test2 test3 test4 لماذا كلاس 'row' لا يعمل ؟
  5. <body> <div class="box"> <form action="" method="POST" enctype="multipart/form-data"> <h3>add new product</h3> <input type="text" class="box" required placeholder="enter product name" name="name"> <input type="number" min="0" class="box" required placeholder="enter product price" name="price"> <textarea name="details" class="box" required placeholder="enter product details" cols="30" rows="10"></textarea> <input type="file" accept="image/jpg, image/jpeg, image/png" required class="box" name="image"> <input type="submit" value="add product" name="sub" class="btn"> </form> </div> </body> </html> <?php if(isset($_POST['sub'])){ $name = mysqli_real_escape_string($conn, $_POST['name']); $price = mysqli_real_escape_string($conn, $_POST['price']); $details = mysqli_real_escape_string($conn, $_POST['details']); $image = $_FILES['image']['name']; $image_size = $_FILES['image']['size']; $image_tmp_name = $_FILES['image']['tmp_name']; $image_folter = 'uploaded_img/'.$image; $select_product_name = mysqli_query($conn, "SELECT name FROM `p` WHERE name = '$name'") or die('query failed'); if(mysqli_num_rows($select_product_name) > 0){ $message[] = 'product name already exist!'; }else{ $insert_product = mysqli_query($conn, "INSERT INTO `p`(name, details, price, image) VALUES('$name', '$details', '$price', '$image')") or die('query failed'); if($insert_product){ if($image_size > 2000000){ $message[] = 'image size is too large!'; }else{ move_uploaded_file($image_tmp_name, $image_folter); $message[] = 'product added successfully!'; } } } } output : Notice: Undefined index: name in C:\xampp\htdocs\server\test to fix my problems\index.php on line 29 Notice: Undefined index: price in C:\xampp\htdocs\server\test to fix my problems\index.php on line 30 Notice: Undefined index: details in C:\xampp\htdocs\server\test to fix my problems\index.php on line 31 Notice: Undefined index: image in C:\xampp\htdocs\server\test to fix my problems\index.php on line 32 Notice: Undefined index: image in C:\xampp\htdocs\server\test to fix my problems\index.php on line 33 Notice: Undefined index: image in C:\xampp\htdocs\server\test to fix my problems\index.php on line 34
  6. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>register</title> </head> <body> <div class="box"> <form method="post" > <h3>register</h3> <input type="text" name="name" id="" placeholder = " enter your name"> <input type="email" name="email" id="" placeholder = " enter your email"> <input type="password" name="password" id="" placeholder = " enter your password"> <input type="password" name="password_re" id="" placeholder = " enter your password again"> <input type="submit" name="btn" value = "register" id="btn"> <p> Already Have An Account ? <a href="login.php">login</a> </p> </form> </div> </body> </html> <!-- include style rel --> <?php include 'conf.php' ; ?> <!-- include ended --> <?php if(isset($_POST['btn'])){ $name = mysqli_real_escape_sting($conn , $_POST['name']) ; $email = mysqli_real_escape_sting($conn , $_POST['email']) ; $password = mysqli_real_escape_sting($conn , $_POST['password']) ; $pass = mysqli_real_escape_sting($conn , $_POST['password_re']) ; if($password == $pass){ $select = mysqli_query($conn , "SELECT * FROM `u` WHERE email = '$email '") or die ("select failed"); if(mysqli_num_rows($select) > 0 ){ echo '<span class = `msg`>this user already exist</span>'; }else{ $insert = mysqli_query($conn , "INSERT INTO u (name, email ,password ) VALUES ('$name', '$email', '$password')")or die("insert failed"); } }else{ echo '<span class = `msg`>password not matched</span>'; } } ?> output : Fatal error: Uncaught Error: Call to undefined function mysqli_real_escape_sting() in C:\xampp\htdocs\server\ahmed\register.php:37 Stack trace: #0 {main} thrown inC:\xampp\htdocs\server\ahmed\register.phpon line37
×
×
  • أضف...