SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jul 2003
    Location
    Madison, MS
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP and JavaScript

    Does anyone know of a good PHP site that specifically deals with using PHP, JavaScript and HTML to process forms? Everything I run across has PHP and MySQL or some other database, or it's JavaScript and CGI or Perl. Don't need anything that complicated and what I've found doesn't give me enough information on interacting both.
    Thanks.

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP builds HTML.

    HTML contains the form.

    PHP can process the form.

    Javascript cannot process the form, but can do other things, depending on what you're needing.

    So, to get a functioning form, you don't even need Javascript.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    SitePoint Member
    Join Date
    Jul 2003
    Location
    Madison, MS
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP and JavaScript

    Quote Originally Posted by beetle
    PHP builds HTML.

    HTML contains the form.

    PHP can process the form.

    Javascript cannot process the form, but can do other things, depending on what you're needing.

    So, to get a functioning form, you don't even need Javascript.

    I understand that. What I'm trying to find is the coding for the PHP form that will gather the input from the form (after it's validated by JavaScript) and e-mail the information **with attached photos** to a specific e-mail address. I'm not as proficient at PHP or JavaScript as I'd like to be and I'm visual learner so I need examples to analyze and clear information that shows me how to make it happen. I can get the input emailed okay through the PHP form, but not with the attachments. I have no idea how to make or where to find the JavaScript validation code that checks to see if the required multiple images are attached, or the PHP code to grab the images from the temp file on the server and send it along with the e-mail. I haven't seen anything like that anywhere I've looked. Can you help me out?

  4. #4
    SitePoint Addict
    Join Date
    May 2000
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    JavaScript can validate form fields and do other things such as image manipulation, but it cannot check to see if files are attached. You will have to use PHP to do that. It's possible that you don't have your PHP set up correctly to attach files, if so then you should post this in the PHP section along with your code. Good Luck.

  5. #5
    SitePoint Member
    Join Date
    Jul 2003
    Location
    Madison, MS
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by requestcode
    JavaScript can validate form fields and do other things such as image manipulation, but it cannot check to see if files are attached. You will have to use PHP to do that. It's possible that you don't have your PHP set up correctly to attach files, if so then you should post this in the PHP section along with your code. Good Luck.
    Thanks for the insight. Now I know why I couldn't get it to work. Duh!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •