Jump to content

Making MySQL field a variable


elmas156

Recommended Posts

Ok, before anyone says anything... i know that I posted this in the MySQL help section but then I thought... "Is this really a MySQL question or is it a PHP question because my goal is to actually make info from a MySQL field into a variable?"  Anyway, here is my question:  I'm trying to select from a MySQL database a certain piece of information and display it on the page.  For example: After a user has signed up and logged in to the website, I want to select "firstname" from "usertable" where "email" = $email.  The problem I'm having is trying to make "firstname" into a variable so that I can display it on the page to say something like: "Welcome $firstname".  I've gone over the database tutorial on here but I didn't see anywhere that it covered taking a single field from a table and turning it into a variable.  Any suggestions?  Thanks for your help.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.