Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

618 profile views

maviyazilim's Achievements

Regular Member

Regular Member (3/5)



  1. Thank you. I will try your solutions. As far as I understand, if I use musqli, if there are characters in the content I add that will break the sql code, the code is broken. there is no solution for this in php. I need to learn SQL. do i understand the problem correctly?
  2. I am constantly adding content. finally someone gave this error. Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'e Katland─▒','1111111','admin')' at line 2 in C:\xampp\htdocs\xxxx\yonet\ekle.php:17 Stack trace: #0 C:\xampp\htdocs\xxxx\yonet\ekle.php(17): mysqli_query(Object(mysqli), 'insert into ice...') #1 {main} thrown in C:\xampp\htdocs\xxxx\yonet\ekle.php on line 17 line 17 -> $sonuc = mysqli_query($veri,$ekle);
  3. haeder is not working. redirect is not working. white page appears. It does not go to the admin.php page. When I print the variables with echo, the data from the form page appears to be on the page. What I don't understand is if this code is faulty, shouldn't it work all the time? sometimes it works fine. sometimes it doesn't work.
  4. Isn't there a solution for this inside the mysqli method? Is there a way to get around the sql special character issue?
  5. ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); I added these codes. It didn't give any error messages. but it uploaded content. After uploading 4-5 pieces of content, it gave the same error again. Interestingly, the codes work. doesn't work after a while.
  6. I have a file with a form. When I say add information here, it goes to the php file to be added. The problem was that while adding content to the database, it suddenly stopped adding content. Sometimes it adds, sometimes it doesn't. Why would it give such an error? <?php session_start(); include '../ayar/baglan.php'; if(isset($_POST['ekle'])) { $baslik = $_POST['baslik']; $icerik = $_POST['icerikici']; $yazar = $_POST['yazar']; $ekle = "insert into icerik (baslik,icerik,yazar) values ('$baslik','$icerik','$yazar')"; $sonuc = mysqli_query($veri,$ekle); } if($sonuc) { header("location:yonetim.php"); } ?>
  7. Problem solved. Thanks for your help.
  8. I changed the code as follows. if($_SERVER[REQUEST_METHOD] === 'POST') { This error code appears on the screen. Fatal error: Uncaught Error: Undefined constant "REQUEST_METHOD" in C:\xampp\htdocs\xxxx\login_check.php:14 Stack trace: #0 {main} thrown in C:\xampp\htdocs\xxxx\login_check.php on line 14
  9. The result has not changed. It keeps giving the same error.
  10. Fatal error: Uncaught Error: Undefined constant "REQUEST_METHOD" in C:\xampp\htdocs\xxxx\login_check.php:14 Stack trace: #0 {main} thrown in C:\xampp\htdocs\xxxx\login_check.php on line 14 on line 14 -> if($_SERVER[REQUEST_METHOD]==POST) { Why am I getting this error? what is the problem?
  11. The code structure given by Barand worked. It was a structure that I did not understand. I thanked you for your help. ginerjm the code you gave didn't work. but it was very close to what I knew and did. I worked on it and made it work. ginerjm, I have 2 solutions. So I chose yours, the way I know. is this an error? Thank you to all those who helped. link problem solved. but my problem is that when I click on the link, I cannot capture the content_id number that I sent with the post method on the page I go to and print the relevant content on the screen. The problem has become a different matter. So instead of starting a new thread, I continued here. thank you to everyone.
  12. I want to learn by solving the problems in the code structure that I know a little bit. I don't understand the code structure that I don't know at all anyway. How can I do what I don't know at all, while I get an error in the structure when I know a little. As I learn, I look at structures that I do not know in the future. I want to solve them for now.
  13. Barand. thank you so much. I tried the code you gave and it worked. but I've never seen it written that way before. so i can't use it.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.