Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. So - now that we're past that - can you post the code you last tried along with the contents of the vars used to send the mail? You went wrong somewhere if you had to resort to calling the mail() function twice.
  2. Well said mac_gyver!!
  3. Since you can't read English - or are afraid of manuals - you probably did screw it up. Either show us the code you tried (with an echo of the values used) or don't bother the people here with your attitude anymore. You made one of the most respected members here ignore you - that's quite an accomplishment for a newcomer. Says a lot about you
  4. The $_POST array is created when you submit a form whose method is set to POST. The script mentioned by the same form's action attribute gets control and receives the elements of that form in the POST array. Your script is doing something with that data and then you want to save some subset of that data I presume so that you can use it later after another form is sent out and returns with new POST data. In order to save data you can : 1 - save fields as type='hidden' on the second form so that you will receive them again 2 - save the data from the POST fields in a session var. You can save them individually or as items within an array To save vars as session vars you simply say "$_SESSION['varname'] = (whatever var/value you have to save)". If the var you want to save is an array then the SESSION var will be an array. Session vars will last as long as the current session lasts. If you are not yet using sessions, you should read up on them in the manual, but simply put - if you start each script with "session_start()" you will open the session and have access to whatever you have previously saved in that session.
  5. Unless an element exists on the form that triggered THIS script on submit, you will not have an element named 'service' in your post array. Perhaps you want to save the data from that previous page in a session array rather than a post array.
  6. As I surmised from my look at the code - your form doesn't have an element named service in it. Look at your entire form's html and be sure that you have that element to solve this error. I see an element in your last post named service, but it is not an array as you seem to expect since you use the count() function on it.
  7. Maybe I'm looking at your code wrong. Can you post line 91 here?
  8. Half you site disappears? Or half of your current page? Line 91 is telling you that you have no input element named 'service' in the form that you submitted.
  9. I thought he meant it was too hard to read the manual....
  10. Well, keep scratching.
  11. We can solve your problem right now but then when you have another problem, where will you be? Read the manual where it discusses how to use the mail function and you will be as smart as us when it comes to using mail().. Where will that put you? You make it sound like such hard work.....
  12. It would help if you posted some code since that's what we do here - help people fix their code, not write their systems. Hopefully you write code better than you write English. I counted 4 spelling errors, and a half dozen punctuation errors (important not to do with PHP) and a slew of grammatical errors.
  13. ok - so what do you want to do? Look for stop words in the input and echo them back to the user? Why?
  14. Or maybe the OP could modify his own code now that someone debugged it for him?
  15. As Mac_gyver aptly pointed out you are confusing yourself with your coding practices. Separate the php from your presentation code (html) and handle the inputs and functions to run the query upon receiving the proper submit from the form. What you have shown us is impossible to understand and I'm sure it is not making much sense to you as you try to figure out what is wrong. As for your execution problem, I think your confusion is that you have created a button to trigger the query but you don't have two things: 1 - a form to contain the inputs and to trigger the script to do your query 2 - a submit element to trigger the form. You are using a type='button' element expecting something to happen in php which won't occur until you submit the data via a form element. Unless you are planning on doing this thru JS and Ajax, which I highly doubt.
  16. Am I hearing that you want us to help you pull an email address out of the body of some text from the form? Basically, that the 'other' email address is not coming to your script as a distinct element that you can simply add to your headers? UPON FURTHER REVIEW: I see now that you are posting the other email value($Email) to the body of your mail. Assuming that this is after you have processed the form and are preparing to send the mail, you REALLY need to read the manual as I suggested to see where you ought to be placing that variable, assuming that you have properly vetted it as valid input.
  17. Could not the problems be the existence of <p>...</p> tags inside of table elements? Even more likely, the lines that include ONLY a </p> tag in a <td> element could be a problem. What is the point in using a p tag inside a td one? Seems like a lot of needless html, but of course the specs probably say it is much needed and that still confuses me.
  18. The php manual is pretty clear on how to send CC and BCC of your mail. Why not read it and get a handle on using mail() ? Example #2 is especially detailed regarding your needs.
  19. explode the string on the dots then compare the first element to a value and then the second element and so on. 168.192.12.21 would end up as array[0] = 168 array[1] = 192 array[2[ = 12 array[3] = 21 If you wanted to eliminate ips that look like "168.192.22.xxxx" you would compare the 0 element to 168, the 1 element to 192 and so on.
  20. And why is that? IF you are comfortable with trusting the address you are getting and wish to base your decision on it, then checking it against a list of 4 digit or 8 digit or 12 digit prefixes shouldn't be a problem.
  21. If you don't want certain ip s to be voting, then simply check before tallying the vote and send them back a nice message.
×
×
  • 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.