-1

My code is

 <form action = "insert.php" method = "POST">
  <div class="title-block">
         <input type="text" name="rater_full_name" />
         </div>
              <div class="title-block">
         <input type="text" name="rater_company_name" required />
         </div>
     <div class="title-block">
         <input type="text" name="rater_ref" />
         </div>
          <div class="title-para">
        <textarea rows="5" name="rater_suggestion"></textarea>
         </div    <div align="left"><div class="btn-block">
          <input type="hidden" name="PID" value="<?php echo $PID; ?>">        <button type="submit" name="submit" value="submit">Submit Feedback</button>
          
        </div> 
      </form>

It's not storing the variable $PID value, it is storing complete code inside quotations("") Please suggest best way to do so..

Thanks in advance.

4
  • 3
    You need to save it as a .php file and host it on a server that has PHP installed. Commented Jul 30, 2021 at 11:22
  • but the form is in HTML, so does it work after saving in php. I mean form look will remain the same or changed? Commented Jul 30, 2021 at 11:25
  • 2
    Of course it works. PHP is designed to be woven into HTML like this. Commented Jul 30, 2021 at 11:27
  • It's working now, thank you @NiettheDarkAbsol Commented Jul 30, 2021 at 11:33

1 Answer 1

-1

Save the file as .php rather than .html

Sign up to request clarification or add additional context in comments.

1 Comment

Please close duplicate questions instead of answering them.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.