-6

I'm learning PHP coding and I can't solve this problemIt's includes the variables and the endlines.

I'm new to the language.

2 Answers2

0

Update: You are calling POST values, meaning a form (similar to a login form) has to send the values of tireqty, oilqty, and sparkqty to that page.

So you generally want to start a .php file with <?php at the very top. I would recommend doing a simple example like this:

<?php
    echo '<p>1</p>';
?>
<p>2</p>

Or, change your file to reflect .html instead. You should be able to still have the php run properly there like this:

<p>1</p>
<?php
    echo '<p>2</p>';
?>

If this doesn't work, please update your question to provide:

  1. Operating System
  2. What program you're using
  3. What browser you're using
  4. What version of PHP you're using
  5. Any other information about your system

iSkore
  • 7,394
  • 3
  • 34
  • 59
  • 1.WIndows 7 2. I'm using Notepad++ 3.Mozilla Firefox 4.PHP 7.0.2 5 5.When i star apache in xampp it gives me an error that says: Apache shutdown unexpectedly. – Raphael Biscocho Jan 19 '16 at 04:50
  • Yesterday the code is working and after that , the picture above happened. I'm new to the language. – Raphael Biscocho Jan 19 '16 at 04:52
  • You should start your apache before you can run php. – jameshwart lopez Jan 19 '16 at 04:56
  • 1
    I think the problem is not in the code because the code works yesterday . I think it's in the xampp and i need help on that. heres the error that my xampp gives:1:09:25 PM [Apache] Error: Apache shutdown unexpectedly. 1:09:25 PM [Apache] This may be due to a blocked port, missing dependencies, 1:09:25 PM [Apache] improper privileges, a crash, or a shutdown by another method. – Raphael Biscocho Jan 19 '16 at 05:09
  • @raphael-biscocho - Not a problem. Did the edits to the question help though? I brought your code the question so it wouldn't get more down votes - people don't tend to like going through links to find stuff. – iSkore Jan 19 '16 at 05:13
  • Ok thanks for the help. I'm really learning these stuffs right now. – Raphael Biscocho Jan 19 '16 at 05:17
  • Not a problem, so it looks like you're trying to make an inventory order page for vehicle parts. Is that the goal? – iSkore Jan 19 '16 at 05:18
  • @raphael-biscocho, I would recommend accepting the suggested edits, it would allow other users to better understand your question – iSkore Jan 19 '16 at 05:26
0

There is no other issue, fix your xampp problem, put your project in xampp > htdocs folder, save your file with .php extension and go to browser write http://localhost/project/page.php

Altaf Ahmad
  • 63
  • 1
  • 1
  • 7