Jump to content

[SOLVED] Problem with form


taliets

Recommended Posts

Hello everyone! I have got this problem with my contact form on my website and was wondering if you could help. It used to work fine before and I've just changed the way the form is coded by adding some label tags to make it more user friendly for text browsers. I've even tried reverting back to the old form and it still doesn't work. It displays the message for when all the form fields haven't been filled out as if some fields were not filled out. 

 

Here is the link to test: www.frostedberry.net/Silvia/Kontakt.php

 

I've recently added a php.ini file and was wondering if that could be the problem? Is it neccessary to have a php.ini file in my site?

 

Any help would be greatly appreciated!

Link to comment
Share on other sites

The PHP.INI file is usually provided by your webhost and you always had one.  But if you added another one to say your webroot, now it is defaulting to yours instead of the webhosts.

 

I would rename the php.ini that you added to like php.ini.bak and see if that fixes your problem.  If not, post your code.

Link to comment
Share on other sites

It's not necessary to have your own php.ini.  The system will have a default one.

 

And yes it's quite possible that adding php.ini will have broken the site.  In particular, there's a setting called "register_globals" that regularly breaks websites when it is switched off.

Link to comment
Share on other sites

Thanks guys! So you think the best is just to delete my own php.ini file? A friend told me that when you have includes its best to create this file to show the server where the includes are otherwise it sometimes can't find them. Is that correct or would it still find them without me adding my own php.ini file?

Link to comment
Share on other sites

You can still set the include path from your script (it will need to be done in each script).  I do it like this, checking to see if it's already there first.  You don't need to check if it's already there if you know it isn't.

 

if (!preg_match('|/var/www/www.prioritysubmit.com/webroot:|', ini_get('include_path'))) {
  ini_set('include_path', '/var/www/www.prioritysubmit.com/webroot:' . ini_get('include_path'));
}

Link to comment
Share on other sites

If you're just trying to set your include path and add a directory to that, here are a couple options that are a bit easier:

 

PHP:

<?php
$newPath = '/var/www/www.prioritysubmit.com/webroot';
set_include_path(get_include_path() . PATH_SEPARATOR . $newPath);
?>

 

If you know exactly what path your want your directory to use, just do something like this in an .htaccess file within your directory root:

php_value include_path ".:/var/www/www.prioritysubmit.com/webroot"

Link to comment
Share on other sites

Most Hosts allow you to edit your PHP.INI that they provide for you already, so there really is no need to create your own.

 

Thanks guys! So you think the best is just to delete my own php.ini file? A friend told me that when you have includes its best to create this file to show the server where the includes are otherwise it sometimes can't find them. Is that correct or would it still find them without me adding my own php.ini file?

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.