Jump to content

maviyazilim

Members
  • Posts

    77
  • Joined

  • Last visited

Recent Profile Visitors

43,793 profile views

maviyazilim's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. Thank you. After deleting the code from the problematic page, the code showing the username worked. now i can see the logged in user on the screen.
  2. There is no other file than 3 files. there is a file. it is the file to which the database connection is made. it is added to the page with require_once in that file. There is no problem with the database connection. In the advice given, they said read the data. When I check whether there is data or not, it shows blank. already here is the problem. Why is there no data? why data does not reach this page?
  3. no. I shared all the files related to the error in my messages. this is the file i got error
  4. https://forum.gizmola.com/pastebin/?51c9333ee96588e0#Hm9qCC27QMkJQ63cEnH4dJg1vhTqLH8Tk9CbCdMwkwBq
  5. I removed the session code in mypage.php. all errors are gone. but it doesn't show the username on the screen. the code is not working. This is the reason why this code is on this page. I want to show the name of the person who logged into that page on the screen. but it doesn't. I translate your answers using google translate. My goal is to show the login person's name(nickname) on the screen. but it doesn't. as an error (Warning: Undefined array key "nik" in)
  6. If I remove that code the error goes away. but this time how do i show the login person's name from the screen
  7. There is no html output on the baglan.php page. I did what you said though. it gave the following error code. Notice: session_start(): Ignoring session_start() because a session is already active in C:\xampp\htdocs\a\kaynak\baglan.php on line 9
  8. when i do this, this is the result on the screen. Warning: Undefined array key "nik" in C:\xampp\htdocs\a\sayfam.php on line 5 Array ( [nik] => )
  9. thank you for the answer. I did not understand what to do. I didn't understand part of your post at all. anyway thanks for your time
  10. I do not understand what you mean. filenames are different. I just numbered the files to indicate the order of operations. The operation is taking place on the denetim.php page. I am getting the latest file. I can't type the username on the screen.
  11. this is my first file. <?php require_once 'kaynak/baglan.php'; session_start(); $_SESSION['nik'] = $_POST['nik']; ?> <!DOCTYPE html> <html lang="tr"> <head> <title>Giriş sayfası - Hoşgeldiniz</title> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="kaynak/style.css"> </head> <body> <div id="ana"> <h1>Üye giriş sayfasına hoşgeldiniz</h1><br> <form action="denetim.php" method="post"> <label>Kullanıcı adını giriniz. </label><br> <input type="text" name="nik"><br><br> <label>Şifrenizi giriniz. </label><br> <input type="password" name="sifre"><br><br> <input type="submit" value="Giriş yap"> </form> </div> </body> </html> this is my second file. <?php require_once('kaynak/baglan.php'); session_start(); $_SESSION['nik'] = $_POST['nik']; $nik = $_POST['nik']; $sifre = $_POST['sifre']; $sorgu = "select * from uyeler where kadi = '$nik' and sifre = '$sifre' "; $sonuc = $baglan->query($sorgu); if ($sonuc) { header("Location:sayfam.php"); } ?> this is my third file. I can't print the username on the screen. <?php require_once('kaynak/baglan.php'); session_start(); echo '<pre>' . print_r($_SESSION, true) . '</pre>'; ?> <!DOCTYPE html> <html lang="tr"> <head> <title>Sayfanız - Hoşgeldiniz</title> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="kaynak/style.css"> </head> <body> <div id="ana"> <h1><?php echo $_SESSION['nik']; ?>Üye giriş sayfasına hoşgeldiniz</h1><br> </div> </body> </html>
  12. Array ( [nik] => )
  13. the error code is gone from the screen. but the user's name is not written on the screen. echo inside h1 tag not working
  14. what should I do.
  15. If it doesn't send any data, how do I get it to send? I want to print the name of the logged in person on the screen.
×
×
  • 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.