Forum Moderators: coopster

Message Too Old, No Replies

Output single field single row query to php page

         

psycodad

5:45 pm on Oct 14, 2024 (gmt 0)



I am new to php and am trying to learn how to output the result of a query that returns a single field single row to a textbox or simply display on the page itself. Can someone please help me with this please? I have tried and tried but am not getting any closer. I would greatly appreciate it and I thank you in advance. Here is my query: SELECT `fname` FROM `employee` WHERE `id` = '2'

psycodad

8:30 pm on Oct 14, 2024 (gmt 0)



Well I was able to figure both of them out finally. Strange I been working on that for days and when I reach out for help I finally figure it out. Ain't that a blip you guys must have magical powers. Thank you guys for your help.

not2easy

1:44 pm on Oct 15, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hi psycodad and welcome to WebmasterWorld [webmasterworld.com]

Two things might have helped in resolving the issue - usually code should be enclosed within code tags so the pertinent question can be quickly spotted and the question understood. There's a very old thread here (linked in the Charter) that explains how and why to include the code in question: [webmasterworld.com...]

And since we're here to help others with similar questions find answers, sharing your fix (code) is how we help others. Fixing your code without sharing your fix leaves others to wonder what you did to fix it and leaves nothing useful for others. It also means that there might be a better fix and you missed it.

That Welcome link above offers tips on using the forums' features and settings, and once more - Welcome to WebmasterWorld!

PS: on weekends and holidays, folks are often out doing other things, it can take more than a few hours for capable help to spot your post ;)