close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

form error when submitted via contact/index.php

Thread began 1/05/2010 6:42 pm by raabernathy397361 | Last modified 8/31/2012 7:57 am by Jason Byrnes | 5640 views | 6 replies |

raabernathy397361

form error when submitted via contact/index.php

*All I'm really trying to accomplish is using index.php for all of the contact / thank you / php files.




I'm having almost the exact same issue that was discussed via "form not working on site index.php page" post in forum. When trying to make these modifications the form either won't work at all or gives an error message. So I applied the same suggested fix but still get errors:

The form works fine when I access it directly using index.php

But I still get errors When I access and submit the form via contact/

- either the form won't submit at all or gives the error message below.

Here is the error message:
Deprecated: Function split() is deprecated in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ContactForm_GMC\contact

\WA_ValidationToolkit\WAVT_Scripts_PHP.php on line 327


Details on what I've changed:

1) changed "contactus.php" to "index.php"

2) chanaged
PHP Code:
if ((($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode

($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST))) {

to:
PHP Code:
if ($_SERVER["REQUEST_METHOD"] == "POST") {

3) changed "thankyou.php" to "thankyou/index.php"

4) changed
PHP Code//Send Mail All Entries
if ("index.php"!="") {
header("Location: thankyou.php");

to
PHP Code//Send Mail All Entries
if ("index.php"!="") {
header("Location: thankyou/index.php");


*All I'm really trying to accomplish is using index.php for all of the contact / thank you / php files. I've spent allot of time going through the forums and reading over the PHP code and honestly can't figure out how to make that happen. If you could give advice on how I can have my file / directory structure so that this will work I'd be very greatful! I prefer to do this in the least complicated way while also using the least amount of resources on my web server. Thanks for any help!

Sign in to reply to this post

neilo

The error is pointing to 'function split()'

It may be worth checking out this thread

Sign in to reply to this post

raabernathy397361

I applied the fix suggested in that thread and it didn't work.

Here is what i did in response to suggested change
WA_ValidationToolkit\WAVT_Scripts_PHP.php on line 327

changed:
$domArr = split("\.",$domainName);

to:
$domArr = explode("\.",$domainName);

Now I keep getting errors when validating the email - on the php side. IE it keeps asking me for an email even when I enter a valid one.

*All I'm really trying to accomplish is using index.php for all of the contact / thank you / php files. I've spent allot of time going through the forums and reading over the PHP code and honestly can't figure out how to make that happen. If you could give advice on how I can have my file / directory structure so that this will work I'd be very greatful! I prefer to do this in the least complicated way while also using the least amount of resources on my web server. Thanks for any help!

Sign in to reply to this post

Jason ByrnesWebAssist

all you should need to do is save the contactus.php file as:
contact/index.php

and save the thankyou.php file as:

thankyou/index.php


Then modify the line in the contact us page:

php:
header("Location: thankyou.php");




to:

php:
header("Location: thankyou/index.php");




your php server is useing PHP 5.3 which is why you got the deprecated function error. so you will need to make the edit sugested before.

where it is constantly validating the email address, it sounds like one ofthe form element names has been changed.

To troubleshoot, find the following line:

php:
if ($WAFV_Errors != "")  {

    PostResult($WAFV_Redirect,$WAFV_Errors,"contact");
  }



and change it to:

php:
if ($WAFV_Errors != "")  {

    die($WAFV_Errors);
    PostResult($WAFV_Redirect,$WAFV_Errors,"contact");
  }





this will write a comma separated list of errors, post back the list of errors, a copy of the contact us page and a link to your site so I can examine the code to find the problem.

Sign in to reply to this post

raabernathy397361

Hi Thanks - I actually kept tooling around with it and managed to get it working. I really do appreciate the follow up on the debug. I still plan to apply your suggestion just to double check my work. Thanks again!

Sign in to reply to this post

john.mccarthy130629

Function split() is deprecated in WA_ValidationToolkit/WAVT_Scripts_PHP.php on line 3

Hi, I am having the same problem & have not been able to fix it with these suggestions - Is there a version of the WAVT_Scripts_PHP.php for 5.3 available on webassist? Jason, does your solution imply putting the contact and thankyou file in a folder "contact" - this returns an error message also.
I would be grateful for any suggestions about how to solve this.

Sign in to reply to this post

Jason ByrnesWebAssist

here is an updated copy of the WAVT_Scripts_PHP.php file for you to use

Attached Files
WAVT_Scripts_PHP.php.zip
Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...