[FX.php List] else
Jonathan Schwartz
jonathan at eschwartz.com
Wed Jun 14 23:53:35 MDT 2006
Hi Dale,
Good suggestion....but that didn't do it.
Here's the whole page. I had a heck of a time trying to decide where
the second "}" to end the embedded if statement... the one with the
double "&&".
In short, there's a test to make sure that an phone number arrived
from the POST form.
Then, there's the test for finding a single record (that's good) and
the subsequent test to make sure that there in an email address in
one of the two email fields. This is the one that is failing. I am
getting the "detaillost.php" page displaying instead of the desired
error: A problem was encountered: No email addresses are associated
with this record....."
The last two tests handle if either O records were found (not good)
or multiple records were found (yikes!).
Sure would like to figure this one out. I'm trying hard to shed my
beginner skin,
J
<head>
<link href="web_style.css" rel="stylesheet" type="text/css">
</head>
<?php
include ("FX/FX.php");
include ("FX/server_data.php");
include ("session_handler.php");
$searchData = array_keys($_REQUEST);
$phone1=$_GET['phone1'];
$query = new FX($ServerIP, $dataPort, $dataSourceType, $scheme);
$query->SetDBData ('families.fp7','web0');
$query->SetDBPassword ($webPW, $webUN);
$query->AddDBParam ('phone1', $_POST['phone1'], 'eq');
#$query->AddDBParam ('phone2', $_POST['phone1'], 'eq');
#$query->AddDBParam ('password', $password, 'eq');
$findResult = $query->FMFind();
if ($_POST[phone1] == "") {
$msg= 'Please fill in phone number.';
include_once ("loginlostpassword.php");
exit;
} else { $msg =" ";
}
if ($findResult['foundCount'] == 1) {
$recID=current($findResult['data']);
$internal=explode('.',key($findResult['data']));
$internalRecID=$internal[0];
if ($findResult['email1isempty'][0] == "1" &&
$findResult['email2isempty'][0] == "1") {
$msg = "A problem was encountered:
No email addresses are associated with this record. Please
contact us for assistance.";
include_once ("loginlostpassword.php");
exit;
}else{
$msg = " ";
include_once ("includes/header.php");
include_once("detaillost.php");
exit;
}
} else {
if ($findResult['foundCount'] > 1) {
$msg = "A problem was encountered: Duplicate records with the
same phone number were found. Please contact us for assistance.";
include ("loginlostpassword.php");
} else {
$msg = "Your phone number was not found. Please try again.";
include ("loginlostpassword.php");
}
}
?>
--
Jonathan
More information about the FX.php_List
mailing list