ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Now if my site is hosted locale (127.0.0.1) the script runs (apart from sending the email) and redirects to the correct pages stated in the header() function. However if I host the site on the internet when I click on the submit button instead of executing the script it pops open with a dialogue box to state whether I wasn't to download/open the script like when you click on a file to download...
Something isn't right on your server. My first thought was that php
isn't installed or configured correctly, but I'm starting to think
that your php script is running and, for some reason, is having a
problem presenting the /thanks.php or the /error.php page.
I'd suggest that you download the file and look at its contents.
Also load the /thanks.php and /error.php pages, just to make sure
they display properly. Note that the system may expect "<?php " and
these pages might simply have "<? ".
HTTP/1.1 requires an absolute URI as argument to » Location: including the scheme, hostname and absolute path, but some clients accept relative URIs. You can usually use $_SERVER['HTTP_HOST'], $_SERVER['PHP_SELF'] and dirname() to make an absolute URI from a relative one yourself:
Wouldn't make any difference. The double quote will allow for string substitution but since there isn't any going on in this scenario both single and double quotes will work the same.
Wouldn't make any difference. The double quote will allow for string substitution but since there isn't any going on in this scenario both single and double quotes will work the same.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.