[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 294
  • Last Modified:

comment php and html




How can I comment the code below the name of file is   test.php

Can i put /*     */

such as

/*

 <input type="hidden" name="invoiceno" id="hiddenField" value='<?php echo $invoiceno;?>'/>
 <input type="text" name="Productuserfill" id="Productuserfill" />
 


*/




<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post" name="form1" id="form1" onsubmit="MM_validateForm('Productuserfill','','R','quantity','','NisNum');return document.MM_returnValue">
  <label>ProductCode</label>
    <input type="hidden" name="invoiceno" id="hiddenField" value='<?php echo $invoiceno;?>'/>
    <input type="text" name="Productuserfill" id="Productuserfill" />
 
  <span id="sprytextfield1">
  <label>No
    <input name="quantity" type="text" id="quantity" value="1" />
  </label>
  <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span>
  <label>
    Enter
      <input type="submit" name="EnterBottom" id="EnterBottom" value="Submit" accesskey="A" tabindex="E" />
  </label>
</form>

0
teera
Asked:
teera
2 Solutions
 
gamebitsCommented:
If it is an html statement use <!--  comment  -->
if it is php use /* comment on
                                multiple line */

or use // comment if it is on a single line

in your case I would do this

<?php
/*
echo "<input type=\"hidden\" name=\"invoiceno\" id=\"hiddenField\" value='$invoiceno'/>
          <input type=\"text\" name=\"Productuserfill\" id=\"Productuserfill\" />";
*/
?>
0
 
asafadisCommented:
This would also work:

<!--
<input type="hidden" name="invoiceno" id="hiddenField" value='<?php echo $invoiceno;?>'/>
<input type="text" name="Productuserfill" id="Productuserfill" />
-->

While it would print out in the source, it won't show up in the actual page.

Open in new window

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now