So why do I have to reposition my form? I am not real happy with where it is. How do I get around that?
I love Zencart... just sayin'
So why do I have to reposition my form? I am not real happy with where it is. How do I get around that?
I love Zencart... just sayin'
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
I checked form in the source code but did not see any. I tried inserting an extra close form to be safe but still no luck. Is it invisible : ) a ghost in the machine?
This form's working great so far (many thanks to ladybugmom!). The only problem is when I tried limiting the type of file uploads.
I did the above instructions. Here's how my code turned out:
// Upload
// Path from domain name to upload directory and line
$file_ext = basename($_FILES['ftp_file']['name']);
$ext = substr($file_ext, strrpos($file_ext, '.') + 1);
$upload_dir = ($_SERVER['DOCUMENT_ROOT'] . "/$fileupload_dir_name/");
$target_path = $upload_dir . basename( $_FILES['ftp_file']['name']);
if (($ext == "jpg") || ($ext == "jpeg") || ($ext == "psd") || ($ext ==
"pdf") || ($ext == "png") || ($ext == "gif") || ($ext == "tif") || ($ext
== "cdr") || ($ext == "eps") || ($ext == "tiff") || ($ext == "bmp") || ($ext == "ai")) {
if (move_uploaded_file($_FILES['ftp_file']['tmp_name'], $target_path)) {
chmod($upload_dir . basename( $_FILES['ftp_file']['name']), 0644);
echo $p."$l_upload13 ". basename( $_FILES['ftp_file']['name']). "$p2";
} else {
echo $p."$l_upload14 ". basename( $_FILES['ftp_file']['name']). "$p2";
}
} else {
echo $p."$l_upload14 ". basename( $_FILES['ftp_file']['name']). "$p2";
}
// Redirect to upload page.
But when I finished uploading an image, this message appeared briefly:
Warning: basename() expects parameter 1 to be string, array given in /home/ncom2/public_html/imuniforms.com/upload/index.php on line 307
Warning: basename() expects parameter 1 to be string, array given in /home/ncom2/public_html/imuniforms.com/upload/index.php on line 310
Warning: basename() expects parameter 1 to be string, array given in /home/ncom2/public_html/imuniforms.com/upload/index.php on line 321
There was a problem uploading
Automatically redirecting to the Upload-Page
-----------------------------------------------
Uploading then failed. I have about zero knowledge of php. Can somebody enlighten me?
It would be much appreciated!
Grateful zencarter
Scratch that, alternative in post 217 is much easier....guess I should read through all the posts before I go posting myself.
How can you add checkbox field and dropdown field to this?
If I did some reading and analyzing the code I would have not needed to post.
Ok sorry If I missed it, but I read this entire thread and couldnt find my answer.
Has anyone figured out how to send a confirmation email to the customer after the "you message has been sent" success page?
I have no complaints other than now I want to have a confirmation email sent. I'm using this for a physical catalog request (you can see it here) and I've got it to work perfectly. I get all the correct info and everything lands where its supposed to when its sent. It even checks if the patron is logged into the site to fill in some of the fields. Once the form is submitted, it goes to a page that states that the request has been sent. I would like it to send a confirmation email to the customer thanking them for their interest in the company and so on.
How do I do that? Just need to be pointed in the right direction is all.
Add another zen_mail() function call using the customer's email address instead of yours, and some different content of course.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Bookmarks