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? 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>'; 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! 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! 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
Archived
This topic is now archived and is closed to further replies.