Jump to content

scootstah

Staff Alumni
  • Posts

    3,858
  • Joined

  • Last visited

  • Days Won

    29

Everything posted by scootstah

  1. Do you have a PS/2 keyboard? If so, plug it in and boot up. If the numpad, capslock, and scrolllock keys all flash once then it has POSTed. When you installed the motherboard, did you use the brass standoffs on the motherboard tray? Did you make sure to only place them where there was a corresponding mounting hole in the motherboard? If you put one where there is no mounting hole, you will be grounding out the motherboard and it won't work properly. Does the video card need power? Did you plug that in? Are all the fans turning (especially the CPU)? Does the CPU heatsink appear to be seated properly? Just to be clear, you plugged in the 20+4 pin ATX connector (the big brick), as well as the standalone 4/8 pin CPU power, correct? They are not on the same connector, the 4/8 pin (if you even have it, which you should) will be located near the CPU socket. EDIT: Also, closely inspect all of the capacitors on the motherboard. They should be perfectly cylindrical, with a flat top. If any of them are bulging, or leaking it could explain the problem. Check the surrounding area of the capacitors for a brownish sticky residue, which would be a sign of a leaking electrolytic fluid.
  2. No, I think he was just demonstrating that it is in fact random.
  3. First, you should make the word list an array - it just makes more sense. $wordList = array( 'table', 'curtain', 'printer', 'guitar', 'piano', 'dragon', 'pack', 'bottle', 'shirt', 'picture' ); Then, you can use array_rand to pick a random word.
  4. Are you having trouble with something?
  5. It looks like he is using the loop to handle nested quotes. But I don't think it will work with the regex being used because of the lazy matches. The regex could use some work. I tested his code and it looks like you are right. And, nested quotes do work. Neat solution, I've never seen it done that way.
  6. Try sending a simple email, to make sure it is not some problem with headers or something. <?php echo mail('[email protected]', 'test subject', 'test message') ? 'success' : 'failure'; Save that to its own file and run it in the same environment as your other script (make sure you change the "to" email). If it reports "failure", try contacting your host for support.
  7. Are you running this code on a local WAMP/LAMP stack, or from a webhost? You need to either have a mail server configured or have an SMTP relay to send an email.
  8. I understand that, but that doesn't explain why you used a loop.
  9. And what is the syntax error?
  10. I don't understand your logic for the while loop, especially considering you are just replacing the $out variable each iteration. Also, I don't think it will work on nested quotes.
  11. For the else block you can just throw a simple echo in there to make sure it's firing. For the mail, something like this is fine: if (! mail($to_grp, $subject_grp, $message_grp, $headers_grp)) { echo 'mail failed'; } Note: that isn't a good solution for production, but it is good enough for development.
  12. Use nl2br when you display it to convert new line characters to HTML line breaks.
  13. AJAX is seamless to the client, but it is still an additional request to the server - meaning you would still need to connect to the remote server again for each request. So, what you need is a persistent connection that doesn't close when the script is finished. Check out pfsockopen.
  14. }else{ // if form is submitted post to the group $group_grp = $_POST['group']; $to_grp = '[email protected]'; $subject_grp = ''; $message_grp = $group_grp; $headers_grp = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to_grp, $subject_grp, $message_grp, $headers_grp); } Have you made sure this block of code is executing? And have you made sure the mail() function is returning true?
  15. $to_grp = '[email protected]'; Could it be this line? It looks like "group" is misspelled.
  16. So, what exactly is happening? Is the email being sent, but not with the expected data?
  17. Why don't you try it and see for yourself? The best way to learn something in programming is by experimenting.
  18. You have malformed HTML. You can't put table elements inside a textarea, and beyond that you don't even have <table></table>. EDIT: Actually, scratch that... I suppose you may have wanted the HTML as text, rather than markup. For clarification, what do you mean by the button "isn't working"?
  19. CSRF protection shouldn't be a big deal, it will just be created for the cURL request - just like a normal browser request. Also, cURL can work with cookies. The user won't actually be logged in to the site, but an action that requires the user to be logged in should still work from cURL.
  20. You need to use a while() loop. A foreach() loop is used to iterate through an array, and would only work if you only have one result to loop through. $query = mysql_query("SELECT * FROM table"); while($row = mysql_fetch_assoc($query)) { echo '<div>' . $row['column'] . '</div>'; }
  21. Why would you want to do that?
  22. No. cURL is a library that is used to connect to different protocols, like HTTP(S), FTP, etc. In this case, you would use cURL to send the POST data to Expedia's registration form. Expedia's own code would then process the request. It would be like if you manually entered all the data into the form and pressed submit.
  23. So, you want to execute your own code on Expedia's servers? I don't think that's going to happen. And no, you can't just send them XML or SQL, then they have to parse it/execute it. Probably, but the answer is basically the same as #1 - use an API (if Expedia has one), or cURL.
  24. 1. Yes, it is possible. If you're going to make an agreement with Expedia, find out if they have an API available - that would make things easy. Otherwise, you'll probably need to use cURL. 2. I'm a little fuzzy on this one, can you elaborate? What do you want to happen when you click a result?
  25. I don't think addslashes() is adequate enough to sanitize email headers. You need to strip the line-feed character, which could be hex encoded (0x0A).
×
×
  • 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.