Retreive email address from MySQL DB

From: Date: Wed, 08 Jan 2003 04:08:02 +0000
Subject: Retreive email address from MySQL DB
Groups: php.db 
Request: Send a blank email to php-db+get-24639@lists.php.net to get a copy of this message
I have a database: web_feedback, and it has 5 columns: Firstname varchar(40) not null Lastname varchar(40) not null Email varchar(40) PRIMARY KEY not null ServList varchar(40) not null Timestamp not null I run a query in a PHP script to retrieve the email address the line of code looks like this: $query_time = mysql_query("select time from DB where email='$email'"); This line returns RESOURCE ID #2 in $query_time when I use it to echo it's value in an email message: $mailcontent = $firstname." ".$lastname." has submitted info as follows: \n". "First Name: ".$firstname."\n". "Last Name: ".$lastname."\n". "email: ".$email."\n". "Selected Services: ".$servList."\n". "Time entered: ".$query_time."\n"; Anyone able to see off hand if I'm doing anything obviously wrong? /T

« previous php.db (#24639) next »