dennismonsewicz Posted May 22, 2009 Share Posted May 22, 2009 I have the following code: <?php if(isset($_POST['submit'])) { $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; if($name == '') { $submit_msg = '<span class="errormsg">'; $submit_msg = 'There was an error processing your submission. Please try again!'; $submit_msg = '</span>'; } else { $submit_msg = '<p>Test</p>'; } echo $submit_msg; } else { ?> <form action="contactus.php" method="post" id="contactUsForm"> <p> <strong style="color:#ff0000;">*</strong> <i>is required</i><br/><br/> Name:<strong style="color:#ff0000;">*</strong><br/> <input type="text" name="name" id="name" class="fInput" style="width:300px;"/> </p> <p> Email:<strong style="color:#ff0000;">*</strong><br/> <input type="text" name="email" id="email" class="fInput" style="width:300px;"/> </p> <p> Message:<strong style="color:#ff0000;">*</strong><br/> <textarea rows="6" cols="50" class="fInput" style="width:300px;" name="message" id="message"></textarea> </p> <p> <input type="submit" id="submit" value="Submit" name="submit" /> </p> </form> <?php } ?> $submit_msg is not displaying for some reason... any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/159318-solved-error-message-not-displaying/ Share on other sites More sharing options...
MadTechie Posted May 22, 2009 Share Posted May 22, 2009 $submit_msg = '<span class="errormsg">'; $submit_msg = 'There was an error processing your submission. Please try again!'; $submit_msg = '</span>'; should be $submit_msg = '<span class="errormsg">'; $submit_msg .= 'There was an error processing your submission. Please try again!'; $submit_msg .= '</span>'; Quote Link to comment https://forums.phpfreaks.com/topic/159318-solved-error-message-not-displaying/#findComment-840261 Share on other sites More sharing options...
dennismonsewicz Posted May 22, 2009 Author Share Posted May 22, 2009 Problemed solved lol... its been too long of a day. TKS! Quote Link to comment https://forums.phpfreaks.com/topic/159318-solved-error-message-not-displaying/#findComment-840263 Share on other sites More sharing options...
MadTechie Posted May 22, 2009 Share Posted May 22, 2009 LOL, yeah had those! Quote Link to comment https://forums.phpfreaks.com/topic/159318-solved-error-message-not-displaying/#findComment-840268 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.