i am adding data in mysql with form

when i add specific paragraph in product description it will redirect me to root folder. even it will not go to process.php

wen i submit the form it directly go to root folder. the paragraph is below.

“Apply lipstick to perfectly clean lips after having used a lip liner shading it towards the internal of the lip. For a more intense color, apply a light layer of concealer. To increase to shiny effect of the lipstick apply a small amount of gloss. “

<form action="products.php" method="post" enctype="multipart/form-data" role="form">
               <input type="hidden" name="act" value="AddProd">
                <input type="hidden" name="parent" value="<?php print $parent?>">
        <div class="panel panel-default">
            <div class="panel-heading"><h6 class="panel-title"><i class="icon-pencil"></i> Enter Product data in every language tab.</h6></div>
            <div class="panel-body">
            <div class="form-group">

                        <div class="row">
                            <div class="col-md-4">
                                <label>Product Code:</label>
                                <input type="text" class="form-control" name="art">
                            </div>

                            <div class="col-md-4">
                                <label>Price:</label>
                                <input type="text" class="form-control" name="price">
                            </div>

                            <div class="col-md-4">
                                <label>Discount:</label>
                                <input type="text" class="form-control" name="discount"><span class="help-block">Discount in % e.g. 10%</span>
                            </div>
                        </div>

                    </div>
                    <div class="form-group">
                        <div class="row">
                            <div class="col-md-6">
                                <label>Small Thumbnail Image:</label>
                                <input type="file" class="styled form-control" id="simg" name="simg" onchange="ValidateSingleInput(this);">
                                <span class="help-block">Accepted formats: jpg. Max file size 2Mb</span>
                            </div>

                            <div class="col-md-6">
                                <label>Large Image:</label>
                                <input type="file" class="styled form-control" id="limg" name="limg" onchange="ValidateSingleInput(this);">
                                <span class="help-block">Accepted formats: jpg. Max file size 2Mb</span>
                            </div>
                        </div>
                    </div>
            <div class="tabbable page-tabs">
            <ul class="nav nav-tabs">
            <?php $langone=dbQuery("select * from tbllang where Hidden='Yes' order by recid") or die("Error fetching Languages");$count=1;
            //print mysql_num_rows($langone);
            while($l1rs=dbFetchArray($langone)){
            ?>
                <li <?php if($count<=1){?>class="active"<?php }?>><a href="#lang<?php print $l1rs['recid'];?>" data-toggle="tab"><?php print $l1rs['langname'];?></a></li>
              <?php $count++;}?>   

            </ul>
            <div class="tab-content">

     <?php
      $langtwo=dbQuery("select * from tbllang where Hidden='Yes' order by recid") or die("Error fetching Languages");
    //  print mysql_num_rows($langtwo);
      $count2=1;
      while($l2rs=dbFetchArray($langtwo)){
      ?>
                <div class="tab-pane <?php if($count2<=1){?>active<?php }?> fade in" id="lang<?php print $l2rs['recid'];?>">


                    <div class="content">
                    <div class="form-group">
                        <div class="row">
                            <div class="col-md-12">
                                <label>Product Name:</label>
                                <input type="text" class="form-control" name="name<?php print $l2rs['recid'];?>">
                            </div>


                        </div>


                        <div class="row">
                            <div class="col-md-12">
                                <label>Product Detail:</label>
                               <textarea name="pdetail<?php print $l2rs['recid'];?>"></textarea>
                            </div>

                        </div>      <div class="row">
                            <div class="col-md-12">
                                <label>How to use:</label>
                               <textarea name="qover<?php print $l2rs['recid'];?>"></textarea>
                            </div>

                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <label>Result:</label>
                               <textarea name="result<?php print $l2rs['recid'];?>"></textarea>
                            </div>

                        </div>

                        <?php 
                        $gcolors=mysql_query("select * from colors where langid='$l2rs[recid]'")or die(mysql_error());
                        if(mysql_num_rows($gcolors)>0){
                        ?>

                        <div class="row" style="background:#F2F2F2;">
                            <div class="col-md-12">
                              <label style="display:block;"><strong>Select Color:</strong></label>
                              <ul class="colorsul">

                                <?php while($rscol=mysql_fetch_array($gcolors)){?>
                                 <li><img src="<?php print $color.$rscol['patch'];?>" width="40" height="40" class="kcolor" />
                              <span class="cname"><input name="color[<?php $l2rs['recid'];?>]" type="checkbox" value="<?php print $rscol['cgid']."-".$l2rs['recid'];?>" /><?php print $rscol['name'];?></span>
                              </li>
                                <?php }?>
                                </ul>
                            </div>


                        </div>
                        <?php }?>
                              <?php 
                        $gsizes=mysql_query("select * from sizes where langid='$l2rs[recid]'")or die(mysql_error());
                        if(mysql_num_rows($gsizes)>0){
                        ?>

                        <div class="row" style="background:#F9F9F9;">
                            <div class="col-md-12">
                              <label style="display:block;"><strong>Select Size:</strong></label>
                              <ul class="colorsul">

                                <?php while($rssiz=mysql_fetch_array($gsizes)){?>
                                 <li>
                              <span class="cname"><input name="size[<?php $l2rs['recid'];?>]" type="checkbox" value="<?php print $rssiz['sgid']."-".$l2rs['recid'];?>" /><?php print $rssiz['name'];?></span>
                              </li>
                                <?php }?>
                                </ul>
                            </div>


                        </div>
                        <?php }?>
                    </div>

                    <h6 class="heading-hr"><i class="icon-page-break"></i> Page SEO Settings</h6>
                    <div class="form-group">
                        <label>Page Title:</label>
                        <input type="text" class="form-control" name="ptitle<?php print $l2rs['recid'];?>">
                    </div>
                    <div class="form-group">
                        <label>Meta Keywords:</label>
                        <input type="text" id="tags2" class="tags" name="keywords<?php print $l2rs['recid'];?>">
                    </div>

                    <div class="form-group">
                        <label>Meta Description:</label>
                        <textarea rows="5" cols="5" class="form-control" name="sdesc<?php print $l2rs['recid'];?>"></textarea>
                    </div>
                    </div>

                    <div class="form-actions text-right">
                        <button type="submit" class="btn btn-danger">Cancel</button>
                        <button type="submit" class="btn btn-primary">Submit</button>
                    </div>



                </div>
                <?php $count2++;}?>

            </div>

        </div>
            </div>
        </div>

  </form>


Source: forms

Leave a Reply