PHP form with/without attachment???
- Started
- Last post
- 16 Responses
- wwfc
Hi,
Can anyone tell me what I need to change within this code:
http://pastebin.se/14140At present the user uploads their cv and then they get a message saying thankyou and giving them a refno:
but if nothing gets uploded it stops working...
What do I change to keep it working regardless of no file being uploaded. So if nothing is uploaded the data still gets passed on to the specified email addy?
Any ideas? I have tried numerous things but just can't get it to send :(
- UndoUndo0
if there was no attachment did it echo out
"there was a problem with upload"
if so check the code on the link:
- wwfc0
...at present when you click on the submit button the page just looks as if it has reloaded itself but doesn't pass any data nor does it show the "thankyou" message or any other message for that matter.
:(
I have tried tweeking it on various lines but with no joy
- UndoUndo0
did you try the code i posted?
- wwfc0
...yeh tried the code but it still reloads the with completed fields :(
one would think it simple - but I can't see what I am missing!!
- UndoUndo0
try this
I would also say that this mail form is not secured. If it is available via a public website it wont be long before the spiders and bots find it and start sending their own mail via your mail server. You'll be unaware to this and it could eventually get yr server blacklisted.
Someone on here recently posted an excellent website that would actually make all of the pages and code you need for mail forms. id suggest a search below (using "find") if you dont want to take the risk
- wwfc0
...hmm! still not a sausage!
Thanks for your help Undo ;) appreciate you lending me your time.
any idea what the title of that thread was - by any chance???
maybe I need to start from scratch.
Anyone know of any good tuts/source at all?
- wwfc0
...or could anyone tell me what I can add to this code;
http://pastebin.se/14145to include uploaded attachments?
once the user enters the details it goes to this page:
which seems to set the actual email itself.
What would I need to add to those bits of code?
...is it that simple? all I need to do is allow the user the option of uploading the cv - or not if they choose...
:(
- digilee0
you might take a look at the code generated by this as all it seems to need is file upload: http://supersimple.org/contact/s…
- wwfc0
cheers digilee - good call.
But that is where the problem lies - uploading a doc to include as part of the email...
that is a handy link though ;)
- wwfc0
nnngh! nah still nothing :(
...thanks for the help though both - appreciated greatly
;)
- joyride0
you sure you're on a php box?
- wwfc0
yep - it works dandy when there is a file as an attachment - but I need it to send the data in the form - and the file if there is one, at the moment it won't send jack without an attachment!! :(
wtf!!!
- UndoUndo0
im sure if someone has the time to go through it and sepearte the content validation from the attachment validation it will work, i just dont have time, sorry :(
- wwfc0
"im sure if someone has the time to go through it and sepearte the content validation from the attachment validation it will work, i just dont have time, sorry :("
...please don't apologise - at all!!!!
you have been a help as it is...;) ou1
- rson0
$christianname that is a funny name for a var. sorry that was not helpful;)