AT Web Results, Inc

Software Support Forum

Return to AT Web Results Website
It is currently Thu Sep 09, 2010 5:25 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: not able to use php to error submit
PostPosted: Fri May 16, 2008 1:47 am 
Offline

Joined: Fri May 16, 2008 1:32 am
Posts: 2
Hi Love the editor once I get the images and pdf's to load correctly - path is correct. But I always use php code to stop a form from being submitted without anything entered.
Now I use Dreamweaver and php 5 and this is what I usally do:
At the top of page:
Code:
if (array_key_exists('button', $_POST)) {
$desc = trim($_POST['about_desc']);
if (empty($desc)) {
$error['about_desc'] = 'Please put in description or it will be blank';
   }

The name of the textarea of the wysiwyg.
Then at the start of the insert form code:
Code:
if (!isset($error)) {

Then at the end of the insert form code:
Code:
$_POST = array();
}


Then at the top of the form of the texarea:
Code:
if ($error) {
  echo 'Please complete the missing item(s) indicated.';
  // remove escape characters from POST array
if (get_magic_quotes_gpc()) {
  function stripslashes_deep($value) {
    $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);
    return $value;
    }
  $_POST = array_map('stripslashes_deep', $_POST);
  }
  }

And in td of the textarea:
Code:
<?php if (isset($error['about_desc'])) { ?>
              <span class="errmsg"><?php echo $error['about_desc']; ?></span>
              <?php } ?>


This works for all my forms of which I have plenty. Can you please guide me as to what is happening here with the wysiwyg?
I have people waiting for their admin and they can't use it if it isn't working.
Thanks
appreciated any input.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours



Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group