Jump to content

sKunKbad

Members
  • Posts

    1,832
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by sKunKbad

  1. Do you mean you are trying to strip the links out of an existing HTML document?
  2. Without seeing your page that has the DOCTYPE in it, it would be hard to say what is causing the error. If your localhost server doesn't have an email MTA installed, you might be getting your error because the server doesn't know what to do. I get a different error on my localhost when I try to send mail, but an error is an error.
  3. I cant read it, but one of the links in the home page seems to go to a completely unstyled page.
  4. I'm using FF3.5 on a Mac, and the lower area doesn't line up with the top area. It is shifted to the left by about 2 cm.
  5. I've been a "super moderator" of a vBulletin form before, and I hate it. I think this forum is fine the way it is.
  6. You have a bad query. Try running it directly on MySQL or phpMyAdmin and see that it is bad.
  7. Without even trying to understand the dynamics of how sessions work in php, all you have to know is that there is an array which you can store data, and that array is $_SESSION. This array is available to you anytime session_start() is placed before any output to the browser. If you don't know how to work with arrays, your chances of using sessions are limited at best.
  8. So you have a bad query. I really can't help you with your complex query, but when you figure out what is wrong, you will have your problem solved. Maybe head over to the MySQL forum and ask...
  9. I was suggesting putting that in your code, right before your foreach statement. If your query is even returning anything at all, you would be able to see it.
  10. what does var_dump($jobs); output ? var_dump($jobs);
  11. You won't be able to do this with any of the built in template tags. You will need to either find an existing plugin, or create a plugin for this. One thing that would be easy would be to look for the plugin that allows you to write php in a sidebar widget, and then connect to your database and retreive specific posts as you prefer. You say Wordpress is "Amazingly simple", but it really isn't when you need something that it doesn't do, and that there is no plugin for.
  12. You start the session on any page that requires storing or retrieving data from the session: <?php session_start(); You can then use the $_SESSION array for whatever you need. <?php //store data $_SESSION['my_key'] = 'my_value'; //retrieve data $data = $_SESSION['my_key'] ; //delete unset($_SESSION['my_key']); This $_SESSION array is saved on the server, and the cookie that is put in the user's browser identifies them to use the session that belongs to them. If the user doesn't have cookies enabled, then there is sometimes a fallback to the session ID being placed in the URL, but this isn't the best thing to do.
  13. I think you are making this too complicated. You could have the form post to the same page, and process on top. if($_POST) { // do validation and output error or thank you message } if(!$_POST OR $error) { // show form echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; // form elements go here echo '</form>'; }
  14. I'm pretty sure that error means that your query was bad. Try running your query directly on MySQL or phpMyAdmin and see what you get.
  15. OK.... I just don't know. It's hard to diagnose because there are quite a few things that look wrong. I think you should run your query directly inside MySQL or phpMyAdmin, and see if you are getting what you expect. Also, until you validate the output of your exam, your form itself could be messing up what you think is perfect. Maybe somebody else will chime in.
  16. Yes, this is probably where your problem comes from. I just want to add, that this exam system would be fundamentally flawed, because if the user simply views the source code, they would have all of the correct answers. If it matters, it should be changed. When I have created an exam in the past, the questions, answers, and scores were held in an XML file, and then parsed with SimpleXML for question and answers retrieval, and also for scoring. This makes changing the questions, answers, and scoring easy too. An instructor can just create a new XML file, and the new test is ready to go.
  17. If you look at the result of your database query, you must have skipped 1 and 9, and there is now a 21 and 22. Also, your opening form tag needs to be above your while loop, and the closing form tag needs to be before your closing table tag.
  18. In correct_exam.php, you are checking for the value of $_POST[1], but there is no key [1] or [9] in your var_dump: array(23) { ["timer"] => string(0) "" [19] => string(1) "a" [13] => string(1) "a" [5] => string(1) "a" [4] => string(1) "a" [10] => string(1) "a" [14] => string(1) "a" [21] => string(1) "a" [12] => string(1) "a" [22] => string(1) "a" [20] => string(1) "a" [18] => string(1) "a" [7] => string(1) "a" [16] => string(1) "a" [8] => string(1) "a" [11] => string(1) "a" [2] => string(1) "a" [15] => string(1) "a" [6] => string(1) "a" [17] => string(1) "a" [3] => string(1) "a" ["now"] => string(0) "" ["viewexam"]=> string(3) "yes" } Your score was 90 You also have a key [21] and [22]. Did you notice?
  19. what does var_dump($_POST) output?
  20. You could define something in the script that includes or initializes the script you want to protect, and then check for it at the top of that script. core.php <?php define('CORE_LOADED',1); include "protected.php"; ?> protected.php <?php if(!defined('CORE_LOADED')) exit('No direct script access allowed'); ?>
  21. Is there a $_POST[0] ??
  22. So, what's your question? If you want to have good validation, why not try formmail from tectite.com
  23. what happens when you var_dump the post array at the top of the code?
  24. I have a 1024 x 600 screen res, and get a horizontal scroll bar with this design, when it really shouldn't require one. I also see nothing but the banner and menu when loading the page. To me, the banner is a bit too large in height.
  25. If you use a good text editor, you can set it to search through all of the files in your site, and find the link. Wherever it is, you should be able to find it. If you were hacked, it could be in an include, or even in an .htaccess file.
×
×
  • 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.