Jump to content

cbolson

Members
  • Posts

    139
  • Joined

  • Last visited

    Never

Everything posted by cbolson

  1. Hi, You get that error becuase basically the code can't find anything. This code, as I mentioned is a complete mess and doesn't have any proper error reporting. I have now uploaded your database again (did your server admin also delete this?) I have modfied the settings file with the new db data (same username and password as before) There is some strange script called "cron" that is being executed the first time the index.php is being loaded. Thiis appears to do general maintence on the database and auction items. I presume that this is "their way" of running a cron job - these are normally exectued by the server at predefined times, it shouldn't be done via the browser. This script makes the first load of the webpage very slow! I am now searching all the code to try to find what (if anything) this "developer" has done. Please instruct your server admin to not do that again! Chris
  2. Good, I hope it sends you on your way. Just realised that the "7 DAY" should probably be 8 DAY as you want days *after* today so tomorrrow plus 7 = 8 Chris
  3. Hi, When I left you that message saying that I had fixed things, everything looked OK. However, when I went back to it today, I got the same message as you. So, I logged in to the ftp and saw that all my changes had gone. I checked in cpanel and saw that your database was not there. I have no idea what has happened. I am currently downloading your files from the ftp so as to be able to do a search to try and find anything "suspicious" that your nasty developer might have left in the code. It looks like you are going to have to re-create the database and modify the config.inc.php file again with your connection data. Chris
  4. Hi, To start, I presume that your "date" field is in a datetime (or similar) format, otherwise this is going to be hard. This will get results after today (based on server time) SELECT * FROM events WHERE date >CURDATE() This should get events after today and up until 7 days times: SELECT * FROM events WHERE date >CURDATE() AND date<DATE_ADD(INTERVAL,CURDATE(),7 DAY) Alternatively (better ? ): SELECT * FROM events WHERE date BETWEEN DATE_ADD(CURDATE(),INTERVAL, 1DAY) AND DATE_ADD(INTERVAL,CURDATE,7 DAY) You might have to play around with the numbers.... but this might help you in your way Chris
  5. That flash movie is 1.4mb!!!! You really do need to sort that out, there is no way it needs to be anything like that in size. If you can't make it any smaller (sizewize) I would really consider it's value in the page - ie is the aesthetic value worth the loadtime. Other than that it is a nice looking design though I must agree that the text (within the graphics) is quite hard to read. Also, shame you have made it with tables rather than layers, but that is another debate Chris
  6. Hi, I would suggest that you have a sperate table that simply holds friend ids linking the two together: id user_id friend_id You simply add a new row for each friend (you might want to add a date_add "date" column so that you know how long they have been friends for) This might mean you having a large table as regards number of rows but shouldn't be a problem perfomance wise and will be far easier to use. Chris
  7. Hi, I realise that gr1zzly has given you the answer but Begs the question Why don't you have ids? Pretty much all database tables should have an autoincrement id KEY field, I can't imagine a situation where this shouldn't be the case. Anyway, you have the solution, just though I would mention it Chris
  8. can you post (or send me a pm) with the url? Chris
  9. Hi, I presume from your code that you are refferring to the $_POST['class'] If you are refferring to this form (that goes to editclass.php): echo '<form name="form" method="POST" action="editclasspage.php">'; echo '<input name="hello">'; echo '<input type="submit" name="edit" value="Edit Entry">'; echo '</form>'; You haven't actually included the field and value in the form. You need to add a hidden form field like this: echo '<input type="hidden" name="class" value="'.$_POST["class"].'">'; Chris
  10. Hi, can't quite work out how yhour code is working but anyway, to remove specific field data from a table row, you should use ALTER. Are these images in one row or seperate rows? If they are image fields in one row where product_id is unique: ALTER product_table SET image_field_1='', image_field_2='' WHERE product_id=199 If they are seperate rows but there is other data that you don't want to delete: ALTER product_table SET image_field='' WHERE product_id=199 AND image_field='htc_t8282_flip2.jpg' If you only have a product_id field and image field you can remove the whole row: DELETE FROM product_table WHERE product_id=199 AND image_field='htc_t8282_flip2.jpg' LIMIT 1 Depending on what you have, one of those should work A bit more info about your product_table structure would be useful to give a more exact answer. Chris
  11. just logged in to the ftp and everything has changed again and my changes have been lost - not good after I spent an hour working out where it was going wrong and making the changes You don't even have a database anymore - this is seriously bad! Have you done anything to it? Let me know what is going on before I spend too much time on this again. Chris
  12. interesting, When I sent the message, everything was working fine. Now I visit the url again, it is broken again. Have you changed anything? I will take a fresh look it this morning (my time) to see what this guy might have done. Chris
  13. Hi, Your web is requesting a user and password for all the pages, even the images. Check your cpanel to see if the directories have been protected and, if so, remove that control. Chris
  14. Take a look now - is that how it should be? As I suspected you had a couple of configuration settings wrong in there: your db username was wrong the path to the includes file was wrong. Other than that, and I probably shouldn't say it, but, as I know that you didn't code it I am sure that you won't mind - there is some pretty awful coding in there! Chris
  15. might be a silly question but, are your javascript files where your code *thinks* they are? I have copied your source code and pasted the tooltops js code directly into it and it doesn't give me the error that you are reporting. Chris
  16. Ah, OK, I have now created a test page with the code that you have provided (minus the ajax part) and it works as I expect it to - ie it creates an (empty as I don't have the ajax) layer. There must be something else on your page that is preventing the code from "finding" the tooltip function. That is why I need to see your complete source code (html) Chris
  17. Hi, My first (and probably only) impressions are: Lose that entry page - this is a big no-no, it serves absolutly no purpose and just wastes users time (without going into the ins and out regarding the SEO and search engine response to such pages) Once into the web (having wasted time clicking on the "enter" button), that background image is very unnerving (maybe that was the point) Give your web a title! - there is no title tag... in fact, there is no header info at all!!! (<html>, <head>, <title> etc.) The submenu that appears when you mouseover the main menu then disapears again into the red background as you mouseover the links - having them change to red on a red background is not very user friendly I should probably stop there.... You say that you "had someone make this" - I hope you didn't pay for it! I would say that the belt images are the least of your problems Sorry if my comments are harsh, but you did ask Chris
  18. OK, you can pm me the ftp details but I will also need to know the database connection details in the new server (username, password and database name) I can't promise any fast results though, it is 1:30 in the morning where I am and I should really be in bed Chris
  19. it is often the simplest of things. Please mark this as solved if that as the case so that we others know not to spend time reading solved questions. Chris
  20. Hi, I would suggest that you make an array of menu items like this: $menu=array(); $menu[home.php]="Home"; $menu["example.php"]="Example"; $menu["contact.php"]="Contact" etc. Then loop through the array to create the html: foreach($menu AS $url=>$txt){ echo '<a href="'.$url.'"'; if($url==$_SERVER["REQUEST_URI"]) echo ' class="active"'; echo '>'.$txt.'</a>'; } Not tested that code but it should work. Chris
  21. Hi, you have this: foreach($_POST["ProductInfo"] as $value) { $productinfo = "$value\n"; } The code is looping through the array ok but is then overwriting the $productinfo variable with the $value on each pass. That is why you end up with only the last one. You need to "add" to the variable rather than assign the value. You can do this like this: foreach($_POST["ProductInfo"] as $value) { $productinfo .= "$value\n"; } Simply by adding the "." in there you are now adding to the variable rather than reassigning it. Chris
  22. the only other script is the standard ajax one What do you mean by "the standard ajax one"? From the code that you have pasted there are several problems: The link calls a ajaxLoader() function that is not defined in the js code that you have pasted. You have a function called onclick(), whilst probably not the cause of your problem, I am not sure that this is a good name for a function. How and where is this function onclick() being called? it is certainly not being called by the link... unless the misterious ajaxloader() function is calling it.... Without seeing the complete picture, it is very hard to see where it is going wrong. Chris
  23. Hi, You could use the php json_encode() function. $sql_nw = "select * from sit_details_tmp where id_site =" .$_GET['s_id']; $rec_nw = mysql_query($sql_nw) or die(mysql_error()); $num_nw = mysql_num_rows($rec_nw); // --------------- Display list of users -------------------------------// $rec_nw = mysql_query($sql_nw) or die(mysql_error()); $url_array=array(); while($rs_nw = mysql_fetch_array($rec_nw)) { $url_array[]=$rs_nw["Url"]; } This creates a normal php array, now add it to the javascript and convert it using json_encode(): <script type="text/javascript"> ... your javsacript code var sitename=new Array(<?php echo json_encode($url_array); ?>); </script> Chris
  24. Hi, this is not a domain problem (at least it isn't now, I didn't look earlier) On that initial url that you posted you have 2 seperate problems. Firstly the database connection isn't working Secondly the code can't find the function browseitems() Regarding the database. Assuming that you have set it up on the new server and have copied the data over from your previous server, you need to check your connection data (username, password and database name) If the database on your new server was set up by the administrator, it is quite possible that this now has different connection values from your previous one. Somewhere in your code there is probably a file where these are defined. You need to locate that file and make any changes. The second error looks to me to be due to a missing file. If you check your index.php file in the browser, you will see a different error message reffering to a different missing function mysqlerror() . I suspect that you have a file where these functions are defined and, either it has not been uploaded to the server or the path to the file is incorrect. Sorry to no be of more help, without seeing the ftp and all the files it is impossible to be more concise. Chris
  25. Hi, The code that you have posted so far is not showing the complete picture. Can you post the *complete* source code (as output by the browser)? And any relevant external js file contents. Chris
×
×
  • 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.