PHP not working correctly

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
User avatar
trishahdee
Posts: 32
Joined: Thu Jul 10, 2008 1:02 am
Contact:

PHP not working correctly

Post by trishahdee »

I know php is working because when I preview a php page the php on the page is executed.

I am just learning php so I am working through basic tutorials. I have made the following two pages. The form and message pages work if I upload them to my server, but they won't work in WE preview or if I send it out to a browser. I have XAMPP on my system and am using the PHP from there. The result after "Send" is the following:
$input"; ?>
form.html

Code: Select all

<html>
<head></head>
<body>
<form action="message.php" method="post">
Enter your message: <input type="text" name="msg" size="30">
<input type="submit" value="Send">
</form>
</body>
</html>
message.php

Code: Select all

<html>
<head></head>
<body>

<?php
// retrieve form data
$input = $_POST['msg'];
// use it
echo "You said: <i>$input</i>";
?>

</body>
</html> 
"It doesn't matter where we come from, what we've done or suffered, or even if we make a difference. We live as though the world was what it should be, to show it what it can be." ~ Angel, Season 4, Episode 67, "Deep Down"
daredare
Posts: 125
Joined: Sun Sep 09, 2007 1:40 pm

Re: PHP not working correctly

Post by daredare »

enable mappings(preference menu) and have your files in the htdocs folder
webuilder 2010 version 10.02 (10.0.2.118) is the best !!
User avatar
trishahdee
Posts: 32
Joined: Thu Jul 10, 2008 1:02 am
Contact:

Re: PHP not working correctly

Post by trishahdee »

Thank you so very much!!!! That was the problem.

I also found that I can map it to the normal folder I use to store my web documents on a different drive and not just the htdocs folder under xampp. Since I can add multiple mappings I guess I'll be able just to add a new map for each folder/website I design... So cool!

I love WeBuilder. I always recommend it to people who want to learn to build websites.

Thanks again!
"It doesn't matter where we come from, what we've done or suffered, or even if we make a difference. We live as though the world was what it should be, to show it what it can be." ~ Angel, Season 4, Episode 67, "Deep Down"
Post Reply