Jump to content


Advanced Member
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by falkencreative

  1. You need to update your SQL query: $result = mysql_query("SELECT patientname,RN,IC,age,gender,race,discipline,dateofincident,timeofincident,dateofreport,monthofreport,namastaff,brief,action,status,namelocation,category FROM registerstaff,location,incident WHERE $searchtype LIKE '%$searchvalue%' and location.id=registerstaff.location_id and incident.id=registerstaff.incident_id"; to include "limit". Take a look at my SQL query from my pagination example code and compare the two.
  2. You'd need to use a SQL query that included "like", for search functionality (http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html#operator_like), with "limit" for pagination (http://php.about.com/od/mysqlcommands/g/Limit_sql.htm). Basically, you'd use the exact same pagination code you already have, just change the query to search using "like". See my last comment for direction regarding search.
  3. Check this section of your code, and compare it with my code -- specifically, the "get data from db" section. // check that the 'id' matches up with a row in the databse if($row) { // get data from db $Volunteer=['Volunteer']; My impression is that these lines: $Volunteer=['Volunteer']; need to be something like this: $Volunteer=$row['Volunteer']; (Check my code -- this is just off the top of my head.) The way you currently have it, you are passing in an array element, not giving those variables values from the database. As for search, that's a little outside the scope of the tutorial. You might want to check out http://www.webreference.com/programming/php/search/index.html, or do a web search for "php database search" or similar, and you should find some direction.
  4. I was bored, so I built this. It's a bit short on content, but it might be useful if you like journalling regularly? http://journal-prompt.com

  5. It is being floated properly, it's just getting "caught" on the middle column (see screenshot). I'm not sure exactly how you handle that... perhaps adding a min-height to help standardize the heights of the blocks? Or adding multiple media queries, adding "clear:both" to the correct items as the layout changes?
  6. You might want to check the dates on the questions before posting. This one was posted in 2011.
  7. You can do this with CSS and media queries -- no Javascript is needed at all. For the mobile navigation, you should be able to also do that with CSS, hiding or showing the appropriate navigation based on a media query.
  8. Your code is fine -- you just need to load jQueryUI, since this effect doesn't come by default with the regular jQuery library. Try checking the "jQuery UI 1.9.2" checkbox in the upper left corner, then running the code again.
  9. According to http://sitecheck.sucuri.net/results/us24meter.org, it looks like your website has caught some malware -- specifically, a line of Javascript that is causing the redirection. I'd suggest checking all the website files for: <script>window.location.href="http://www.chaquetas-espana.com/"</script> and removing any instances you find (or search just for "chaquetas-espana.com"). If you have trouble, or can't find it yourself, I'd suggest contacting your host, linking them to the above site check link, and seeing if they can help.
  10. Perhaps you can provide a link to the site, and the search terms you are using so we can replicate the issue?
  11. It depends on the browser the user is using, I'd imagine. In most cases, if a PDF is displayed directly within the browser (rather than downloaded and viewed in Preview or Acrobat), I believe the browser will likely default to making the PDF full width, potentially stretching it to fit.
  12. Can you use the Contact Form 7 plugin? That tends to be my go to option. Or do you have to do a non-plugin solution?
  13. Sorry -- super swamped with work at the moment. I'll try to reply tomorrow?
  14. I would start by looking at this line: $json_object = @file_get_contents('https://graph.facebook.com/' . $page_id . '/posts?access_token=' . $access_token); and removing the "@" to enable error reporting for the line. My bet is that it's possible that due to the way your server is set up, you can't use file_get_contents() on an external URL. Removing the "@" and re-running the page should hopefully give you an error to work with. If that is the case, see the "some notes" section of the tutorial (near the bottom). You'd need to go about retrieving this information in a different way -- likely through CURL rather than JSON.
  15. Have you tested the data at various stages in the code? For example, can you do a print_r() on the $json_object? If you don't have accurate access information, and if your URL is incorrect, you won't be able to display the information properly. If that is fine, have you checked $fb_data? Does that hold the values you expect it to? Based on your error message, I doubt that $fb_data is an array, and it's likely you have an uncaught error in retrieving the data. Are you following any specific tutorial for this functionality?
  16. One thing I noticed: $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "X-Priority: 3\n"; $headers .= "X-MSMail-Priority: Normal\n"; $headers .= "X-Mailer: php\n"; $headers .= 'From: SITE NAME Peace Movement <info@SITEURL.com>'. "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; Looks like the last line in the $header's section is unnecessarily duplicated. Dunno if that would have anything to do with it though. Have you tried sending a simpler message, for example: "test", and seeing if that comes through? Did this script recently stop working, or has it always not worked?
  17. If it's displaying wrong within EW4, but fine in the browser, then it sounds like it's a EW4 bug, not really an issue with your code. WYSIWYG style editors aren't always perfect, but as long as the browser shows the site error free, you're fine. In short, trust the browser your visitor's will be using, not EW4's (or Dreamweaver's, or similar WYSIWYG editors) potentially buggy preview. I would check the site in IE as well, just to make sure that there aren't any bugs there. I'm not sure if EW4 uses IE's rendering engine or not.
  18. Unless I'm misunderstanding you... I'd think you would want to split it into two pages: -- On the first page, you'd have your generated dropdown menu within a form. The user would then select from the dropdown menu, and press the submit button, which would redirect them to a new page using the form's "action" value -- On the second page, you'd retrieve the value from the dropdown by using $_POST, and display the results to the user. Hope that helps get you started?
  19. lol Seems like a long time ago.
  20. I believe you need to use session_start() in login.php as well -- before your $_SESSION line.
  21. @egcmx - Why don't you start a new topic, and post the code from that file? My rough guess would be that you might have a typo -- perhaps an unnecessary ?>, or you've mixed up a quote. Are you sure you have the file located in the right place? And XAMPP is running, and you are viewing the file through localhost?
  22. So if the server is running, can you left click on the WAMP icon and select "Localhost"? That should take you there.
  23. I'm not sure if Firefox is hiding the "http://" portion of the URL, but usually the localhost URL is http://localhost, or occasionally with the port number after like this: http://localhost:80 Are you sure you are running WAMP, and that the server is on? The WAMP program needs to be running, and the server should be online. You should see the WAMP icon in the bottom right near the clock if you are running the program. By left clicking on it, you should manage settings and confirm whether the server is online or offline.
  24. Can it be done? Yes, using a bit of PHP to collect and store the info in a database, or to email that address to an admin user. You might want to have some sort of system that doesn't force repeat visitors to enter their email multiple times -- maybe by setting a cookie or similar? Realistically though... I would suggest your friend reconsiders. I would bet that this plan will cause a huge drop in his traffic, and few people will be willing to provide their contact info (or he will end up with a list of fake addresses). If he wants o do this, he'd better have something on his site worth it. At least for me, if I found a site like that, I'd highly likely not enter my email and avoid the site in the future.
  25. You need a ";" at the end of this line: require_once('../functions/functions.php')
  • Create New...