What is my Mistake?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Dear List -

I know I have a mistake here, but I cannot find it.

This is a part of a switch.

The switch is fed with a formatted phone number [123-456-7890], which is then tested for validity, and if valid the results of the query are displayed. I cannot get to the display part.

Here is the code:

								case 'step28':
									echo "here we are, step 28";

									$phn = $_POST['phone'];
									$phn = (string)$phn;
									$dsh = '-';
$Phn = $phn[0].$phn[1].$phn[2].$dsh.$phn[3].$phn[4].$phn[5].$dsh.$phn[6].$phn[7].$phn[8].$phn[9]; $sql1 ="select Cust_Num, Lname, Fname from Customers where Phone = '$Phn' ";
									echo $sql1;
									$result1 = mysqli_query($cxn, $sql1);
									echo 'here2';									
									if ( 0 === $result1->num_rows )
										<div align="center">

										<strong>No Match Found</strong>
										<br /><br />
									echo 'here3'; //stops at this point .................
									echo "<br />result.....  $result1";
									$result = 0;
									<div align="center">
<table border="4" cellpadding="5" cellspacing="55" rules="all" frame="box">
									<tr class='heading'>
									<th>Last Name</th>
									<th>First Name</th>

									while($row1 = mysqli_fetch_row($result1))
										$Cust_Num  = $row1[0];
										$Lname     = $row1[1];
										$Fname     = $row1[2];

										<td> <?php echo $Cust_Num; ?> </td>
										<td> <?php echo $Lname; ?> </td>
										<td> <?php echo $Fname; ?> </td>




PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux