Forum Moderators: coopster
<?php
require_once "../include/Validator.php";
if ($HTTP_POST_VARS){
$validator = new Validator();
$validator->validateGeneral($HTTP_POST_VARS['page_no'], EDITOR_PAGE_NO);
$validator->validateGeneral($HTTP_POST_VARS['title'], EDITOR_CATEGORY_TITLE);
$validator->validateGeneral($HTTP_POST_VARS['fckeditor'], EDITOR_CONTENT);
if ( $validator->foundErrors() ){
echo '<b style="color:#C92E2A; font-size:12px;"> '. ERROR_PLEASE_INSERT .' </b> <br /><i>'.$validator->listErrors('<br>').'</i><br><br />';
}else{
require_once 'system_data.php';
$query = "select fname,email from newsletter where status='1'";
$result = mysql_query($query) or die(mysql_error());
if (0 == mysql_num_rows($result))
{
echo "<p>".SEND_EMPTY_SUBSCRIBERS_LIST."</p>";
}
else
{
if (isset($_POST['submit']))
{
while (list($full_name,$email) = mysql_fetch_row($result))
{
//////portion of code loads class and sets the email message along with sending it (NO IF ELSE STATEMENTS HERE)
}
}
}
echo "<b>".SEND_SUCCESS."</b>";
}
else
{
?>
<?php print "" . $_POST['fckeditor'] . "" ?>
<form action="<?php "" .$_SERVER['PHP_SELF']. "" ?>" method="post">
((((((((((REST OF MY FORM AND CREATES THE EDITOR INSTANCE)))))))))))
<p class="submit"><input type='submit' name='submit' value='<?php echo BUTTON_SEND ?>' class="buttons" /></p>
</form>
<?php
}
}
?>
The form submits to itself, and if there are errors I would like them to show along with the form again. General format for this should be right, but syntax isn't. I may need something near the bottom else, but I can't figure it out. Thanks!
I am really at a loss on this, and hopefully someone can help me with the exact code. Let me know, and I can post the code. Thank you.
I would encourage you to try that first, but if you are still stuck, by all means we have plenty of extra eyes around here to help you spot the issue.
Currently I use a combo of standard notepad, and dreamweaver 8. I use Dreamweaver more for the "design" view(used back in the static HTML page days LOL)...but it does have syntax highlighting but nothing outstanding for PHP. coopster I checked out your suggestion TextPad which by the screenshots looks like it could be a big help. It looks like the parenthasis and brackets are highlighted better to make them stand out more. Murdoch I also checked out your solution Notepad2 which looks like a powerful lightweight solution that offers custom highlighting.
Thank you both for the suggestions, I will certainly check them out. I'll see what I can come up with and post if I have additional questions, thanks again!