Jump to content

Completely Clueless


ej111

Recommended Posts

I'm brand new to PHP - trying to have a form that accepts a document attachment - 

 

the top of my form has includes which are:

 

include_once('/usr/bin/pear-stable/Mail.php');
include_once('/usr/bin/pear-stable/Mail_Mime/mime.php');
 
I was told by my ISP that pear-stable is not even a freakin' directory.  How the $#@% do I reference these two includes???????
Link to comment
Share on other sites

 

I'm brand new to PHP - trying to have a form that accepts a document attachment - 

 

the top of my form has includes which are:

 

include_once('/usr/bin/pear-stable/Mail.php');
include_once('/usr/bin/pear-stable/Mail_Mime/mime.php');
 
I was told by my ISP that pear-stable is not even a freakin' directory.  How the $#@% do I reference these two includes???????

 

 

Can you create those directories?  Do you have the Mail.php and mime.php files?

 

It sounds like you blindly copied a form in the hopes that just pasting it would work.  It usually doesn't work like that.

Link to comment
Share on other sites

Not only are you new to php you apparently are new to computers.  You really need to read some books and learn about directory structures, relative and absolute paths, variables, programming in general and how it all works - regardless of the language. 

 

You're trying to become a programmer.  Therefore you have to walk before you run.  Try writing your very first script/program as something simple.  Design a simple form to enter your name and phone number and then a php script that displays that form and then processes the result of when you click on the form's Submit button.  That will grab those inputs and re-display them for you.  You will learn some of the most basic processes that you will ever do with the web and php in this fashion.  This is going to take some time and effort on your part both to understand the interactions between the browser (client) and the server (php) and how one feeds the other and then handles the returned data later.

 

Good programmers are well-trained individuals who have done their homework and made the effort to learn before doing.  It is very possible to do this by yourself, but you have to do it.  You can't just copy some stuff that purports to do what you have in mind and then seek help when it doesn't work.  You have to write some code and learn how it works or doesn't work and fix it - albeit with some help.  We can sit here and tell you all kinds of things that are wrong with the code you didn't write but what will that tell you if you don't understand what we say?

 

 

As for your current example - forms don't have document attachments.  Emails do though.  Terminology is very important in the IT world.  That said, it sounds like you want a form that "uploads a file" - that is handled with a special html input tag - " type='file' ".  Look it up and read about it AFTER you have done the baby steps I mentioned above.

 

Good luck and happy learning!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.