dcsimg
www.webdeveloper.com
Results 1 to 6 of 6

Thread: Have Contact form but no Contact.php - how do I implement this?

  1. #1
    Join Date
    Aug 2014
    Posts
    8

    Have Contact form but no Contact.php - how do I implement this?

    So I'm a junior developer and got a new job recently. Long story short I bought a landing page template to save time because my specialty is in Search Engine Marketing and not so much Design. This particular template has a Contact Us form embedded in the footer of the website that is referencing a Contact.php file that doesn't exist in the given files from the template. Cool, no big deal I just need to either make/download a Contact.php script. How hard could that be? Turns out extremely.

    My question - can I download just any Contact.php script and put it in my database?

    If so (even if i need to create my own which i can probably handle) - WHERE does it even need to go in my database?

  2. #2
    Join Date
    Mar 2011
    Posts
    1,156
    The world is full of those scripts. Just search on "formmail script" and you'll find thousands of them. Look for one that doesn't require you to put your Email address in the HTML for the <form> on your pages so spammers can't find it.

    Scripts don't go in your database. You upload them to the server via FTP and set the 'action' attribute of the <form> tag to it's URL (ie. 'http://www.example.com/contact.php').

  3. #3
    Join Date
    Mar 2012
    Posts
    1,814
    Just to clarify Rick's comments...

    Any PHP script will expect data in name and value pairs that contain the info, but they will not necessarily be the same. So you may need to amend the email form to send the info in the format expected by the PHP script. The alternative is to write your own script to match the form output...

  4. #4
    Join Date
    Aug 2014
    Posts
    8
    Can I simply for instance find the attribute in the script for "Name" and change it to something like "Your Name" so that it looks for Your Name instead of Name? As I'm typing this I realize it's probably easier to just change the label itself in the HTML, isn't it?

  5. #5
    Join Date
    Mar 2012
    Posts
    1,814
    Yes, amending the form to suit the script is probably the best solution, particularly if you are more familiar with html than php.

  6. #6
    Join Date
    Aug 2014
    Posts
    8
    Awesome. I will keep all of this in mind when I add a contact page later. I decided to just remove the contact from the footer because it will hardly be used anyway. Thanks for all your help!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles