|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: |
<?php
// rows to return
$limit=10;
//connect to your database ** EDIT REQUIRED HERE **
mysql_connect("host","username","password"); //(host, username, password)
//specify database ** EDIT REQUIRED HERE **
mysql_select_db("test3") or die("Unable to select database"); //select which database we're using
// Get the search variable from URL
$var = @$_GET['search'];
$trimmed = trim($var); //trim whitespace from the stored variable
if ($trimmed) {
// Build SQL Query
$sql_query = "SELECT * FROM nbs_contacts JOIN nbs_events ON nbs_events.nbs_contact_id = nbs_contacts.nbs_contact_id AND nbs_contact_sur LIKE \"%$trimmed%\" OR nbs_zip LIKE \"%$trimmed%\" ";
}
// EDIT HERE and specify your table and field names for the SQL query
$result = mysql_query($sql_query) or die(mysql_error());
$check2 = mysql_num_rows($result);
if ($check2 == 0) {
echo "<SCRIPT>\n" .
" alert('Contact bestaat niet, controlleer of uw goed heeft ingevoerd, eventueel voert u een nieuw contact in.');\n" .
" location.href('index.php');\n" .
"</SCRIPT>";
}
else if ($check2 > 1) {
echo '<hr>';
echo '<Table>';
// now you can display the results returned
$row = mysql_fetch_array($result);
echo '<tr>';
echo '<td>'.$row['nbs_contact_id'].'</td>';
echo '<td>'.$row['nbs_contact_aanhef'].'</td>';
echo '<td>'.$row['nbs_contact_prechar'].'</td>';
echo '<td>'.$row['nbs_contact_name'].'</td>';
echo '<td>'.$row['nbs_contact_tussenv'].'</td>';
echo '<td>'.$row['nbs_contact_sur'].'</td>';
echo '<td>'.$row['nbs_address'].'</td>';
echo '<td>'.$row['nbs_number'].'</td>';
echo '<td>'.$row['nbs_zip'].'</td>';
echo '<td>'.$row['nbs_city'].'</td>';
echo '<td>'.$row['nbs_phone'].'</td>';
echo '<td><a href="index.php?id=edit&search='.$row['nbs_contact_sur'].' " title="Selecteer contact om te bekijken/bewerken.">Selecteer</a></td>';
echo '<td><a href="" title="Klik om deze contact te verwijderen.">Verwijder</a></td>';
echo '</tr>';
echo '</Table>';
}
?>
|
Advertisement
| Hall of Fame |