Jump to content

laanes

Members
  • Posts

    70
  • Joined

  • Last visited

    Never

Everything posted by laanes

  1. I am not getting any further with it. Anyone willing to help?
  2. Post your code here for people to look at so they can help you.
  3. Or, it fails before it even gets to that line - when trying to select second level sub groups in the database? groups.php: <?php include 'scrptz/functions.php'; // Page vars $thisPage=$getVars["page"]; if($thisPage<1)$thisPage=1; $firstGroup=($thisPage*16)-16; // Get group details and stick them into an array $qMain="SELECT * FROM PGroups WHERE PG = '".$getVars["prodg"]."'"; $result=mysql_query($qMain) or die("<font color=\"#FF0000\">ERROR {9.1}! Please navigate to a <a href=\"main.php?uid=".$getVars['uid']."\">different page</a> and then try this page again.</font>"); $groupDetails=mysql_fetch_array($result); // Get all sub groups in current product group $qMain="SELECT * FROM SubG WHERE ProdG = '".$getVars["prodg"]."'"; $result=mysql_query($qMain) or die("<font color=\"#FF0000\">ERROR {9.2}! Please navigate to a <a href=\"main.php?uid=".$getVars['uid']."\">different page</a> and then try this page again.</font>"); // Stick sub groups in a 2D associative array $j=0; while ($row=mysql_fetch_array($result)) { foreach($row as $i=>$data)$array[$j][$i]=$data; $j++; } // Calculate vars for navigation $totalGroups=$j; $totalPages=ceil($totalGroups/16); // Set page title (for bookmark) $pageTitle=$groupDetails["GPname"]; // Set top title if($totalGroups>0){$topTitle="VIEW PRODUCTS";}else{$topTitle="ERROR";} ?> <html> <head> <script language="JavaScript" type="text/javascript">var theID="<?php echo $getVars['uid']; ?>";</script> <script language="JavaScript" src="scrptz/content.js" type="text/javascript"></script> <script language="JavaScript" src="scrptz/menu.js" type="text/javascript"></script> <script language="JavaScript" src="scrptz/scripts.js" type="text/javascript"></script> </head> <body background="imgz/bg.gif" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0"<?php echo $notify ?>> <?php include("top.php"); ?> <table width="952" height="509" border="0" cellpadding="0" cellspacing="0" class="maintext"> <?php if($sessions['accCode']){?><form action="http://www.lock-tech.co.uk/index.php" method="post" name="logout" target="_parent"><input name="account" type="hidden" value="<?php echo $sessions['accCode']; ?>"><input name="killSession" type="hidden" value="<?php echo $getVars['uid']; ?>"></form><?php }?> <tr> <td width="1" rowspan="5" bgcolor="#000000"></td> <td height="21" background="imgz/topbar.gif" bgcolor="#14359E"> </td> <td height="21" colspan="5" valign="middle" background="imgz/topbar.gif" bgcolor="#14359E" class="mainyellow"><?php include("scrptz/dd_menu.php"); ?></td> <td height="21" background="imgz/topbar.gif" bgcolor="#14359E"> </td> <td width="1" rowspan="5" bgcolor="#000000"></td> </tr> <tr> <td width="5" rowspan="3"> </td> <td width="306" height="30" valign="bottom" class="title2"><?php echo $groupDetails["GPname"] ?></td> <td width="11" rowspan="3"><img src="imgz/maindiv.gif" width="11" height="466"></td> <td width="306" height="30" align="center" valign="bottom" class="title2"><?php if($totalGroups>0){?><a href="g_view.php?pgroup=<?php echo $groupDetails["PG"] ?>&uid=<?php echo $getVars['uid']; ?>" class="link4" onmouseover="window.status='View List of all Products in <?php echo $groupDetails["GPname"] ?>'; return true">VIEW ALL</a> | <a href="g_browse.php?pgroup=<?php echo $groupDetails["PG"] ?>&uid=<?php echo $getVars['uid']; ?>" class="link4" onmouseover="window.status='Browse all Products in <?php echo $groupDetails["GPname"] ?>'; return true">BROWSE ALL</a><?php }?></td> <td width="11" rowspan="3"><img src="imgz/maindiv.gif" width="11" height="466"></td> <td width="306" height="30" align="center" valign="bottom"> </td> <td width="5" rowspan="3"> </td> </tr> <tr> <td height="20" valign="top" class="mainbold"></td> <td width="306" rowspan="2" valign="top" class="maintext"> <?php for($i=$firstGroup; $i<($firstGroup+ && $i<$totalGroups; $i++){?> <a href="sub.php?PSubG=<?php echo $array[$i]["SPG"] ?>&uid=<?php echo $getVars['uid']; ?>" class="link1" onmouseover="window.status='View Products in <?php echo $array[$i]["SPGname"] ?>'; return true"><?php echo $array[$i]["SPGname"] ?></a><br> <?php // Get all subsubs in current sub group $qMain="SELECT * FROM SubSubG WHERE SPG = '".$array[$i]["SPG"]."'"; $result=mysql_query($qMain) or die("<font color=\"#FF0000\">ERROR {9.3}! Please navigate to a <a href=\"main.php?uid=".$getVars['uid']."\">different page</a> and then try this page again.</font>"); // Print subsubs while ($row=mysql_fetch_array($result)) { ?> [<a href="subsub.php?PSubSubG=<?php echo $row["SSPG"]?>&uid=<?php echo $getVars['uid']; ?>" class="link3" onmouseover="window.status='View Products in <?php echo $row["SSPGName"]?>'; return true"><?php echo $row["SSPGName"]?></a>] <?php } ?> <br><br> <?php }?></td> <td width="306" rowspan="2" valign="top" class="maintext"> <?php for($i=$firstGroup+8; $i<($firstGroup+16) && $i<$totalGroups; $i++){?> <a href="sub.php?PSubG=<?php echo $array[$i]["SPG"] ?>&uid=<?php echo $getVars['uid']; ?>" class="link1" onmouseover="window.status='View Products in <?php echo $array[$i]["SPGname"] ?>'; return true"><?php echo $array[$i]["SPGname"] ?></a><br> <?php // Get all subsubs in current sub group $qMain="SELECT * FROM SubSubG WHERE SPG = '".$array[$i]["SPG"]."'"; $result=mysql_query($qMain) or die("<font color=\"#FF0000\">ERROR {9.4}! Please navigate to a <a href=\"main.php?uid=".$getVars['uid']."\">different page</a> and then try this page again.</font>"); // Print subsubs while ($row=mysql_fetch_array($result)) { ?> [<a href="subsub.php?PSubSubG=<?php echo $row["SSPG"]?>&uid=<?php echo $getVars['uid']; ?>" class="link3" onmouseover="window.status='View Products in <?php echo $row["SSPGName"]?>'; return true"><?php echo $row["SSPGName"]?></a>] <?php } ?> <br><br> <?php }?></td> </tr> <tr> <td height="416" valign="top" class="mainbold"><?php if($totalGroups>0){?><img src="grp_pics/<?php echo $groupDetails["PG"] ?>.jpg" alt="Group Picture" galleryimg="no"><br><img src="imgz/pixel.gif" width="306" height="5"><br> <?php echo $groupDetails["GPText"] ?><?php }else{?><p class="noresult">No Products Found.</p><p class="mainbold">Sorry, but there are no products in this section at the moment. The products are constantly being updated, however. Please try again later or <a href="mailto:sales@lock-tech.co.uk" class="link1" onmouseover="window.status='Send us an Email.'; return true">contact us</a>.</p><?php }?></td> </tr> <tr> <td width="5" height="22" background="imgz/btmbar.gif" bgcolor="#14359E"> </td> <td width="306" height="22" align="center" valign="top" background="imgz/btmbar.gif" bgcolor="#14359E"><a href="javascript:history.back()" onmouseover="prev_btn.src='imgz/prev2.gif';window.status='Previous Page'; return true" onmouseout="prev_btn.src='imgz/prev.gif'"><img name="prev_btn" src="imgz/prev.gif" width="124" height="16" border="0"></a></td> <td width="11" height="22" bgcolor="#14359E"><img src="imgz/btmdiv.gif" width="11" height="22"></td> <td width="306" height="22" align="center" background="imgz/btmbar.gif" bgcolor="#14359E" class="nav"><? include 'scrptz/nav.php' ?></td> <td width="11" height="22" bgcolor="#14359E"><img src="imgz/btmdiv.gif" width="11" height="22"></td> <td width="306" height="22" align="center" valign="top" background="imgz/btmbar.gif" bgcolor="#14359E"><a href="javascript:directLink('<?php echo $prodLink; ?>','<? echo $pageTitle ?>')" onmouseover="link_btn.src='imgz/link2.gif'; window.status='Direct Link to This Page'; return true" onmouseout="link_btn.src='imgz/link.gif'"><img name="link_btn" src="imgz/link.gif" alt="" width="182" height="16" border="0"></a></td> <td width="5" height="22" background="imgz/btmbar.gif" bgcolor="#14359E"> </td> </tr> </table> </body> </html>
  4. After re-importing the database with the missing sessions table, the website came up, hurray! But with missing features - can not get the products from the database. I found this line in a file is called groups.php <td height="416" valign="top" class="mainbold"><?php if($totalGroups>0){?><img src="grp_pics/<?php echo $groupDetails["PG"] ?>.jpg" alt="Group Picture" galleryimg="no"><br><img src="imgz/pixel.gif" width="306" height="5"><br> <?php echo $groupDetails["GPText"] ?><?php }else{?><p class="noresult">No Products Found.</p><p class="mainbold">Sorry, but there are no products in this section at the moment. The products are constantly being updated, however. Please try again later or <a href="mailto:sales@lock-tech.co.uk" class="link1" onmouseover="window.status='Send us an Email.'; return true">contact us</a>.</p><?php }?></td> What is that telling me? Would there be a way of adding an or die element into that line instead of that please try again later message?
  5. And there we are: I guess the next thing now is to find out where is the correct sql file located as the one i imported does not have all the tables needed and can not therefore be the right one. Re-hosting a website which isn't developed by yourself and is without any documentation seems to be a whole lot of fun.
  6. I have now added - or die(mysql_error()); to every function that used to have - or die("<font color=\"#FF0000\">ERROR {2.6}! Please navigate to a <a href=\"main.php?uid=".$sessions['uid']."\">different page</a> and then try this page again.</font>"); instead. I have also tried to add a comment to every function to help myself to understand what each of them means. It is possible that I have misunderstood some of them in which case the comments would not be very helful. function inDaList($addy) { $result=@mysql_query("SELECT email FROM mailinglist") or die(mysql_error()); while($row=@mysql_fetch_array($result))foreach($row as $data)$addyArray[]=strtoupper($data); return in_array($addy, $addyArray); } // Session functions function startSession() { // Read all sessionIDs from session table $result=mysql_query("SELECT uid FROM sessions") or die(mysql_error()); // Stick them in an array while($row=mysql_fetch_array($result))foreach($row as $data)$sArray[]=$data; // Read all sessionIDs from basket table $result=mysql_query("SELECT sessionID FROM basket") or die(mysql_error()); // Stick them in an array while($row=mysql_fetch_array($result))foreach($row as $data)$bArray[]=$data; // Generate random id string srand((float)microtime()*100000000); $theID=md5(rand()); // Make sure that the id is unique if(!count($sArray))$sArray=array(); if(!count($bArray))$bArray=array(); while(in_array($theID, $sArray) || in_array($theID, $bArray))$theID=md5(rand()); // Insert values in db mysql_query("INSERT INTO sessions SET uid='".$theID."',theTime='".time()."'") or die(mysql_error()); // Add sessionid to Getvars array global $getVars; $getVars["uid"]=$theID; } function destroySession($ID) { global $getVars, $sessions; mysql_query("DELETE FROM sessions WHERE ID='".$ID."' LIMIT 1") or die(mysql_error()); // Remove session ID from getVars unset($getVars['uid']); } function readSessionVars($ID) { global $getVars, $sessions; $result=mysql_query("SELECT * FROM sessions WHERE uid='".$ID."' AND theTime>='".(time()-(3600*)."'") or die(mysql_error()); // Stick session variables into an array while($row=mysql_fetch_array($result))foreach($row as $i=>$data)$sessions[$i]=$data; // Update session with current time mysql_query("UPDATE sessions SET theTime='".time()."' WHERE ID='".$sessions["uid"]."' LIMIT 1") or die(mysql_error()); } function updateSession($ID, $var, $value) { global $getVars, $sessions; // Update requested variable in session table mysql_query("UPDATE sessions SET ".$var."='".$value."' WHERE ID='".$ID."' LIMIT 1") or die(mysql_error()); readSessionVars($getVars["uid"]); }
  7. For anyone here to directly be able to help, it would take seeing what lines 1 - 25 of that file is. <?php define("VAT", 17.5); define("JIFFY", 5); define("HTMLSIGNATURE", "<br><br><br><br><br><br>LOCK-TECH® a division of<br>Swansea Timber & Ply Co. Ltd.<br>57-60 Oxford Street, Swansea SA1 3JD<br><br>[t] 01792 655680 [f] 01792 462243<br>[e] <a href=\"mailto:sales@lock-tech.co.uk\">sales@lock-tech.co.uk</a> [w] <a href=\"http://www.lock-tech.co.uk\">www.lock-tech.co.uk</a>"); define("TEXTSIGNATURE", "\n\n\n\n\n\nLOCK-TECH� a division of\nSwansea Timber & Ply Co. Ltd.\n57-60 Oxford Street, Swansea SA1 3JD\n\n[t] 01792 655680 [f] 01792 462243\n[e] sales@lock-tech.co.uk [w] www.lock-tech.co.uk"); /////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// $bArray=array(); $sessions=array(); @set_time_limit(3); // Database vars $hostName="localhost"; $dbUser="swansea3_lockT"; $dbName="swansea3_locktech"; $pwd="****"; $qMain="SELECT * FROM pDetails INNER JOIN products ON (pDetails.code = products.SCode) INNER JOIN PRanges ON (products.PRange = PRanges.RangeID) INNER JOIN PGroups ON (products.PGroup = PGroups.PG) INNER JOIN SubG ON (products.PSubG = SubG.SPG) INNER JOIN SubSubG ON (products.SSPG = SubSubG.SSPG) "; mysql_connect($hostName, $dbUser, $dbName, $pwd); <------- LINE 25 mysql_select_db($dbName); Ok, now when you pointed where to look, I can see that there is one too many variables listed in the MySQL connection. No need to have dbname in there. However, when I remove it, a whole new error message is being displayed: ERROR {2.1a}! Please navigate to a different page and then try this page again. I can see that this is an "or die" message added to every function in functions.php file. functions with this output in functions.php: function inDaList($addy) { $result=@mysql_query("SELECT email FROM mailinglist") or die("<font color=\"#FF0000\">ERROR {2.0a}! Please navigate to a <a href=\"main.php?uid=".$sessions['uid']."\">different page</a> and then try this page again.</font>"); while($row=@mysql_fetch_array($result))foreach($row as $data)$addyArray[]=strtoupper($data); return in_array($addy, $addyArray); } // Session functions function startSession() { $result=mysql_query("SELECT uid FROM sessions") or die("<font color=\"#FF0000\">ERROR {2.1a}! Please navigate to a <a href=\"main.php?uid=".$sessions['uid']."\">different page</a> and then try this page again.</font>"); while($row=mysql_fetch_array($result))foreach($row as $data)$sArray[]=$data; $result=mysql_query("SELECT sessionID FROM basket") or die("<font color=\"#FF0000\">ERROR {2.1b}! Please navigate to a <a href=\"main.php?uid=".$sessions['uid']."\">different page</a> and then try this page again.</font>"); while($row=mysql_fetch_array($result))foreach($row as $data)$bArray[]=$data; srand((float)microtime()*100000000); $theID=md5(rand()); if(!count($sArray))$sArray=array(); if(!count($bArray))$bArray=array(); while(in_array($theID, $sArray) || in_array($theID, $bArray))$theID=md5(rand()); mysql_query("INSERT INTO sessions SET uid='".$theID."',theTime='".time()."'") or die("<font color=\"#FF0000\">ERROR {2.2}! Please navigate to a <a href=\"main.php\">different page</a> and then try this page again.</font>"); global $getVars; $getVars["uid"]=$theID; } function destroySession($ID) { global $getVars, $sessions; mysql_query("DELETE FROM sessions WHERE ID='".$ID."' LIMIT 1") or die("<font color=\"#FF0000\">ERROR {2.3}! Please navigate to a <a href=\"main.php?uid=".$sessions['uid']."\">different page</a> and then try this page again.</font>"); // Remove session ID from getVars unset($getVars['uid']); } function readSessionVars($ID) { global $getVars, $sessions; $result=mysql_query("SELECT * FROM sessions WHERE uid='".$ID."' AND theTime>='".(time()-(3600*)."'") or die("<font color=\"#FF0000\">ERROR {2.4}! Please navigate to a <a href=\"main.php?uid=".$sessions['uid']."\">different page</a> and then try this page again.</font>"); while($row=mysql_fetch_array($result))foreach($row as $i=>$data)$sessions[$i]=$data; mysql_query("UPDATE sessions SET theTime='".time()."' WHERE ID='".$sessions["uid"]."' LIMIT 1") or die("<font color=\"#FF0000\">ERROR {2.5}! Please navigate to a <a href=\"main.php?uid=".$sessions['uid']."\">different page</a> and then try this page again.</font>"); } function updateSession($ID, $var, $value) { global $getVars, $sessions; mysql_query("UPDATE sessions SET ".$var."='".$value."' WHERE ID='".$ID."' LIMIT 1") or die("<font color=\"#FF0000\">ERROR {2.6}! Please navigate to a <a href=\"main.php?uid=".$sessions['uid']."\">different page</a> and then try this page again.</font>"); readSessionVars($getVars["uid"]); } include('efunctions.php'); include('sessions.php');
  8. So most definately some of the credentials must be wrong?
  9. $hostName="localhost"; $dbUser="swansea3_lockT"; $dbName="swansea3_locktest"; Code has not been written by me, if it would, i would not be asking questions here. I have removed the @'s and changed the parameters in mysql_connect: $hostName="localhost"; $dbName="swansea3_locktest"; $dbUser="swansea3_lockT"; $pwd="******"; mysql_connect($hostName, $dbUser, $pwd); mysql_select_db($dbName); Error message does not change. I don't get why the error message is saying Access denied for user 'swansea3'@'localhost as I have not swansea3 to be a user for that database. swansea3 is the default username given you when creating an account with the hosting provider and is also the database prefix.
  10. I just noticed that URL does not exist: $securePrefix="https://fusion.bpweb.net/secure/locktech/"; But even if i remove it nothing changes so I guess that hasn't got nothing to do with it.
  11. If any helpful, here is the rest of the code in index.php: <?php $hostName="localhost"; $dbName="****"; $pwd="****"; @mysql_connect($hostName, $dbName, $pwd); @mysql_select_db($dbName); function clean($input, $maxLength){$input=substr(stripslashes(EscapeShellCmd($input)), 0, $maxLength); return $input;} foreach($HTTP_GET_VARS as $varName=>$value)$getVars[$varName]=trim(clean($value, 100)); foreach($HTTP_POST_VARS as $varName=>$value)$postVars[$varName]=trim(clean($value, 100)); if($postVars["action"]=="login") { if($postVars["usr"] && $postVars["pwd"]) { // Get customer details if($custDetails=mysql_fetch_array(@mysql_query("SELECT * FROM customers WHERE accCode='".$postVars["usr"]."' and password='".$postVars["pwd"]."'"))) { $securePrefix="https://fusion.bpweb.net/secure/locktech/"; $navTo=$postVars["goto"]."?uid=".$postVars["uID"]; // Insert details in session table mysql_query("UPDATE sessions SET accCode='".$custDetails["accCode"]. "', discount='".$custDetails["salesInd3"]. "', buyAlert='".$custDetails["buyAlert"]. "', stockAlert='".$custDetails["stockAlert"]. "', vat='".$custDetails["vat"]. "' WHERE uid='".$postVars["uID"]."' LIMIT 1") or $navTo="login.php?uid=".$postVars["uID"]."&logError=true"; } else { unset($securePrefix); $navTo="login.php?uid=".$postVars["uID"]."&logError=true"; } } } elseif($postVars["killSession"]){@mysql_query("DELETE FROM sessions WHERE uid='".$postVars["killSession"]."' AND accCode='".$postVars["account"]."' LIMIT 1"); $navTo="main.php";} elseif($getVars["myURL"]) { if(strpos($getVars["myURL"], "account")===false && strpos($getVars["myURL"], "basket")===false && strpos($getVars["myURL"], "checkout")===false && strpos($getVars["myURL"], "confirm")===false && strpos($getVars["myURL"], "goto")===false && strpos($getVars["myURL"], "vat")===false && strpos($getVars["myURL"], "PCode")===false && strpos($getVars["myURL"], "qty")===false && strpos($getVars["myURL"], "orders")===false && strpos($getVars["myURL"], "chpwd")===false && strpos($getVars["myURL"], "price")===false && strpos($getVars["myURL"], "UPDATE")===false && strpos($getVars["myURL"], "DELETE")===false && strpos($getVars["myURL"], "myURL")===false && strpos($getVars["myURL"], "uid")===false && strpos($getVars["myURL"], "action")===false) { $navTo=$getVars["myURL"]; foreach($getVars as $varName=>$value)if($varName!="myURL" && $varName!="goto" && $varName!="vat" && $varName!="PCode" && $varName!="qty" && $varName!="price" && $varName!="UPDATE_x" && $varName!="DELETE_x" && $varName!="uid" && $varName!="action")$navTo.="&".$varName."=".$value; } else{$navTo="main.php"; unset($securePrefix);} } else{$navTo="main.php"; unset($securePrefix);} ?>
  12. I am always logged into phpMyAdmin with one default user. Credentials for each database are set through a database wizard in cPanel but when using phpMyadmin it always shows the default user - defaultuser@localhost, no matter which database is currently being used.
  13. MySQL client version: 5.0.91 Server version: 5.0.91 Server: Localhost via UNIX socket
  14. Structure of index.php: <?php $hostName="localhost"; $dbName="*******"; $pwd="*******"; @mysql_connect($hostName, $dbName, $pwd); @mysql_select_db($dbName); function clean($input, $maxLength){$input=substr(stripslashes(EscapeShellCmd($input)), 0, $maxLength); return $input;} foreach($HTTP_GET_VARS as $varName=>$value)$getVars[$varName]=trim(clean($value, 100)); foreach($HTTP_POST_VARS as $varName=>$value)$postVars[$varName]=trim(clean($value, 100)); ?> Is it possible that some of the syntax out of date and is not compatible with the server version?
  15. The error message: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'swansea3_locktes'@'localhost' (using password: YES) in /home/swansea3/public_html/lock-tech.co.uk/home/scrptz/functions.php on line 25 Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'swansea3'@'localhost' (using password: NO) in /home/swansea3/public_html/lock-tech.co.uk/home/scrptz/functions.php on line 26 Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/swansea3/public_html/lock-tech.co.uk/home/scrptz/functions.php on line 26 Warning: Cannot modify header information - headers already sent by (output started at /home/swansea3/public_html/lock-tech.co.uk/home/scrptz/functions.php:25) in /home/swansea3/public_html/lock-tech.co.uk/home/scrptz/sessions.php on line 3 Warning: Cannot modify header information - headers already sent by (output started at /home/swansea3/public_html/lock-tech.co.uk/home/scrptz/functions.php:25) in /home/swansea3/public_html/lock-tech.co.uk/home/scrptz/sessions.php on line 4 Warning: Cannot modify header information - headers already sent by (output started at /home/swansea3/public_html/lock-tech.co.uk/home/scrptz/functions.php:25) in /home/swansea3/public_html/lock-tech.co.uk/home/scrptz/sessions.php on line 5 Warning: Cannot modify header information - headers already sent by (output started at /home/swansea3/public_html/lock-tech.co.uk/home/scrptz/functions.php:25) in /home/swansea3/public_html/lock-tech.co.uk/home/scrptz/sessions.php on line 6 Warning: mysql_query() [function.mysql-query]: Access denied for user 'swansea3'@'localhost' (using password: NO) in /home/swansea3/public_html/lock-tech.co.uk/home/scrptz/functions.php on line 203 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/swansea3/public_html/lock-tech.co.uk/home/scrptz/functions.php on line 203 ERROR {2.1a}! Please navigate to a different page and then try this page again. I have tried various sets of user names with various different database names/passwords. The hosting provider says that my connection details are correct and i need to check the configuration in the index.php file. That does not make sense as the website has only been re-hosted, not modified in any way.
  16. Hello, After re-hosting a website there has been trouble connecting to the database. The MySQL error can be seen here: http://www.lock-tech.co.uk/home/ If someone can help out with this i would be amazed. Kind regards, laanes
  17. Navigation Links coming from a database table I am using CubeCart to hopefully sell products in the near future. I have a menu that goes multiple levels down and I am trying to load the menu straight from a database table. I also want the cat_id and cat_father_id to be letters(varchar) instead of auto incrementing numbers. Does anyone know is this is possible and maybe even how to do it? At the moment i get the following feedback: Error Message: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TOOLS' at line 1 SQL: SELECT cat_id FROM CubeCart_category WHERE cat_father_id = HAND TOOLS The error does not appear when I change cat_father_id back to an auto_incrementing integer. I need it to be VARCHAR. If anyone feels that he might be able to help then let me know what additional information would you need. Thank You to everyone who will share any ideas/thoughts.
  18. And the values i need to set manually ? e.g. $width = 300 and $height = 300 ?
  19. Would that actually change the dimensions of the file or just display it with those dimensions on the web ?
  20. Hello! I have two folders. The first folder holds random size images and the second one holds static size images (300x180). How can write a script that compares those two folders? All the images added to the first folder should be resized automatically and then added to the second folder. Can anyone come up with a working solution ? All best, laanes
×
×
  • 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.