+ 2

Phpmyadmin and database

I am making a localhost server and I have completed login and registeration part now I want that after successful login on another page it show/get the username of current user stored in localhost database . Please help.. Thanks in advance.

31st Aug 2018, 7:49 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
8 Answers
+ 1
🅰🅺🆂🅷🅰🆈, Currently i am personally using the following: (so it should work like all the previous codes, if you had take a look at the link i provided you get more knowledge then just looking at the code) rows:id, clicks, like, dislike $aVar = mysqli_connect("data to connect"); $like2chainz = mysqli_fetch_assoc(mysqli_query($aVar, "SELECT * FROM likes WHERE id='1'")); $dislike2chainz = mysqli_fetch_assoc(mysqli_query($aVar, "SELECT * FROM likes WHERE id='2'")); $dislike2chainz[clicks] $like2chainz[clicks]
31st Aug 2018, 10:16 AM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar
+ 1
31st Aug 2018, 9:51 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 1
🌴Vincent Berger🌴 can you send a example
31st Aug 2018, 10:07 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
0
Hi 🅰🅺🆂🅷🅰🆈, SELECT columnnames FROM tablename Or select all from table: SELECT * FROM tablename E.G.: $callBack = "SELECT id, username FROM Users"; $display = mysql_fetch_assoc($callBack); <?php echo $display[user]; ?> Additional: https://www.w3schools.com/php/php_mysql_select.asp
31st Aug 2018, 8:39 AM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar
0
🌴Vincent Berger🌴 not working. See, Like my database has id, username, email and password columns. User login with email and password. and i want that after the login of particular user it shows the username of that particular logged in user.
31st Aug 2018, 9:12 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
0
$callBack = "SELECT id, username FROM Users WHERE id='1'; <?php echo $callBack[user]; ?> WHERE id is assiocated with your specific username,
31st Aug 2018, 9:26 AM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar
0
🅰🅺🆂🅷🅰🆈, this should work. $aVar = mysqli_connect(your data to connent to mqsql); $call = mysqli_fetch_assoc(mysqli_query($aVar, "SELECT * FROM users WHERE id='1'")); echo $call[username row title];
31st Aug 2018, 10:05 AM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar
0
کس ننت
1st Sep 2018, 8:10 PM
《MAMA. Soccer》
《MAMA. Soccer》 - avatar