Jump to content

maviyazilim

Members
  • Posts

    51
  • Joined

  • Last visited

Recent Profile Visitors

531 profile views

maviyazilim's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. Problem solved. Thanks for your help.
  2. 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
  3. The result has not changed. It keeps giving the same error.
  4. 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?
  5. 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.
  6. 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.
  7. 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.
  8. ginerjm good quotes: echo "<a href='icerik.php?icerik" . $goster['icerik_id'] . '''>" . $goster['baslik'] . '</a>'; I implemented this code. gave an error. I changed it as below. echo '<a href="icerik.php?icerik' . $goster['icerik_id'] . '">' . $goster['baslik'] . '</a>'; It works as a link. I reach the file named contentik.php. In the link it says: https://localhost/blog/icerik.php?icerik22 It works but gives an error message. Warning: Undefined variable $goster in C:\xampp\htdocs\blog\orta.php on line 35 Warning: Trying to access array offset on value of type null in C:\xampp\htdocs\blog\orta.php on line 35 Warning: Undefined array key "" in C:\xampp\htdocs\blog\orta.php on line 35 35 line - $giden = $_POST[$goster['icerik_id']]; When I access the file named contentik.php I get errors. icerik.php -> <?php $gelenid = $_POST['icerik_id']; $sorgula = mysqli_fetch_array(mysqli_query($conn,"select * from icerik where icerik_id='$gelenid'")); echo '<div id="icerik">'; echo '<div id="baslik">' . $row['baslik'] . '</div>'; echo '<div id="yazi">' . $row['yazi'] . '</div>'; echo '<div id="yazar">' . $row['yazar'] . '</div>'; echo '</div>'; Here are the errors received. Warning: Undefined array key "icerik_id" in C:\xampp\htdocs\blog\icerik.php on line 19 Warning: Undefined variable $row in C:\xampp\htdocs\blog\icerik.php on line 25 Warning: Trying to access array offset on value of type null in C:\xampp\htdocs\blog\icerik.php on line 25 Warning: Undefined variable $row in C:\xampp\htdocs\blog\icerik.php on line 26 Warning: Trying to access array offset on value of type null in C:\xampp\htdocs\blog\icerik.php on line 26 Warning: Undefined variable $row in C:\xampp\htdocs\blog\icerik.php on line 27 Warning: Trying to access array offset on value of type null in C:\xampp\htdocs\blog\icerik.php on line 27 line 19 - $gelenid = $_POST['icerik_id']; line 25 - echo '<div id="baslik">' . $row['baslik'] . '</div>' line 26 - echo '<div id="yazi">' . $row['yazi'] . '</div>'; line 27 - echo '<div id="yazar">' . $row['yazar'] . '</div>';
  9. I want to create a link to the content listed on the homepage and show the content on another page. I am getting an error like this. I am trying to post to file named icerik.php with post method. Parse error: syntax error, unexpected string content "", expecting "-" or identifier or variable or number in on line 39 39 - echo '<a href='icerik.php?=icerik' . $goster['icerik_id'] . ''>' . $goster['baslik'] . '</a>'; $giden = $_POST['icerik_id']; while($goster=mysqli_fetch_assoc($result)) { echo '<div id="konu">'; echo '<div id="baslik">'; echo '<a href='icerik.php?=icerik' . $goster['icerik_id'] . ''>' . $goster['baslik'] . '</a>'; echo '</div>'; echo '<div id="yazi">'; echo substr($goster['yazi'],0,300); echo '</div>'; echo '<div id="yazar">'; echo $goster['yazar']; echo '</div>'; echo '</div>'; }
  10. ginerjm google translate did not translate. google translate did not translate. What is IMHO What is IMO
  11. ginerjm If I manage to learn mysqli, I will learn pdo. thanks for advice. I've read over 20 video lessons for the simplest pagination at the moment. I've been dealing with it for a week or more. I just now solved it. I'm just trying to learn because I have interest and curiosity. I did not receive any school or training related to software. The fact that it was so difficult and challenging for a pagination made me very hard. If I manage to learn php, I try to learn pdo.
  12. ginerjm. thanks. problem solved. Barand and ginerjm. thank you both so much
×
×
  • 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.