Thank you so much ;-)
- Original Message -
From: Fred van Engen [EMAIL PROTECTED]
To: Robson Oliveira [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 2:30 PM
Subject: Re: Can't send Register ID
Hi,
On Sun, Jun 08, 2003 at 01:53:24PM -0300, Robson Oliveira wrote:
I'm trying to send a e-mail with the record register ID from a PHP code
query and don't show the value.
// Connect to database
$db = mysql_connect (localhost, my_db, passxx);
$db = mysql_connect (localhost, my_db, passxx);
if (!$db) {
print 'mysql_connect error: '.mysql_error();
}
else {
// Select the database
mysql_select_db(my_db, $db);
if (!mysql_select_db(my_db, $db)) {
print 'mysql_select_db error: '.mysql_error();
}
else {
// Select user registration ID from the database based on the last record
string $ssecurity_record from the registration page.
$register_id = mysql_query( SELECT register_id from table_register WHERE
$ssecurity_record = ssecurity_record;
Are you sure it gets this far? Your line above won't compile because of
a missing and a missing ).
$result = mysql_query( SELECT register_id from table_register WHERE
$ssecurity_record = ssecurity_record );
if (!result) {
print 'mysql_query error: '.mysql_error();
}
else {
$row = mysql_fetch_row($result);
if (!row) {
print 'mysql_fetch_row: no row, error: '.mysql_error();
}
else {
$register_id = $row['register_id'];
echo $register_id = At this time the value is blank when I print the value
}
}
}
}
Please, If someone know how to print the record value and Select function in
php send to me.
Read the manual, check return values, etc. If you're running PHP in
apache, then check the error_log and use the error_log() function
instead of print as I use in the code above.
My code above is untested BTW.
Regards,
Fred.
--
Fred van Engen XB Networks B.V.
email: [EMAIL PROTECTED]Televisieweg 2
tel: +31 36 5462400 1322 AC Almere
fax: +31 36 5462424 The Netherlands
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]