![]() |
Pass variable from page to page
Can anyone please tell me how should i pass the variable from login.php to display.php ? In my system, when users input their username, their display image will be shown in next page. but i just can't figure out how do i pass the input username from login.php to display.php although i read so many online solving. Can anyone please help or give me some hints perhaps ? Thank you so much for spending time to help me ^^
login.php PHP Code:
PHP Code:
Code:
Notice: Undefined index: username in C:\xampp\htdocs\MyProject3\display.php on line 5 |
i know i should use $_SESSION and $_POST , $_GET, $_REQUEST for cookie and so on, but i just can't figure it out how it actually works ~
|
PHP Code:
PHP Code:
PHP Code:
PHP Code:
IF you are not sure, check the docs, including the comments. |
Quote:
Thank you so much for helping. It finally pass the variable. but, there is another problem which the image just doesn't get displayed. Is it because my query error ? or this line got error ? PHP Code:
I tried the sample code below, it can work but not with my code... PHP Code:
|
I haven't done this before myself, but is the image stored as a BLOB in the database? Is the MIME-type (image/jpg) correct? Try image/jpeg - this is what I should be I believe.
Quote:
|
| All times are GMT +1. The time now is 10:35 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.