Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 7th, 2008, 5:51 PM   #1
MovingShadow
Newbie
 
Join Date: Aug 2008
Posts: 3
Rep Power: 0 MovingShadow is on a distinguished road
PHP form processing script wont work

Hey everyone,

I've just joined this forum and am currently in the early stages of learning PHP. But I have a small problem and was wondering if anyone would kindly help me. I have made a basic form with three text inputs and a submit button.

The submit buttons leads to a basic PHP form processing which displays the contents that the user has input. However when I submit the form it simply opens the php processing script in my default text editor (EditPlus).

I am currently running a WAMP setup on Windows Vista and I have checked my configuration and can perfectly run individual PHP scripts in my browser (IE7). I only seem to have a problem when I try to pass my form to my PHP script via the submit button.

It would be much appreciated if anyone could provide me with a solution to this problem.

Kind Regards,

Harry
MovingShadow is offline   Reply With Quote
Old Aug 7th, 2008, 6:33 PM   #2
Mocker
Hobbyist Programmer
 
Mocker's Avatar
 
Join Date: Oct 2005
Location: Indiana
Posts: 224
Rep Power: 0 Mocker is an unknown quantity at this point
Send a message via AIM to Mocker
Re: PHP form processing script wont work

What does the address of the page with the form, and the address of the page the form goes to look like? If your form and your processing page are both in the same folder, with the same extension, and same permissions, then your forms action tag is likely not sending you to that script correctly. I mainly use linux, but I've used XAMPP before for local windows testing and it setup all the permissions for me so that I just had to keep my php scripts in the right directory with the right extension.
__________________
#programmingforums relay - http://thegupstudio.com/cgi-bin/pforelay.cgi
freelance scripts - http://ryanguthrie.com/index.html
Mocker is offline   Reply With Quote
Old Aug 7th, 2008, 6:46 PM   #3
MovingShadow
Newbie
 
Join Date: Aug 2008
Posts: 3
Rep Power: 0 MovingShadow is on a distinguished road
Re: PHP form processing script wont work

Hey [Mocker],

This is what I have in the address bar:

Order form:

C:\wamp\www\MyWork\1\order_form.html

In the case of the processing script, I dont have an address for this page because when I click on the submit button it opens up the processing script in my editor straight away. However both the order form and the processing script are in the same folder (with the correct extensions. This is what I have for the form action in the order form:

<form action="processorder.php" method="post">

I can execute processororder.php on its own perfectly fine - but I cant seem to get it to execute from my forms submit button. I have also tried various other php scripts to ensure that I can run php and again they all work fine.


Kind Regards,

Harry
MovingShadow is offline   Reply With Quote
Old Aug 7th, 2008, 7:23 PM   #4
MovingShadow
Newbie
 
Join Date: Aug 2008
Posts: 3
Rep Power: 0 MovingShadow is on a distinguished road
Re: PHP form processing script wont work

Problem fixed. I had been stupidly trying to run my scripts locally via C:\ and not through the wamp server. Therefore my php processing script was not interpreted by the php engine.

Regards,
MovingShadow is offline   Reply With Quote
Old Aug 17th, 2008, 11:33 AM   #5
ZiggyZack99
Casual Programmer
 
ZiggyZack99's Avatar
 
Join Date: Aug 2008
Posts: 7
Rep Power: 0 ZiggyZack99 is on a distinguished road
Re: PHP form processing script wont work

Try:
http://localhost/MyWork/1/order_form.html
ZiggyZack99 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP script ending prematurely causing Internal Error...??? Syntax_Error PHP 2 Feb 29th, 2008 9:42 PM
Parsing PHP script output bulio PHP 1 Feb 18th, 2008 7:41 PM
Bulletin Board PHP Script grimpirate Existing Project Development 0 Aug 28th, 2007 2:28 AM
Need help with Form Validation script jl403 JavaScript and Client-Side Browser Scripting 13 Sep 22nd, 2005 5:46 PM
Need help with required form script fmontoya JavaScript and Client-Side Browser Scripting 2 Apr 4th, 2005 1:11 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:05 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC