just starting out in php and all is new. i am following all the right things in a idiots guide book but when i submit info from a form the php file will not run properly and am asked if i want to run open or cancel. its just like the php server is just not running. i havnt changed any settings and all the code works in phpdesigner so i know its all right. any help would be appreciated.
All the files are in the www folder here is the code of both html and php files I am running. Open the html and fill it out and on submit all I get is a page of php code. The php file will not run. If run through my php designer it works though????
$taxrate = 0.10; // local sales tax is 10% $totalamount = $totalamount * (1 + $taxrate); echo 'Total including tax: $'.number_format($totalamount,2).'<br />';
if($find == 'a') echo '<p>Regular customer.</p>'; elseif($find == 'b') echo '<p>Customer referred by TV advert.</p>'; elseif($find == 'c') echo '<p>Customer referred by phone directory.</p>'; elseif($find == 'd') echo '<p>Customer referred by word of mouth.</p>'; else echo '<p>We do not know how this customer found us.</p>';
If order.html file containing your code is run in working WAMP5 system, the form is POSTed to the processorder.php script and it outputs the HTML page all right.
Have you modified the default settings in any way?
You could try to create the file phpinfo.php with the following contents:
<?php phpinfo(); ?>
When you run it, it should present the PHP settings nicely formatted.
I just saw your last message: No need to go and hide.
The action "processorder.php" works fine, the default location for files is the current working directory and you do not have to include the full path or URL. Using a relative path should work all right and makes it easier to migrate your code to a different server environment.