Jump to content

JonnoTheDev

Staff Alumni
  • Posts

    3,584
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by JonnoTheDev

  1. if($row['absencetype'] == "sick") { $sick = $sick - $temp; $result = "UPDATE tea_tbl SET sick='".$sick."' WHERE LastName = '".$row['LastName']."' AND proc = 'no'"; mysql_query($result); $result = "UPDATE tea_tbl SET proc = 'yes'"; mysql_query($result); }
  2. You need to add it to the hyperlinks for the next / prev page links i.e. http://www.hockeyleaks.com/index.php?pageNum_messages=1&totalRows_messages=195 becomes http://www.hockeyleaks.com/index.php?pageNum_messages=1&totalRows_messages=195&page=index
  3. http://www.phpclasses.org/browse/package/3611.html
  4. http://www.tizag.com/mysqlTutorial/
  5. The fact is whatever.php?id=1&var=0 is a valid url. Forget any HTML validator as you are not passing html through urls. What I would recommend would be to rewrite these urls using mod_rewrite making them search engine friendly. An example of /whatever.php?id=1&var=0 /whatever/1/0
  6. Also your varable $absencetype will contain no value as you are not returning any data from your query. If you are expecting more than 1 record to be returned from your query you must loop through the results: $sql = SELECT halfday, absencetype FROM attn_track; $query = mysql_query($sql); while($row = mysql_fetch_array($query)) { $temp = $row['halfday']; if($row['absencetype'] == "sick") { } }
  7. One problem you are having is that you are setting values in your conditional statements instead of comparing them Operator = Sets a value == Compares a value if $absencetype = "sick" Should be if($absencetype == "sick") Ammend all your operators http://uk2.php.net/manual/en/language.operators.comparison.php
  8. There are loads of free scripts that can do this. You could use an article directory script http://www.articledashboard.com/download.htm http://www.interspire.com/websitepublisher/ http://www.articlefriendly.com/
  9. & is not a valid url parameter. you must use & in order for values to be passed. page.php?a=1&b=2&c=3 print $_GET['c']; Use php to validate data instead of javascript. If javascript is disabled then your data will never be validated
  10. Try this http://www.nil.clan-hosts.net/cycsoftware/modules.php?op=modload&name=News&file=article&sid=2&mode=thread&order=0&thold=0 Also use http://www.hotscripts.com and search for 'soccer' within the PHP category
  11. You require a language table i.e. language ========= languageId title 1 = english 2 = spanish Your stories table stories ========= storyId languageId title story So the story needs to be entered in both languages. I would run a loop on the languages table so adding a new story requires entry of 2 titles and 2 text. When a user clicks to view the site in spanish then you could set a cookie to the languageId value i.e. 2. You then select the stories where languageId=2
  12. Never use global variables! This is a cardinal sin and in the top 10 don't dos. Global variables lead to unexpected results when a function call alters variable values outside of its scope. Always pass values into functions whether in a single variable or in an array.
  13. Your variables are outside the scope of the function. They must be passed in: function indiv_user() { if($country == "us") { function indiv_user($country) { if($country == "us") { Function call indiv_user($_POST['country']);
  14. $date = "2008/10/12"; $x = strtotime("-1 day", strtotime($date)); print date("Y/m/d", $x);
  15. Put the variables into an array and pass them in within 1 parameter. Also why would you need so many variables within a function? Functions are for taking in data and returning a result. This could be a new value or an array of values. They are not designed and should hardly ever be used to modify the values of variables outside the scope of the function (for this job you would pass variables by reference). You will end up with unexpected results on your page without knowing the cause.
  16. You should pass parameters into functions not set variables as global otherwise there is no requirement for a function.
  17. Do you mean you want to submit a story to fmylife.com remotely? If so you can use CURL to write a submission script.
  18. Doubt it. If all you are doing is scraping links (like a spider) contained in href html tags then a simple bit of regex will suffice.
  19. Bit hard to understand you but i'm guessing that you are trying to use an object of class Rate in class B2A. If you need to keep the rate object persistent then store it in a session. session_start(); $rate = new Rate(); $_SESSION['rate'] = $rate; Then on whatever page you create an instance of B2A you can pass the rate object in to one of its internal methods or even the constructor. session_start(); $obj = new B2A(); $obj->doSomething($_SESSION['rate']);
  20. Stick a captcha on it http://recaptcha.net/ Nothing to do with your email address. A spammer will just post loads of spam messages into the contact form. You will end up with tons of garbage in your inbox. Also if your form sends an outbound email to the address entered in the email field on the form then this is spam heaven.
  21. When editing a post, your footer banner ad covers the save button so you cant click it. Sometimes refreshing moves it out of the way. Using IE 7. Not a major issue.
  22. I wouldn't say you have a bot problem on the index page of that website as there are no resources to exploit. However your contact form is wide open to spam!
  23. What is your website URL?
  24. Easy. Just use the mysqldump program. This can do entire databases, single tables, etc http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html
  25. Could be. User agents can be masked. You would never know if it was a bot unless the bot writer set the agent name like google do (googlebot). I would say that a clever bot writer will use a valid browser agent. From your logs you should be able to see the pages accessed. If it looks suspicious then block the IP addresses. As you say there are a range then it is likely that they are a set of proxy addresses.
×
×
  • 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.