Jump to content

MainStWebGuy

Members
  • Posts

    59
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

MainStWebGuy's Achievements

Member

Member (2/5)

0

Reputation

  1. Dear all powerful and all knowing Jacques, I don't know much, as i'm a noob (stated earlier), so calm down lol. I appreciate your feedback and will look into alternatives. thank you hail, long live, blah blah
  2. I'm hoping to receive tips or hints as to why it might be failing. I, of course, try to fix any and all bugs before launch through multiple rounds of testing, but, as i'm sure you know, that doesn't always cover everything. I was hoping to add some code that will, in the event of the form not sending, at least get a clue as to where to start looking.
  3. Awesome info, and thanks mac_gyver - can you give me a simple code example (I'm a noob man ) would i just do something like .... ... $failedMessage .= $php_errormsg; $failedMessage .= $ErrorInfo; ... something like that?
  4. Thanks Ginerjm I haven't checked into phpmailer in a while, and now i'm wondering if my host already has it as an option for me... i'll check into it. I guess i was wondering if there was a way i can collect php error(s) and send them along in the email, just like how i can "echo" them to the screen while i'm developing to help catch random mistakes in my code. Thanks again! Jason
  5. Hello all, I have a couple of simple php mail forms i use on a couple sites for sending basic contact information in email form when submitted. The code is pretty simple, and i use an IF statement to check to be sure the email has been sent, and if it fails, I am notified by email: #send the email if(mail($to, $subject, $message, $headers)) { ... send confirmation message... } else { #notify webmaster mail($toWebmaster, $failedSubject, $failedMessage, $failedHeaders); } My question is... in the $failedMessage, is there a way i can include any error information on why the form might be failing? If so, how would i do something like that? Thanks in advance, Jason
  6. Hello all, I came across something that's got me stuck: According to phpinfo(), my loaded phpp config file is in c:\Program Files\PHP\php.ini which is cool. Also in phpinfo() it says that my file_uploads are off. I wanted to turn them on so i went to the php.ini located in c:\Program Files\PHP\php.ini and fif a Ctrl+F for "file_uploads." The weird thing is that the php.ini shows that uploads are turned on. I did a search for any other php.ini files on the machine but can't find any more. Any ideas of how this could be happening? PS - file uploads are not currently working.
  7. AH HA! like i said... i am mildly retarded today... i'm going to go smack myself in the face, then move the variables inside the if statement that checks if submit was pushed... THANKS! Jason
  8. Hey guys, sorry to bother, but i'm brain dead today. I have a very simple script that i can't seem to get working. I am just generating two random numbers and asking the user to input the answer (spam check thingy), but i can't seem to get it going... here's what i'm using: <?php $a = rand(1, 10); $b = rand(1, 10); $c = $a + $b; ?> <p>Solve the problem to prove you're human:</p> <?php if(isset($_POST['submit'])) { $answer = $_POST['answer']; if($answer == $c) { echo "Correct!"; } else { exit("<p>Answer incorrect. Please hit back in your browser and try again</p>"); } } else { ?> <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post"> <p><?php echo $a;?> + <?php echo $b;?> = <input type="text" name="answer" size="3" /></p> <input type="submit" name="submit" /> </form> <?php } ?> could anyone please set me straight? thanks in advance! Jason
  9. Thanks again for the insight on this guys, The last comment did the trick (my syntax was wrong).
  10. Sure thing: <?php if(isset($_POST['sendRequest'])) { $fleet = $_POST['fleet']; $contact = $_POST['contact']; $time = $_POST['start_month']." ".$_POST['start_day'].". ".$_POST['start_hour'].":".$_POST['start_minute']." ".$_POST['amPm']; $unit1 = array('Number' => $_POST['unit1'], 'Year' => $_POST['year1'], 'Make' => $_POST['make1'], 'Model' => $_POST['model1'], 'Glass' => $_POST['unit1Glass']); $unit2 = array('Number' => $_POST['unit2'], 'Year' => $_POST['year2'], 'Make' => $_POST['make2'], 'Model' => $_POST['model2'], 'Glass' => $_POST['unit2Glass']); $notes = $_POST['notes']; $msg = "Fleet: $fleet. Contact: $contact\n$unit1['Year'] $unit1['Make'] $unit1['Model'] $unit1['Glass']\n"; if(isset($_POST['unit2']) && $_POST['unit2'] != '') { $msg .= "$unit2['Year'] $unit2['Make'] $unit2['Model'] $unit2['Glass']\n"; } if this isn't enough code, i'd be happy to show whatever else might help. Thanks again!
  11. haha sorry i guess that info would help out... I'm getting an error on the line containing that code snippet "Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in...blah blah blah"
  12. Hello everyone, I am trying to get values from some input forms and put them into an array but I'm not getting it. I would like to store some vehicle information that a user enters in a simple for in an array so i can use it in my app, but i think i'm screwing up the syntax... what am i doing wrong? $unit1 = array('Number' => $_POST['unit1'], 'Year' => $_POST['year1'], 'Make' => $_POST['make1'], 'Model' => $_POST['model1'], 'Glass' => $_POST['unit1Glass']); any insight, advice, hysterical comments encouraged and appreciated
  13. Still can't get this thing going... can anyone shed some light on this at all? thanks again in advance! J
  14. That makes a lot of sense (to me i think) and seems to simplify the code a bit. Thanks! However, I'm still having the same issue... the form process, but outputs nothing. The new attachment contains the updated code... Is this what you were talking about? [attachment deleted by admin]
×
×
  • 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.