Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: Need help with php form  (Read 2352 times)

Katalonian

  • Newbie
  • *
  • Karma: 0
  • Posts: 38
    • My personal web page
Need help with php form
« on: April 15, 2010, 10:37:57 AM »

Hello! I want to applly to my snews php form like this  but with file upload form. Can anyone help me to create or give link to some ready php form? thanks in advance!
Logged
non-php guy

Katalonian

  • Newbie
  • *
  • Karma: 0
  • Posts: 38
    • My personal web page
Re: Need help with php form
« Reply #1 on: April 16, 2010, 02:21:56 PM »

Guys! i found a good php tutor for create php form with attachment,
but i can't use it, it's dont work for me(( can anyone who knows php help me? pls....
Logged
non-php guy

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Need help with php form
« Reply #2 on: April 16, 2010, 02:34:05 PM »

So... this would let any site visitor upload an attachment to your site?
What will happen to the attachment when it is being uploaded to the server... does it go into one specific folder that you have already created?
What will be done with the attachment once it's on the server?
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Katalonian

  • Newbie
  • *
  • Karma: 0
  • Posts: 38
    • My personal web page
Re: Need help with php form
« Reply #3 on: April 16, 2010, 03:01:04 PM »

So... this would let any site visitor upload an attachment to your site?
What will happen to the attachment when it is being uploaded to the server... does it go into one specific folder that you have already created?
What will be done with the attachment once it's on the server?

This script would let to visitors send to my email a attachment with some text (it's a simple contact form with attachment).
Logged
non-php guy

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Need help with php form
« Reply #4 on: April 16, 2010, 03:11:19 PM »

This script would let to visitors send to my email a attachment with some text (it's a simple contact form with attachment).

Yes... I see that now... I did not read through the linked page last time...  :P

My approach would be to follow the tutorial and create a new contact form function to go into snews.php for testing purposes and see if it works.
I would also compare it to the default sNews contact form function and look for the fundamental differences between the two forms.

I will give it a try today if time pemits... It should be do-able.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Katalonian

  • Newbie
  • *
  • Karma: 0
  • Posts: 38
    • My personal web page
Re: Need help with php form
« Reply #5 on: April 16, 2010, 03:23:50 PM »

This script would let to visitors send to my email a attachment with some text (it's a simple contact form with attachment).

Yes... I see that now... I did not read through the linked page last time...  :P

My approach would be to follow the tutorial and create a new contact form function to go into snews.php for testing purposes and see if it works.
I would also compare it to the default sNews contact form function and look for the fundamental differences between the two forms.

I will give it a try today if time pemits... It should be do-able.

It's not neccesary to add this form to snews.php.
I created a different page, and just want to add this. But it's don't work... I uploaded a PEAR plugins, created a page with form, but nothing...
Logged
non-php guy

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Need help with php form
« Reply #6 on: April 16, 2010, 03:47:23 PM »

If all that's needed is to allow people to send you file attachments by email, why not simply add a (cloaked) mailto link for that particular purpose. Most email applications allows for file attachments. Seems easier to me anyway.
Logged

Katalonian

  • Newbie
  • *
  • Karma: 0
  • Posts: 38
    • My personal web page
Re: Need help with php form
« Reply #7 on: April 16, 2010, 04:02:01 PM »

If all that's needed is to allow people to send you file attachments by email, why not simply add a (cloaked) mailto link for that particular purpose. Most email applications allows for file attachments. Seems easier to me anyway.

can you show some example?
Logged
non-php guy

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Need help with php form
« Reply #8 on: April 16, 2010, 04:12:29 PM »

It's not neccesary to add this form to snews.php.
I created a different page, and just want to add this. But it's don't work... I uploaded a PEAR plugins, created a page with form, but nothing...

Well... I didn't mean 'physically' add it to snews.php... just include it along with snews.php.
I downloaded their ZIP package, coped their send-email-form.php and gen_validatorv31.js files to one of my snews17 projects.
However, not having the PEAR library installed on my local machine, there's no use going further as I don't have the time to re-write the scrip to work without PEAR.
I use ArgoSoft mail server on my local machine... sends e-mails out to the world from any of my localhost projects.

All that aside... I think Fred's suggestion is the easier route.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Katalonian

  • Newbie
  • *
  • Karma: 0
  • Posts: 38
    • My personal web page
Re: Need help with php form
« Reply #9 on: April 16, 2010, 04:14:21 PM »

ok. I'll wait Fred's turn)
Logged
non-php guy

Katalonian

  • Newbie
  • *
  • Karma: 0
  • Posts: 38
    • My personal web page
Re: Need help with php form
« Reply #10 on: April 17, 2010, 06:52:25 PM »

and?((((
Logged
non-php guy

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Need help with php form
« Reply #11 on: April 17, 2010, 08:02:31 PM »

and?((((
)))) ... not sure about Fred but I have been fiddling with this a bit... no luck yet tho... will let you know if I do.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Need help with php form
« Reply #12 on: April 17, 2010, 11:58:09 PM »

I know it's hard to believe, but ... I don't actually live here.
That said, what I meant is that it seems easiest (to me) to put a mailto link somewhere in your contact page, and add some text that clarifies the use of it. Because when users click a mailto link, they are automagically transported to their own mail client, which almost everyone that I know of will allow easy file attachment. Now, since you dont want to put a "naked" mailto link on a web page (you really don't, seriously), you'll need some way to cloak, hide or obfuscate the mailto link. There are tons of ways to do that and which one you end up using is entirely up to you. Which is why I didn't show an example - there are simply put too many variables to consider. Use Google, or whatever search engine you prefer, and search for something like "obfuscating mailto links". That should get you started.

Actually, here's one that I found promising but then the need for it went away so I didn't pursue it further:
http://www.alistapart.com/articles/gracefulemailobfuscation/

As I said, there are too many variables involved for me to say "this solution is the right one for your particular scenario" - you'll have to do the legwork yourself.
« Last Edit: April 18, 2010, 03:56:32 PM by Fred K (agentsmith) »
Logged