Jump to content

h4r00n

Members
  • Posts

    80
  • Joined

  • Last visited

    Never

Posts posted by h4r00n

  1. Hi,

     

    I would like to get some feedback on my site and how to improve. Still have a few things to do here and there. Bare in mind that I have no previous experience whatsoever in web design, I have a social work background! Is it displayed properly in your browser? http//:www.jobjar.co.uk

     

    Kind Regards

  2. Hi,

     

    I have a problem accessing the search.php form from my search page. On my local host, if I create a search in the search form and hit the search button, a new window appears asking whether I want to open or save the search.php file rather than it actually opening up in the browser.

     

    I have also just uploaded it to my host, if you go to http://www.jobjar.co.uk/index.html and hit the search button, you will find that a search.php page opens however there are no results, but in actual fact there should be. Is this related to the issue I also have on my local host with the new window appearing? I have uploaded the files to my cpanel the way it is on my computer.

     

    Kind Regards

     

  3. Hi,

     

    I am currently developing my recruitment website and I have had the logo created. Please find attached my logo. I understand that the J is not clear and the colour scheme does not flow well with my page layout, I would appreciate some feedback?

     

    I was wondering if anybody has a few spare minutues to modifiy the colour scheme in photoshop and improve it, unfortunately I do not have the original file.

     

    Kind Regards

     

    [attachment deleted by admin]

  4. Hi, thanks for the comments. I agree that it doesn't flow too well with my page layout. Unfortunately, the person who developed the logo is no longer available so I cannot get it changed. Would really appreciate it if anyone has a few minutes spare to improve it??

     

    Kind Regards

  5. HI

     

    Thanks for that but the footer is now verticle, I also have a style.css file, will that have anything to do with it?

    #footer {
    	text-align:right;
    	line-height:24px;
    	width:720px;
    	background-color:#dcdcdc;
    	color:#4a4a4a;
    	font-size:12px;
    	padding-right:80px;
    	}
    
    #footer a {color:#4a4a4a;
    		text-decoration:none;
    		}

     

    [attachment deleted by admin]

  6. Hi, I cannot get it to work, maybe because there are more files involved. I have attached the footer file and the configuration file, can you please have a quick look? The online search form I showed you is on somebody's server.

     

    Thanks

     

    [attachment deleted by admin]

  7. Hi, I have a footer in my results page for a search form, the footer operates correctly as in it automatically places itself at the bottom of the page depending on how many results are shown. Like a dynamic footer, but the problem is that the footer is centered and I want it stretched across the width of the page. I have the code below, what can I insert to change it to stretch? I have added a print screen of how my other pages are and I want this footer to be the same as it.

     

    <div id="footer" style="float:right;">
    
    	<span style="font-family: Arial, Helvetica, sans-serif"><a href="">Home</a> | <a href="">About Us</a> | <a href="">Site Mape</a> | <a href="">Terms & Conditions</a> | <a href=""> Contact</a>
    	<br>Copyright 2009 JobJar.co.uk
    
        </span></div>
    </div>
    </body>
    </html>

     

    [attachment deleted by admin]

  8. it's because $results isn't defined yet.

    here's how I would do this

    function getResults($db,$masterQuery){
    $results=False; 
       $query = $db->query($masterQuery);
             //we have a result
          while($row=$db->fetchArray($query)){$results[] = $row;}
          @mysql_free_result($query);
       }
       return $results;
    }
    

    Then you can just check for results on the next page and if it's true do whatever you need to do.

     

    With the above coding, it shows NOTHING FOUND which is good but no results are shown at all. It sticks to NOTHING FOUND.

  9. Hi guys, I have a search form and it is working perfectly, but when a result is not found, it states nothing found but it also shows this message:

     

    Notice: Undefined variable: results in C:\Documents and Settings\My Documents\wamp\www\Pages\search.php on line 282

     

    and line 282 is

    }else{return $results;}

     

    the whole coding for that section is

    function getResults($db,$masterQuery){
    $query = $db->query($masterQuery);
    if(@$db->numRows($query)>0){
    	//we have a result
    	while($row=$db->fetchArray($query)){$results[] = $row;}
    	@mysql_free_result($query);
    	return $results;
    }else{return $results;}

  10. Just clean up the form input tags

     

    e.g.

    $keywords = $_POST['keywords'];

    $keywords = stripslashes($keywords);

    $keywords  = strip_tags($keywords);

    htmlspecialchars(addslashes($_POST[$keywords]));

     

    Can you please show me which parts to change and to change to what?

    I would be ever so grateful...

  11. Hi, I have a search form with php coding, I pretty sure it is exposed to risks and threats. Does anyone have any suggestions as to how I can make it secure? Thanks

     

    <?php
    include('mysql.inc.php');
    include('config.php');
    
    $log="";
    
    
    $db = new dblink($log);
    $db->connect($dbhost,$dbuser,$dbpass);
    if($db->selectDb($dbname) === false){echo "could not connect to database";}
    
    
    
    $boolPerm = false;
    $boolTemp = false;
    $boolPartTime = false;
    $boolFullTime = false;
    $boolSector = false;
    $boolKeywords = false;
    $boolLocation = false;
    $boolRef = false;
    $masterQuery = "";
    $key = "";
    
    
    if(isset($_POST['ref']) && $_POST['ref'] != ""){
    	$boolRef = true;
    	$ref = $_POST['ref'];
    	$ref = "'%".$ref."%'";
    	$masterQuery = "SELECT * FROM jobs WHERE `Job Ref` LIKE ".$ref;
    	$results = getResults($db,$masterQuery);
    		display($results);
    	exit();
    }
    
    
    
    if(isset($_POST['keywords']) && $_POST['keywords'] != ""){
    	$keywords = explode(' ',$_POST['keywords']);
    	foreach($keywords as $keyword){
    		if($keyword !=""){$key .= "`Keywords` LIKE  '%".$keyword."%' AND ";}
    	}
    
    	$keywords = substr($key,0,-4);
    
    	$boolKeywords = true;
    }
    
    
    if(isset($_POST['location']) && $_POST['location'] != ""){
    	$boolLocation = true;
    	$location = $_POST['location'];
    	if($location == "all"){$boolLocation = false;}
    }
    
    
    if(isset($_POST['permanent']) && $_POST['permanent'] != ""){$boolPerm = true;}
    if(isset($_POST['temporary']) && $_POST['temporary'] != ""){$boolTemp = true;}
    if(isset($_POST['parttime']) && $_POST['parttime'] != ""){$boolPartTime = true;}
    if(isset($_POST['fulltime']) && $_POST['fulltime'] != ""){$boolFullTime = true;}
    
    
    if(isset($_POST['sector']) && $_POST['sector'] != ""){
    	$boolSector = true;
    	$sector = $_POST['sector'];
    }
    
    
    
    
    
    
    //jobtype
    //full
    if($boolPerm != true && $boolTemp != true && $boolPartTime != true && $boolFullTime == true){ 
    	$masterQuery .= "(SELECT * FROM jobs WHERE `Job Type` LIKE '%Full Time%') as a";
    }
    //part
    if($boolPerm != true && $boolTemp != true && $boolPartTime == true && $boolFullTime != true){ 
    	$masterQuery .= "(SELECT * FROM jobs WHERE `Job Type` LIKE '%Part Time%') as a";
    }
    //full & part
    if($boolPerm != true && $boolTemp != true && $boolPartTime == true && $boolFullTime == true){ 
    	$masterQuery .= "(SELECT * FROM jobs) as a";
    }
    //temp
    if($boolPerm != true && $boolTemp == true && $boolPartTime != true && $boolFullTime != true){
    	$masterQuery .= "(SELECT * FROM jobs WHERE `Job Type` LIKE '%Temporary%') as a";	
    }
    //temp & full
    if($boolPerm != true && $boolTemp == true && $boolPartTime != true && $boolFullTime == true){
    	$masterQuery .= "(SELECT * FROM (SELECT * FROM jobs WHERE `Job Type` LIKE '%Temporary%') as a WHERE `Job Type` LIKE '%Full Time%') as b";
    }
    //temp & part
    if($boolPerm != true && $boolTemp == true && $boolPartTime == true && $boolFullTime != true){
    	$masterQuery .= "(SELECT * FROM (SELECT * FROM jobs WHERE `Job Type` LIKE '%Temporary%') as a WHERE `Job Type` LIKE '%Part Time%') as b";
    }
    //temp & part & full
    if($boolPerm != true && $boolTemp == true && $boolPartTime == true && $boolFullTime == true){
    	$masterQuery .= "(SELECT * FROM jobs WHERE `Job Type` LIKE '%Temporary%') as a";	
    }
    //perm
    if($boolPerm == true && $boolTemp != true && $boolPartTime != true && $boolFullTime != true){
    	$masterQuery .= "(SELECT * FROM jobs WHERE `Job Type` LIKE '%Permanent%') as a";
    }
    //perm & full
    if($boolPerm == true && $boolTemp != true && $boolPartTime != true && $boolFullTime == true){
    	$masterQuery .= "(SELECT * FROM (SELECT * FROM jobs WHERE `Job Type` LIKE '%Permanent%') as a WHERE `Job Type` LIKE '%Full Time%') as b";
    }
    //perm & part
    if($boolPerm == true && $boolTemp != true && $boolPartTime == true && $boolFullTime != true){
    	$masterQuery .= "(SELECT * FROM (SELECT * FROM jobs WHERE `Job Type` LIKE '%Permanent%') as a WHERE `Job Type` LIKE '%Part Time%') as b";
    }
    //perm & part & full
    if($boolPerm == true && $boolTemp != true && $boolPartTime == true && $boolFullTime == true){
    	$masterQuery .= "(SELECT * FROM jobs WHERE `Job Type` LIKE '%Permanent%') as a";
    }
    //perm & temp
    if($boolPerm == true && $boolTemp == true && $boolPartTime != true && $boolFullTime != true){ $masterQuery .= "(SELECT * FROM jobs) as a";}
    //perm & temp & full
    if($boolPerm == true && $boolTemp == true && $boolPartTime != true && $boolFullTime == true){ 
    	$masterQuery .= "(SELECT * FROM jobs WHERE `Job Type` LIKE '%Full Time%') as a";
    }
    //perm & temp & part
    if($boolPerm == true && $boolTemp == true && $boolPartTime == true && $boolFullTime != true){ 
    	$masterQuery .= "(SELECT * FROM jobs WHERE `Job Type` LIKE '%Part Time%') as a";
    }
    //perm & temp & full & part
    if($boolPerm == true && $boolTemp == true && $boolPartTime == true && $boolFullTime == true){ $masterQuery .= "(SELECT * FROM jobs) as a";}
    
    
    
    //location
    if($boolLocation == true){
    	if($boolPerm == true || $boolTemp == true || $boolPartTime == true || $boolFullTime == true){
    		$masterQuery = "(SELECT * FROM ".$masterQuery." WHERE `location` LIKE '%".$location."%') as c";
    	}else{$masterQuery = "(SELECT * FROM jobs WHERE `location` LIKE '%".$location."%') as c";}
    }
    
    //sector
    if($boolSector == true){
    	if(($boolPerm == true || $boolTemp == true || $boolPartTime == true || $boolFullTime == true) || $boolLocation == true){
    		if($sector == "All Social Care"){
    			$a=1;
    			$masterQuery="(SELECT * FROM ".$masterQuery." WHERE `Sector` LIKE '%Care Assistant%' OR `Sector` LIKE '%Care Manager%' OR `Sector` LIKE '%Child Care/Nanny%' OR `Sector` LIKE '%Elderly Care%' OR `Sector` LIKE '%Family Support%' OR `Sector` LIKE '%Learning Mentor%' OR `Sector` LIKE '%Qualified Social worker%' OR `Sector` LIKE '%Management%' OR `Sector` LIKE '%Social Work Assistant%' OR `Sector` LIKE '%Support Worker%' OR `Sector` LIKE '%Youth Worker%' OR '%Other%') as d";}
    
    		if ($sector == "All Nursing"){
    			$a=1;
    		$masterQuery="(SELECT * FROM ".$masterQuery." WHERE `Sector` LIKE 'Grade A,B,C' OR `Sector` LIKE '%Grade D%' OR `Sector` LIKE '%Grade E%' OR `Sector` LIKE '%Grade F%' OR `Sector` LIKE '%Grade G%' OR `Sector` LIKE '%Grade H%' OR `Sector` LIKE '%Grade I%' OR `Sector` LIKE '%Management%' OR `Sector` LIKE '%Midwifery%' OR `Sector` LIKE '%Staff Nurse%' OR `Sector` LIKE '%Student%' OR `Sector` LIKE '%Sister/ChargeNurse%' OR `Sector` LIKE '%Other%' OR `Sector` LIKE '%Nursing%') as d";}
    
    		if($sector == "All Allied Health"){
    			$a=1;
    		$masterQuery="(SELECT * FROM ".$masterQuery." WHERE `Sector` LIKE '%Audiology%' OR `Sector` LIKE '%Dental Auxiliary%' OR `Sector` LIKE '%Medical Assistant%' OR `Sector` LIKE '%Midwifery%' OR `Sector` LIKE '%Pharmacy%' OR `Sector` LIKE '%Physiotherapy%' OR `Sector` LIKE '%Optometry%' OR `Sector` LIKE '%Radiography%' OR `Sector` LIKE '%Other%') as d";}
    
    		if($a != 1){$masterQuery="(SELECT * FROM ".$masterQuery." WHERE `Sector` LIKE '%".$sector."%') as d";}
    	}
    
    	if(($boolPerm != true && $boolTemp != true && $boolPartTime != true && $boolFullTime != true) && $boolLocation != true){
    		$masterQuery="(SELECT * FROM jobs WHERE `Sector` LIKE '%".$sector."%') as d";
    		if($sector == "All Social Care"){
    			$masterQuery="(SELECT * FROM jobs WHERE `Sector` LIKE '%Care Assistant%' OR `Sector` LIKE '%Care Manager%' OR `Sector` LIKE '%Child Care/Nanny%' OR `Sector` LIKE '%Elderly Care%' OR `Sector` LIKE '%Family Support%' OR `Sector` LIKE '%Learning Mentor%' OR `Sector` LIKE '%Qualified Social worker%' OR `Sector` LIKE '%Management%' OR `Sector` LIKE '%Social Work Assistant%' OR `Sector` LIKE '%Support Worker%' OR `Sector` LIKE '%Youth Worker%' OR '%Other%') as d";}
    
    		if ($sector == "All Nursing"){
    		$masterQuery="(SELECT * FROM jobs WHERE `Sector` LIKE 'Grade A,B,C' OR `Sector` LIKE '%Grade D%' OR `Sector` LIKE '%Grade E%' OR `Sector` LIKE '%Grade F%' OR `Sector` LIKE '%Grade G%' OR `Sector` LIKE '%Grade H%' OR `Sector` LIKE '%Grade I%' OR `Sector` LIKE '%Management%' OR `Sector` LIKE '%Midwifery%' OR `Sector` LIKE '%Staff Nurse%' OR `Sector` LIKE '%Student%' OR `Sector` LIKE '%Sister/ChargeNurse%' OR `Sector` LIKE '%Other%' OR `Sector` LIKE '%Nursing%') as d";}
    
    		if($sector == "All Allied Health"){
    		$masterQuery="(SELECT * FROM jobs WHERE `Sector` LIKE '%Audiology%' OR `Sector` LIKE '%Dental Auxiliary%' OR `Sector` LIKE '%Medical Assistant%' OR `Sector` LIKE '%Midwifery%' OR `Sector` LIKE '%Pharmacy%' OR `Sector` LIKE '%Physiotherapy%' OR `Sector` LIKE '%Optometry%' OR `Sector` LIKE '%Radiography%' OR `Sector` LIKE '%Other%') as d";}
    	}
    }
    
    
    
    //keywords
    if($boolKeywords == true){
    if(($boolPerm == true || $boolTemp == true || $boolPartTime == true || $boolFullTime == true) || $boolLocation == true || $boolSector == true){
    
    	$masterQuery = "(SELECT * FROM ".$masterQuery." WHERE ".$keywords." ) as e";
    }
    else {$masterQuery = "(SELECT * FROM jobs WHERE ".$keywords." ) as e";}
    }
    
    
    
    
    
    
    if ($masterQuery == ""){$masterQuery = "SELECT * FROM jobs";}
    else{$masterQuery = "SELECT * FROM ".$masterQuery;}
    
    
    
    $results = getResults($db,$masterQuery);
    display($results);
    
    
    
    
    
    
    
    function getResults($db,$masterQuery){
    $query = $db->query($masterQuery);
    if(@$db->numRows($query)>0){
    	//we have a result
    	while($row=$db->fetchArray($query)){$results[] = $row;}
    	@mysql_free_result($query);
    	return $results;
    }else{return $results;}
    }
    
    
    function display($results){
    $resultCount = count($results);
    
    //
    $resultLimitLower = "1";
    $resultLimitHigher = $resultCount;
    
    include('results.inc.php');
    if($resultCount == 0){echo "Nothing Found";}
    else{
    	foreach($results as $result){include('result.inc.php');}
    	}
    include('footer.inc.php');
    }
    
    
    
    ?>
    
    
    
    
    
    
    
    
    
    
    

  12. Actually, it works now but I get loads of errors

    Notice: Undefined variable: log in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 6
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 60
    
    Notice: Undefined variable: boolTemp in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 60
    
    Notice: Undefined variable: boolPartTime in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 60
    
    Notice: Undefined variable: boolFullTime in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 60
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 64
    
    Notice: Undefined variable: boolTemp in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 64
    
    Notice: Undefined variable: boolPartTime in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 64
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 68
    
    Notice: Undefined variable: boolTemp in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 68
    
    Notice: Undefined variable: boolPartTime in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 68
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 72
    
    Notice: Undefined variable: boolTemp in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 72
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 76
    
    Notice: Undefined variable: boolTemp in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 76
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 80
    
    Notice: Undefined variable: boolTemp in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 80
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 84
    
    Notice: Undefined variable: boolTemp in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 84
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 88
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 92
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 96
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 100
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 104
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 106
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 110
    
    Notice: Undefined variable: boolPerm in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 114
    
    Notice: Undefined variable: boolSector in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 126
    
    Notice: Undefined variable: boolKeywords in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 159
    
    Notice: Undefined variable: masterQuery in C:\Documents and Settings\haroon\My Documents\JobJar\wamp\www\wamp\www\Pages\search.php on line 172

  13. Define: "it still does not work." Yes, but what is it doing now compared to what you previously posted it was doing when it was not working? We only see the information you post and the solutions you get cannot be any better than the information you supply.

     

    Exactly the same as before, it reads the search.php as if it is not a php script. The creator of the script advised I download XAMPP rather than WAMP. But I did previously have a small search form with a php script working with WAMP.

  14. If you paid someone to write that code, get them to change the tags to full php tags. No one that is getting paid to write php code should be using short open tags as you will eventually end up on a server where you won't have the ability to turn on the short_open_tag setting.

     

    I have just changed all the <? to <?php and it still does not work.

  15. Yes you could do that which would make your code more portable should you ever move it to another host, however it depends how many files you will have to change. If there are a lot, then you could just turn on short tag support as I explained above although i have never been a fan of short tags at all :-)

     

    How do I switch it on?

  16. As i said the short tags are probably not supported on your configuration which means that the php is being interprted as literal text

     

    So do I just need the replace the <?,  at the top of the script with <?php, ?

  17. In order to get a web server to serve up a .php file, you must browse to a URL that causes the web server to do that. You need to enter a URL like http://localhost/your_file.php in your browser. You are apparently trying to enter a Windows file system path as a URL, which it is not.

     

    I have attached a print screen of what I get when I do this

     

    [attachment deleted by admin]

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.