Jump to content

Where does PHP go? How does the HTML page see it? etc...


Go to solution Solved by QuickOldCar,

Recommended Posts

GoDaddy is hosting my site on Linux.

 

I called their support line and was told they can not answer these simple questions!

 

My site is all done with one exception. The Contact Form.

 

My website has an "Email" link in the top navigation area. The link to the contact.html works just fine. The Contact Form is designed and in place on the contact.html page. The styles.css formats the contact.html just fine. Now the $64,000 questions...

 

I have no idea and am unable to find on the web how to get the contact_form.php page to communicate with the Contact Form on the html webpage. For example, when a user clicks the Submit button there is no link to the php file that tells the html page where to submit the message to along with the message, Name, etc.

 

The styles.css file is in a directory named css and styles.css resides in it.

 

In the < head > of the page there is a link pointing to the styles.css page. It looks like this:

 

    <link href="http://www.mywebsite.com/css/styles.css" rel="stylesheet" type="text/css" media="screen">
 

Questions:

 

How on earth do I get the contact_form.php file to work with my website Contact Form?

Where does the contact_form.php reside?

What file extension does the contact_form.php? is .php correct?

What is up with the .ini file I keep reading about?

 

I have honestly spent the largest portion of today trying to find the answers to these simple questions.

 

Any help is greatly appreciated.

 

Thank you in advance!

Edited by StevenMG
  • Solution
How on earth do I get the contact_form.php file to work with my website Contact Form?

 

Usually there is a form, that forms action will determine where is redirected

<form action="contact_form.php" method="POST">

 

Where does the contact_form.php reside?

 

Did you ever make one or is one supposed to be supplied a website creator?

you can try looking in \var\www\html\ using an ftp client like filezilla or in your provided admin panel from the host

 

What file extension does the contact_form.php? is .php correct?

 

In order to parse php code the extension must be php, you can also allow html to parse php if set it up on the server.

 

What is up with the .ini file I keep reading about?

 

an .ini file is similar to a text file, maybe people are informing you of the php.ini configuration file.

 

If you create a new file called info.php in the public www(root of your site), you can see where it's located or other information

Depending on which hosting admin panel you have can access it from there as well.

 

info.php

<?php phpinfo(); ?>

To summarize

contact.html should contain a form and the action pointing to your php script

your php script would perform the mail function

 

Some people do it all in one php script, the form and also the mail function, like contact.php

Edited by QuickOldCar
QuickOldCar, THANK YOU, THANK YOU, THANK YOU!!!

In all the contact form web examples I looked at today NOT ONE of them mentioned to use

 

<form action = "contact_php.php" etc...

 

as where the pointer goes!!!

 

Amazing.

 

Even GoDaddy's tech support would not tell me that as she said there are so many configurations to webpage design that she can not help me with it.

HELLO!!!

lol

 

I did the info.php earlier today, ran it and a mountain of meaningless information concerning php on GoDaddy was displayed on my screen. Maybe it will have meaning one day. However, today all I want is a Contact Form to work!

 

Thank you again for your help and time!

 

Steven

 

 

In all the contact form web examples I looked at today NOT ONE of them mentioned to use

 

<form action = "contact_php.php" etc...

 

as where the pointer goes!!!

Well if you actually took the time to look a HTML Form tutorial such as this one. It will explain all there is to do with HTML forms and you would of known what to do then. You will never find an exact code example that will solve your problem.

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.