944,029 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 21792
  • PHP RSS
Jan 20th, 2005
0

dreamweaver, PHP and submit form query

Expand Post »
Hi,

Using Dreamweaver I have created a form that submits data to an sql database using PHP. I have a number of questions that I hope you can help with.

1. Why are some fields on the form a different colour when the background on all fields are set to white.

2. The behaviour of my submit key on click is validate form. If validations are successful, the data is posted to the database.

1. after the data is written the same form is displayed - on a successful write, how do I redirect to a thankyou page. I did have on click validate and on click go to url, but if the client validation failed - I pressed ok to the error and then was re-directed to the thankyou page.

I do not know PHP, so have been using Dreamweaver to set up the code

My submit key has the following code :
<input name="Submit" type="submit" onClick="MM_validateForm('companyname','','R','fullname','','R',
'address','','R','postcode','','R','telephone','','NisNum','email','','RisEmail')
;MM_goToURL('parent','thankyou.htm');return document.MM_returnValue" value="Submit">

so as you can see - I submit the data and go to thankyou, but if there is an error it will still go to the thankyou page.
Many Thanks
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dave_s is offline Offline
5 posts
since Jan 2005
Jan 21st, 2005
0

Re: dreamweaver, PHP and submit form query

I have solved these queries


Quote originally posted by dave_s ...
Hi,

Using Dreamweaver I have created a form that submits data to an sql database using PHP. I have a number of questions that I hope you can help with.

1. Why are some fields on the form a different colour when the background on all fields are set to white.

2. The behaviour of my submit key on click is validate form. If validations are successful, the data is posted to the database.

1. after the data is written the same form is displayed - on a successful write, how do I redirect to a thankyou page. I did have on click validate and on click go to url, but if the client validation failed - I pressed ok to the error and then was re-directed to the thankyou page.

I do not know PHP, so have been using Dreamweaver to set up the code

My submit key has the following code :
<input name="Submit" type="submit" onClick="MM_validateForm('companyname','','R','fullname','','R',
'address','','R','postcode','','R','telephone','','NisNum','email','','RisEmail')
;MM_goToURL('parent','thankyou.htm');return document.MM_returnValue" value="Submit">

so as you can see - I submit the data and go to thankyou, but if there is an error it will still go to the thankyou page.
Many Thanks
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dave_s is offline Offline
5 posts
since Jan 2005
May 17th, 2005
0

Re: dreamweaver, PHP and submit form query

Hi Dave,
How did u solved your ;problem. I am new for php.
I tried to use header to redirect. but it doesn't know. Also want to know the answer of first question.

Ryan
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Ryan828 is offline Offline
1 posts
since May 2005
May 19th, 2005
0

Re: dreamweaver, PHP and submit form query

Quote originally posted by Ryan828 ...
Hi Dave,
How did u solved your ;problem. I am new for php.
I tried to use header to redirect. but it doesn't know. Also want to know the answer of first question.

Ryan
Hi Ryan,

Sorry for the late reply - with regards to the different colours - this is due to me having the google toolbar installed. The different colours are a feature that google uses to show input boxes that could be autofill'd with values.

I can not remember how I solved the validation issue, but I will post my answer later.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dave_s is offline Offline
5 posts
since Jan 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Help With PHP Code Snip for PHPBB Board?
Next Thread in PHP Forum Timeline: Simple server stats





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC