reportingsjr Posted March 29, 2006 Share Posted March 29, 2006 I have written some basic PHP code so I can learn things... BUt, when I write it it doesnt work. I was just messing around making a tire application but it wont show up. Here is the code:First page: <body><center><h3>Joes Tire Shop</h3></center>Welcome to Joes Tire Shop! We sell the best of tires just for you!<br>Just fill out the following for to buy some tires from us!.<br><form action="second tire form page.php" method="POST">Name:<input type="text" maxlength="20" name="name"><br><fieldset><legend>Adress Information:</legend>City:<input type="text" name="City"> State:<input type="text" maxlength="2" name="State"><br>Zip Code:<input type="text" maxlength="5" name="Zipcode"> Adress:<input type="text" name="Adress"></fieldset>Amount of tires:<input type="text" maxlength="3" name="tireamt"><br><input type="submit" value="submit"></form></body> Second Page <body><?phpecho "Thank you for ordering tires $_POST["name"]!;echo "You ordered: $_POST["tireamt"];echo "Your adress is: $_POST["city"], $_POST["state"], $_POST["adress"], $_POST["zipcode"];?> If the coding isnt the problem, Do I need to save it in a certain folder for it to work? Link to comment Share on other sites More sharing options...
pulpfiction Posted March 29, 2006 Share Posted March 29, 2006 Hi,look for the sub folder "www" in the EasyPHP Folder, put all the PHP files in that folder to work. make sure that the EasyPHP is running. (running properly if u see a E symbol in the right side tool bar). Link to comment Share on other sites More sharing options...
reportingsjr Posted March 30, 2006 Author Share Posted March 30, 2006 I did all of that.. It still wont show anything on the second page . Link to comment Share on other sites More sharing options...
klapy Posted April 2, 2006 Share Posted April 2, 2006 That's probably because echo doesnt display text and variables at the same time, you should try it like: echo "Thank you for ordering tires" . $_POST['name'] . '! <br />';echo "You ordered:" . $_POST['tireamt'] . "<br />";echo "Your adress is:" . $_POST['city'] . "<br />" . $_POST['state'] . "<br />" . $_POST['adress'] . "<br />" . $_POST['zipcode']; The <br /> tags are there to sanitize it a bit Link to comment Share on other sites More sharing options...
reportingsjr Posted April 5, 2006 Author Share Posted April 5, 2006 Yea, I forgot about that klappy. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now