Location: PHPKode > scripts > Comments script with pagination > commincls/form_add.php
<?php
// Sets variables with form fields that are defined according to permissions 1 or 0 set in "config.php"
$namec = isset($nameusr) ? '<input type="hidden" name="namec" value="'.$nameusr.'" /><label>'.$clsite['name'].'</label> &nbsp; &nbsp; &nbsp;&nbsp; <b>'.$nameusr.'</b><br/>' : '<label for="namec">'.$clsite['name'].'</label> &nbsp; &nbsp; &nbsp;&nbsp; <input type="text" name="namec" id="namec" size="20" maxlength="32" /><br/>';
$amail = (CMALLOWM===1)?'<input type="checkbox" name="amail" id="amail" value="2" /> - <label for="amail"><i>'.$clsite['comments']['fcamail'].'</i></label><br/>':'';

// Adauga sau nu butonul pt. link-uri
$alink = (CMALLOWL===1)?'<img src="icos/url.png" border="0" alt="URL" title="coment" class="seturl" />':'';
// Adauga sau nu campului pt. upload imagine
$upimg = (CMALLOWI===1)? sprintf($clsite['comments']['fcupimg'], $imguprule['maxsize']).'<input type="file" name="upimg" /><br/><br/>':'';
?>
<!-- Form to add comments -->
<div id="fcom">
  <h3 id="show_formc"><?php echo $clsite['comments']['addcomm']; ?></h3>
  <form name="formc" id="formc" method="post" action="comments.php" enctype="multipart/form-data" target="adbox_ifr">
  <!-- WebMaster courses http://www.coursesweb.net -->
    <input type="hidden" name="pg" value="<?php echo $objCom->page; ?>" />
    <fieldset><legend align="right" id="formc_cls"><?php echo $clsite['close']; ?></legend>
<?php echo $namec; ?>
  <label for="emailc">E-mail: </label> &nbsp; &nbsp; &nbsp;
      <input type="text" name="emailc" id="emailc" size="20" maxlength="50" value="optional" onclick="if(this.value=='optional')this.value='';" onblur="if(this.value=='')this.value='optional';" /><br/>
  <label for="sitec"><?php echo $clsite['site']; ?></label>
      <input type="text" name="sitec" id="sitec" size="20" maxlength="70" value="optional" onclick="if(this.value=='optional')this.value='';" onblur="if(this.value=='')this.value='optional';" /><br/>
      <div id="afemail">
<?php
echo $amail;
echo '<input type="checkbox" name="showmail" id="showmail" value="1" /> - <label for="showmail">'.$clsite['comments']['fcshowmail'].'</label>';
?></div><br/>
  <label for="coment"><?php echo $clsite['comments']['fccoment']; ?></label><br/>
  <div id="icos">
    <img src="icos/bold.png" border="0" alt="B" title="b" class="addtag" />
    <img src="icos/italic.png" border="0" alt="I" title="i" class="addtag" />
    <img src="icos/underline.png" border="0" alt="U" title="u" class="addtag" />
  <?php echo $alink; ?>
   &nbsp;&nbsp; 
  <img src="icos/0.gif" alt=":)" title=":)" border="0" class="addsmile" />
  <img src="icos/1.gif" alt=":(" title=":(" border="0" class="addsmile" />
  <img src="icos/2.gif" alt=":P" title=":P" border="0" class="addsmile" />
  <img src="icos/3.gif" alt=":D" title=":D" border="0" class="addsmile" />
  <img src="icos/4.gif" alt=":S" title=":S" border="0" class="addsmile" />
  <img src="icos/5.gif" alt=":O" title=":O" border="0" class="addsmile" />
  <img src="icos/6.gif" alt=":=)" title=":=)" border="0" class="addsmile" />
  <img src="icos/7.gif" alt=":|H" title=":|H" border="0" class="addsmile" />
  <img src="icos/8.gif" alt=":X" title=":X" border="0" class="addsmile" />
  <img src="icos/9.gif" alt=":-*" title=":-*" border="0" class="addsmile" /></div>
  <textarea name="coment" id="coment" cols="41" rows="7"></textarea><br/>
  <?php echo $upimg; ?>
  <?php echo $clsite['comments']['codevc']; ?> &nbsp; <span id="codev0c"><?php echo $objCom->setCaptcha('codevc'); ?></span><br/>
  <label for="codevc"><?php echo $clsite['code']; ?></label><input type="text" name="codevc" id="codevc" size="5" maxlength="6" /><br/>
  </fieldset><br/>
  <input type="hidden" name="sbmt" value="<?php echo $clsite['comments']['addcomm']; ?>" />
  <input type="submit" value="<?php echo $clsite['comments']['addcomm']; ?>" id="addcomm" /><br/><span id="marplo">&copy; <a href="http://www.coursesweb.net/php-mysql/script-comments-pagination_s2" title="Comments script">www.coursesweb.net</a></span>
  </form>
</div>
Return current item: Comments script with pagination