File manager - Edit - /home/autoph/public_html/connect/home/save_new_directory_contact.php
Back
<?php include 'core/init.php'; error_reporting(0); //if submit/ save to databasevar if(isset($_POST['done'])){ $myPosition = mysql_real_escape_string($_POST['myPosition']); $emailAdd = mysql_real_escape_string($_POST['emailAdd']); $sMobile = mysql_real_escape_string($_POST['sMobile']); $pMobile = mysql_real_escape_string($_POST['pMobile']); $myBrand = mysql_real_escape_string($_POST['myBrand']); $empName = mysql_real_escape_string($_POST['empName']); $activeBrand = mysql_real_escape_string($_POST['activeBrand']); mysql_query("INSERT INTO telephone_directory (u_name, mobile_a, mobile_b, brand_name, e_mail, position) VALUES('{$empName}','{$pMobile}','{$sMobile}','{$myBrand}','{$emailAdd}','{$myPosition}')"); //UPDATE CHECK-OUT REASON TABLE TO INCLUDE DEALER IN SELECTION DURING GUARD CHECK-OUT } //display from database //if(isset($_POST['display'])){ //$activeBrand = mysql_escape_string($_POST['activeBrand']); $result = mysql_query("SELECT * FROM telephone_directory WHERE `brand_name`='$activeBrand' ORDER BY `brand_name` DESC"); echo "<table style='width:100%;'>"; echo "<thead> <tr> <th>BRAND</th> <th>NAME</th> <th>PRIMARY MOBILE</th> <th>SECONDARY MOBILE</th> <th>E-MAIL</th> <th>POSITION</th> </tr> </thead>"; while($row=mysql_fetch_array($result)){ echo "<tr>"; echo "<td>".$row['brand_name']."</td>"; echo "<td>".$row['u_name']."</td>"; echo "<td>".$row['mobile_a']."</td>"; echo "<td>".$row['mobile_b']."</td>"; echo "<td>".$row['e_mail']."</td>"; echo "<td>".$row['position']."</td>"; echo "</tr>"; } echo "</table>"; exit(); //} ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0.12 |
proxy
|
phpinfo
|
Settings