Jump to content

jcbones

Staff Alumni
  • Posts

    2,653
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by jcbones

  1. You could hit the server with some jquery AJAX to check if there is new messages. This way you aren't reloading the whole script, and you can hit it every x amount of seconds you want.
  2. You are not assigning your variables correctly. There is a distinct difference between the way the first 4 variables are assigned, vs. the rest of them. Everything you need to know about PHP variables!
  3. I always set up my paths in my constants. This way if you are changing directories, you only have to change it in one file to affect the whole site. Example: define('PATH',$_SERVER['DOCUMENT_ROOT']); define('SITE','http://' . $_SERVER['SERVER_NAME']);
  4. Example: UN-TESTED foreach($tournament as $round => $games) { foreach($games as $game => $teams) { if($teams['s1'] == -1 || $teams['s2'] == -1) { continue; } echo 'Round: ' . $round . '<br />Game: ' . $game . '<br />Teams: ' . $teams['c1'] . ', ' . $teams['c2'] . '<hr />'; } } Your array should be in a variable named $tournament;
  5. Where is the difference between this line: var $Link_ID = 0; and this one: var $Host; swagpixels.com, Also, note that this is a very old class, and should be dropped for the mysqli extension, or the PDO class.
  6. You should have a data handling script, that returns a json encoded array. It's the way I would do it. As MVC all interacts together, it would work the same as a regular request, it is just that the request isn't loading a new page. It is just getting the data, and inserting it into an existing page.
  7. I would go with 755 unless you are assigning FTP users, then use 775 making sure the FTP user is in the proper group.
  8. I would suggest the DateTime Class.
  9. Disregard that advice, there was nothing wrong with how you had it written. The problem isn't even in that page. It is a parse error, on line 4 of edit2.php, so post the contents of that file... in [ code ] [ /code ] blocks.
  10. On second look, I see the problem. Your variable names under /*Gather Data*/ doesn't match your variable names under $body.
  11. The problem is the user data submitted by the form, so we need to see what the datesd.php page is getting from the form page. So add this to the top of your datesd.php page. <?php //DEBUGGING echo '<pre>' . print_r($_POST,true) . '</pre>';
  12. The repeating code isn't coming from the database. I would look at the plug in, or how the template is called.
  13. You could use glob, and it will only pull files of a specified type. EX. $path = '../images/services/'; $image = glob($path . '*.jpg'); //only files that end in jpg if(is_array($image)) { foreach ($image as $filename) { echo $filename . '<br />'; } } else { echo 'No jpg images!'; }
  14. You would have to include the form for us to get that one. I would think it has something to do with the naming of your phone number boxes. I will go a little further and tell you that you have opened yourself up for database injection. You need to look into sanitation and validation.
  15. Make you two images, one as a check, and another as an x. Then retrieve the results of your minecraft check, as they have made it easy. if the contents return true, then display the check, and if it is false, display the x. <?php if(isset($_GET['username'])) { if(file_get_contents('https://minecraft.net/haspaid.jsp?user=' . $_GET['username']) == 'true') { echo '<img src="check.png">'; } else { echo '<img src="x.png">'; } }
  16. Here you go: $mail_from=$_POST['customer_mail']; //$header=$_POST['mail_from']; //no good 'mail_from' doesn't exist in the $_POST array, but it does exist as a variable. $header = $mail_from; //good.
  17. http://www.amazon.co...8&nodeId=508088
  18. You should store all data as the user has entered it. Then run it through htmlentities (with the ENT_QUOTES flag) before displaying.
  19. What is your first query. I'm sure you could get a join written for you that would be better, and lead to less confusion, or collision.
  20. For ajax, you would send a token that is preset by the server, and checked on page request.
  21. Pro's = You get data that you didn't work for. Con's = Most websites ban it in their TOS. The easiest way to do it IMHO is Simple HTML DOM parser.
  22. By "machines timezone" do you mean the client, or the server?
  23. Your honeypot should NOT have a value, it should be empty, as the spambot may not change values that already exist. You should also be hiding it via a css external file, and not an inline style. As some spambots may read inline styles, but not load external css files. You shouldn't name it 'botcheck' either, as some spambots may look for any type of botchecks. I typically name mine either address2 or email2, leaving the value empty, and steer away from any class definitions that hint at any kind of checks being run on that input. All you have to do scripting wise, is make sure that the honeypot is passed as an empty value.
  24. I shoulda grabbed a bag of popcorn before reading all these replies!
  25. You need to find out where $text comes from, it is most likely empty, or a string.
×
×
  • 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.