this is the index page
<?php
if (isset ($_POST['keywords'])){
$keywords =mysql_real_escape_string(htmlspecialchars(trim($_POST['keywords'])));
$keywords =$_POST['keywords'];
$errors = array ();
if (empty ($keywords)){
$errors[] = ('Please enter a serch terms');
}else if (strlen($keywords)<3){
$errors[] = ('Your search terms must be three or more characters');
}else if (search_results ($keywords) == false){
$errors []= ('Your search for '.$keywords.' returned no results');
}
if(empty($errors)) {
$results=search_results ($keywords);
$results_num = count ($results);
echo '<p>Your search for <strong>',$keywords,'</strong>returned <strong>',$results_num,'</strong>results</p>';
}else {
foreach ($errors as $error){
echo $error,'</br>';
}
}
}
?>
andyy121 -9 Junior Poster
andyy121 -9 Junior Poster
andyy121 -9 Junior Poster
andyy121 -9 Junior Poster
LastMitch
andyy121 commented: thank you for responding to my problem +0
andyy121 -9 Junior Poster
pritaeas 2,194 ¯\_(ツ)_/¯ Moderator Featured Poster
andyy121 -9 Junior Poster
andyy121 -9 Junior Poster
pritaeas 2,194 ¯\_(ツ)_/¯ Moderator Featured Poster
andyy121 -9 Junior Poster
LastMitch
andyy121 -9 Junior Poster
happygeek commented: nobody will help you with that attitude -2
LastMitch
pritaeas 2,194 ¯\_(ツ)_/¯ Moderator Featured Poster
andyy121 -9 Junior Poster
LastMitch
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.