Hi,
I am new to dynamic websites and have built my first ste for a friend starting a business and all was working fine on my test server at home running IIS, PHP5 and MYSQL5. The problem is that the hosts are only running version 4 and now nothing works.
I have altered the code and have changed things like mysqli('domainip', 'username'.... to mysql_connect('domainip', 'username'... and have removed all references to $result->autocommit(TRUE); and $result->autocommit(FASLE); (is there a php 4 alternative for this?)
I have also changed:
THIS if (!$result || $result->num_rows!=0)
TO THIS if(!$result || mysql_num_rows($result)!=0)
THIS for ($count=0; $row = $result->fetch_assoc(); $count++)
TO THIS for ($count=0; $row = pg_fetch_array($result); $count++)
THIS $num_cats = @$result->num_rows;
TO THIS $num_cats = @mysql_num_rows($result);
THIS $item = $result->fetch_object();
TO THIS $item = pg_fetch_array($result);
THIS $conn->commit();
TO THIS session_write_close($conn);
Are these correct? Am I doing this correctly - and is there somewhere where this kind of information is easily available??
Other possible problems are...
return $row->quoteid;
return $row->catname;
$item_price = $item->price;
$customerid = $customer->customerid;
$quoteid = $quote->quoteid;
I don't know if these need replacing.
The code seems to be running ok but querying the database does not seem to return any results. You can view the page at
www.invate.co.uk/index.php - if you select either the desktop PC or the laptop you will be taken into the show_cat.php page - here you should have a menu of categories generated by php and sql and a list of products in that category. Accesing the admin area is not possible either - even with the correct details it says that i cannot login.
Any help will be greatly appreciated - I have searched everywhere for any help but I have not been able to find anything really on downgrading code from php5 to php4 (not the usual thing to do I suppose...). I have been pulling my hair out for over a wek now trying to make this all work!! Once again many thanks in advance and more thanks to come...
Reagrds
Sheldon
I can provide all the files as well as passwords to the admin area, the ftp server, and the database if neccessary...