Jump to content

Trying to make my INQUIRY FORM work


fishcuisine

Recommended Posts

My INQUIRY FORM in the webiste: www.tokyo-chef-institute.com is not working.

 

Theh following is the submit.php code:

 

\n\n"; } // check for a recipient email address and check the validity of it // Thanks to Bradley miller (bradmiller@accesszone.com) for pointing // out the need for multiple recipient checking and providing the code. $recipient_in = split(',',$recipient); for ($i=0;$iI NEED VALID RECIPIENT EMAIL ADDRESS ($recipient_to_test) TO CONTINUE"); } } // This is because I originally had it require but too many people // were used to Matt's Formmail.pl which used required instead. if ($required) $require = $required; // handle the required fields if ($require) { // seperate at the commas $require = ereg_replace( " +", "", $require); $required = split(",",$require); for ($i=0;$iemail address is invalid"); $EMAIL = $email; } // check zipcodes for validity if (($ZIP_CODE) || ($zip_code)) { $zip_code = trim($zip_code); if ($ZIP_CODE) $zip_code = trim($ZIP_CODE); if (!ereg("(^[0-9]{5})-([0-9]{4}$)", trim($zip_code)) && (!ereg("^[a-zA-Z][0-9][a-zA-Z][[:space:]][0-9][a-zA-Z][0-9]$", trim($zip_code))) && (!ereg("(^[0-9]{5})", trim($zip_code)))) print_error("your zip/postal code is invalid"); } // check phone for validity if (($PHONE_NO) || ($phone_no)) { $phone_no = trim($phone_no); if ($PHONE_NO) $phone_no = trim($PHONE_NO); if (!ereg("(^(.*)[0-9]{3})(.*)([0-9]{3})(.*)([0-9]{4}$)", $phone_no)) print_error("your phone number is invalid"); } // check phone for validity if (($FAX_NO) || ($fax_no)) { $fax_no = trim($fax_no); if ($FAX_NO) $fax_no = trim($FAX_NO); if (!ereg("(^(.*)[0-9]{3})(.*)([0-9]{3})(.*)([0-9]{4}$)", $fax_no)) print_error("your fax number is invalid"); } // sort alphabetic or prepare an order if ($sort == "alphabetic") { uksort($HTTP_POST_VARS, "strnatcasecmp"); } elseif ((ereg('^order:.*,.*', $sort)) && ($list = explode(',', ereg_replace('^order:', '', $sort)))) { $sort = $list; } // prepare the content $content = parse_form($HTTP_POST_VARS, $sort); // check for an attachment if there is a file upload it if ($attachment_name) { if ($attachment_size > 0) { if (!$attachment_type) $attachment_type = "application/unknown"; $content .= "Attached File: ".$attachment_name."\n"; $fp = fopen($attachment, "r"); $attachment_chunk = fread($fp, filesize($attachment)); $attachment_chunk = base64_encode($attachment_chunk); $attachment_chunk = chunk_split($attachment_chunk); } } // check for a file if there is a file upload it if ($file_name) { if ($file_size > 0) { if (!ereg("/$", $path_to_file)) $path_to_file = $path_to_file."/"; $location = $path_to_file.$file_name; if (file_exists($path_to_file.$file_name)) $location = $path_to_file.rand(1000,3000).".".$file_name; copy($file,$location); unlink($file); $content .= "Uploaded File: ".$location."\n"; } } // second file (see manual for instructions on how to add more.) if ($file2_name) { if ($file_size > 0) { if (!ereg("/$", $path_to_file)) $path_to_file = $path_to_file."/"; $location = $path_to_file.$file2_name; if (file_exists($path_to_file.$file2_name)) $location = $path_to_file.rand(1000,3000).".".$file2_name; copy($file2,$location); unlink($file2); $content .= "Uploaded File: ".$location."\n"; } } // if the env_report option is on: get eviromental variables if ($env_report) { $env_report = ereg_replace( " +", "", $env_report); $env_reports = split(",",$env_report); $content .= "\n------ eviromental variables ------\n"; for ($i=0;$iJack's Formmail.php ".VERSION."!\n\n"; exit; } // <---------- THE END ----------> //

0

 

-----------------------------

 

I don't recall who created this.

Anyone know how I can get my INQUIRY FORM back to work?

 

Regards

fishcuuisine

Link to comment
Share on other sites

Your php file code is very incomplete. Go back to where you got it from and check.

 

It should start with <?php and end with ?> but I expect that there is more missing at the beginning.

 

Also, ereg is deprecated but should still work, see

http://php.net/manual/en/function.ereg.php

http://docstore.mik.ua/orelly/webprog/pcook/ch13_02.htm

Edited by Wickham
Link to comment
Share on other sites

  • 2 weeks later...

Your php file code is very incomplete. Go back to where you got it from and check.

 

It should start with <?php and end with ?> but I expect that there is more missing at the beginning.

 

Also, ereg is deprecated but should still work, see

http://php.net/manual/en/function.ereg.php

http://docstore.mik.ua/orelly/webprog/pcook/ch13_02.htm

 

Wickham

 

Problem solved. As you mentioned, contact the party that created the INQUIRY form and they can fix it. ipage was the party; had their tech support look into it and walla...they fixed it. Thanks again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...