Jump to content

Recommended Posts

Hi All, I have recently installed the softbiz jobs and recruitment script, and have a page full of errors as shown :

 

www.findjobswith.us

 

I have contacted softbiz but there support is non existent! I have tried re-installing but was left with the same errors. I was wondering if anyone knows a fix to this and as this is my 1st dive into php could also explain whats happening. Many thanks

 

Dave

Link to comment
https://forums.phpfreaks.com/topic/65686-solved-help-with-script-please/
Share on other sites

Your header problem, at the beginning of all your scripts, start it off with

ob_start();

That starts the buffer that you can place your headers anywhere on the script. You're actually going to have to log off/on the page to see the changes (at least, that's what I always have to do.) If that doesn't work, after you added the buffer, c&p the script again.

 

And in every page you see this error:

Warning: mysql_fetch_array(): OR mysql_num_rows(): 

go to your $query (could be named that or mysql_query or something of that nature), and at the end of the piece, add "OR die(mysql_error());". So the long hand version is this:

$query = "SELECT * FROM table WHERE something = '$something'"; 
$result = mysql_query($query) OR die(mysql_error());

Or the short-hand:

mysql_query("SELECT * FROM table") OR die(mysql_error());

 

That should do the trick.

Thank you very much for your help so far, I think i get what you are saying, as I said I am very new to all this. I have now changed the line to:

 

$online=mysql_fetch_array(mysql_query("select * from sbjbs_online where sb_ip='$ip'")OR die(mysql_error());

 

An I am getting this error:

 

Parse error: syntax error, unexpected ';' in /home/findjobs/public_html/myconnect.php on line 31

 

Is this a very simple mistake on my part?

 

Thanks

 

Dave

Thank you again for your reply, this is line 29 to 43

 

//==========================online visitors
mysql_query( "DELETE FROM sbjbs_online WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(sb_ontime) >$to_secs") ;
$online=mysql_fetch_array(mysql_query("select * from sbjbs_online where sb_ip='$ip'")OR die(mysql_error());
if($online)
{
mysql_query("update sbjbs_online set sb_ontime=$t_stamp,sb_uid=$uid where sb_ip='$ip'");
}
else
{
mysql_query("insert into sbjbs_online (sb_ontime,sb_ip,sb_uid) values($t_stamp,'$ip',$uid)"); 
}
/* $num=mysql_num_rows(mysql_query("select * from sbjbs_online"));
echo $num;*/

?>

Missing )

 

change

$online=mysql_fetch_array(mysql_query("select * from sbjbs_online where sb_ip='$ip'")OR die(mysql_error());

 

to

$online=mysql_fetch_array(mysql_query("select * from sbjbs_online where sb_ip='$ip'")OR die(mysql_error()));

 

 

or more readable

$SQL = "select * from sbjbs_online where sb_ip='$ip'";
$result = mysql_query($SQL)or die(mysql_error());
$online=mysql_fetch_array($result);

try this

 

updated


$link = mysql_connect('localhost', 'USERNAME', 'PASSWORD');
if (!$link) {
    die('Not connected : ' . mysql_error());
}

$db_selected = mysql_select_db('YOUR_DATABASE_NAME', $link);

$SQL = "select * from sbjbs_online where sb_ip='$ip'";
$result = mysql_query($SQL)or die(mysql_error());
$online=mysql_fetch_array($result);

 

please note the

'USERNAME', 'PASSWORD' & 'YOUR_DATABASE_NAME'

these need to be your settings

Thankyou, it was an error on my part, I had the not added the user to the database. However I still have the original error displaying, but all the others have dissappeard I think. Well for the index page anyway.

 

UPDATE - Not to worry, I added a @ at the start of the line and that seems to work.

 

Many thanks to all that helped :)

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.