-1

can anyone help me on how to retrieve data in database and display it in html text box when button is clicked? much appreciated thank you!

Load data from MySQL database to HTML textboxes on button click

already tried this but I get an error. it said that undefined variable savedname

8
  • stackoverflow.com/questions/11273234/… Commented Sep 27, 2018 at 5:53
  • Possible duplicate of Load data from MySQL database to HTML textboxes on button click Commented Sep 27, 2018 at 5:57
  • I'm getting an error, it said that undefined variable savedname Commented Sep 27, 2018 at 5:59
  • Are you using mysql or mysqli? Commented Sep 27, 2018 at 6:01
  • "already tried this" Then please post what you already have. "but I get an error" And again, please post what error you get. Thanks Commented Sep 27, 2018 at 6:02

1 Answer 1

0

Please use <?=isset($savedName)?$savedName:"";?> from <? echo $savedName; ?>. Please use isset function in all php var use.

Sign up to request clarification or add additional context in comments.

7 Comments

the error was gone, but it didn't display the data whenever i click the button.
image upload in any server and send me link in comment.
to the 1st if statement or 2nd if statement?
Parse error: syntax error, unexpected 'if' (T_IF) in C:\xampp\htdocs\oxychem\inventory\modules\addnewitems.php on line 372
not any changes only 'generate' to 'Generate' in if condition
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.