Jump to content

TOA

Members
  • Posts

    623
  • Joined

  • Last visited

Everything posted by TOA

  1. // here's your normal mail call to manager mail($manager_email, $manager_message); // here's your conditional call if (isset($_POST['checkbox_name'])) { mail($assistance_email, $assistance_message); } You just need to see if the checkbox is checked and if it is send another email. That's what I meant. Sorry, I'm having a hard time being clear today
  2. Yep, edited my answer as you were typing
  3. From the manual Just add a conditional that only adds it if your box is ticked. *Edit - after reading the whole post again () you'll need to just make a second mail call to use a different message, but the conditional part would remain the same - if it's ticked, run a second call to mail().
  4. Although I don't really see a question in here, I will say you could use str_replace to remove the excess spaces, but the better solution IMO would be to find out why it's adding them in the first place.
  5. Looks like you forgot a ; after EOD
  6. I only read his first post and his last comment about the html. Jumped the gun. My bad.
  7. That or wrap it in a function so it's re-usable. But as far as I can tell that's not what your original question was. Maybe I'm reading it wrong
  8. HTML is not case-sensitive. For example: <A HREF... is the same as <a href ...
  9. PHP runs server side so the validation happens when the data is sent to the server. You could do this in your current script, or you could have the form post to a separate script (ie: process.php) which then calls the mailer when validation is complete (This would be the option I suggest). If you want to keep in in one file, look at this thread on how to structure it properly. The topic is different, but the info is still relevant for your questions about structuring a php file. To validate, there are built in functions such as empty(), isset(), etc that will make it easier for you. Just loop through all the fields you need required making sure they're set or not empty depending on your situation. For example, text fields are sent to the server no matter what, so empty would work for this. Radio buttons only get sent if something is checked, so you can use isset for this, see what I mean? Hope that helps
  10. Also, you should be storing the actual image to your server and just the path to it in the db.
  11. I'm going to use that in one more last ditch attempt to sway the un-swayable. Wish me luck. At least I have a good idea of what to do if I can't convince him. Thanks.
  12. I had thought about doing it with cookies but was worried about anyone who has them disabled being looped to death Some of our clients are in the manufacturing and education industries which are slow to adopt and generally strict with their policies. I checked what stats we have available inhouse and online and from what I can tell by comparing numbers, most of our users are getting logged by google analytics which would infer javascript enabled which would infer (to me at least) cookies enabled, so I think yours may be the more efficient route. I'm going to try some things out and see if I can make your snippet work for me. Thank you very much for the help.
  13. Ummm, well, that's not quite what I was going for; it would only replace the index on the first visit to the site (each time). Obviously I missed the mark So if they came to the site the first time, they'd get the splash page. Once they've been in the site, index would still be the home page. At least that was my plan. Maybe that's not a good plan... Does that make any more sense? The thing that was puzzling me was that with the above code, some people would get caught on the splash page but others wouldn't; so it was kinda working, but from what I gather it was my logic.. Thanks for the help btw.
  14. Thanks, I do appreciate that because it does make my job impossible when his actions cause us to fall in ranking or things like that. I've already lost this argument to the owner though. He wants what he wants. In fact this is the second usability argument I've lost to his narcicism; nobody can tell him anything. So unfortunately I'm stuck. Unless you have some sneaky way of undermining him I need to make this work. Now that I think about it, his other company's website has a splash page too. Guess he just has a thing for them. I'm going to go at this again today, got pulled away, so if anyone has any ideas on where I was going wrong with that .htaccess file, I'd still love to hear it. Thanks.
  15. Well, turns out that even the original code I posted causes a loop for some people. It seems like it's on IE9 only but I don't get completely consistent results because of the index.php thing (I think). I'm just going to start over I think. Does anyone have any ideas why that code was incorrect? It looked right to me..
  16. I guess that didn't work, forget I said that! For some people, they get stuck on the splash page with that last rule in place. Not sure why it would work for some users but not others, but that's what is seeming to happen. So I guess I'm back to needing help
  17. Adding # # map all requests for index.php to the domain. # RewriteRule ^index\.php$ http://www.domain.com [R=301] seems to have done it. Please, if anyone sees a problem, let me know.
  18. I'm trying to set up my htaccess to support a splash page (I know, I know; I have no choice in the matter). What I'm trying to accomplish (in english) is this: "If the request is for the home page, either in the form of www.domain.com or www.domain.com/index.php, rewrite it to the welcome url" Here's what I have so far, which works, but only targets www.domain.com. I can't get it to also target www.domain.com/index.php Options +FollowSymLinks RewriteEngine On # # Make sure we use the full url # RewriteCond %{HTTP_HOST} !^www.domain.com$ RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301] # # If target is index # RewriteCond %{HTTP_HOST} ^www.domain.com$ # # And referrer is not our own # RewriteCond %{HTTP_REFERER} !^http://([^.]+\.)*domain\.com # # re-write to splash page # RewriteRule ^$ http://www.domain.com/misc.php?page=welcome [L,R=301] I've tried a few things with no luck, the most recent being RewriteCond %{REQUEST_URI} ^index\.php$ Any help is greatly appreciated. Thanks for reading everyone.
  19. $cur=(mysql_fetch_row); This is line 4...you're calling this function incorrectly.
  20. for ($i=0;$i<$pagecount;$i++){ $n = $i+1; echo 'Book Title '.$n.': '.$BookTitle[$i].'<br />'; }
  21. [rant] Beggars can't be choosers. If you ask for help, you have to accept the criticisms also. Sorry to jump in on something that is not my business, but I truly get tired of reading posts like this. Nothing personal hunna03, you sound like you can put a thought together. I just get tired of reading how the help people received wasn't what they wanted to hear. Tough. And no I haven't run out of cigarette's. I'll butt out now. [/rant]
  22. What about collabo's? Wouldn't you want it searchable by both artists? Normalization is also about knowing when to de-normalize. I definitely agree that you need to re-visit your structure.
  23. If I understand you correctly, try this: array_diff That doesn't mean others won't help if he makes an attempt.
  24. From the manual: You only need the first result so it just grabs the first one and returns it to the function called. But since it LIMITS to 1, it seems kinda pointless to me, but I just glanced at the code so there might be something I'm missing.
  25. While I understand the desire for this, just to be a smart ass I feel I have to say: doesn't that defeat the purpose of random?
×
×
  • 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.