Blank Screen After Submitting Contact Form, My php file is not working correctly |
Blank Screen After Submitting Contact Form, My php file is not working correctly |
Themond |
Jun 4 2015, 08:27 AM
Post
#1
|
Newbie Group: Members Posts: 10 Joined: 5-May 15 Member No.: 22,561 |
Hello all today I uploaded my website to my server and when I went to test it I found two big errors.
1. My website will not show up on google for some reason so I had to type http://www.demondweb.com to get to my site. 2. When I went to test my contact form I would get a blank screen after submitting it no errors just a white empty screen. my website is here at http://www.demondweb.com I filled out my mata tags so I don't know why it didn't show on google. As for the php file there was no errors as for as syntax so kinda lost on that note. There is a attachment containing my website files Attached File(s) contact.php ( 1.94k ) Number of downloads: 191 index.html ( 19.03k ) Number of downloads: 282 |
Darin McGrew |
Jun 4 2015, 10:57 AM
Post
#2
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
QUOTE I filled out my mata tags so I don't know why it didn't show on google. Maybe because none of your content shows when JavaScript is disabled/unavailable.See also the FAQ entry: http://htmlhelp.com/faq/html/publish.html#index-better |
Themond |
Jun 4 2015, 01:00 PM
Post
#3
|
Newbie Group: Members Posts: 10 Joined: 5-May 15 Member No.: 22,561 |
QUOTE I filled out my mata tags so I don't know why it didn't show on google. Maybe because none of your content shows when JavaScript is disabled/unavailable.See also the FAQ entry: http://htmlhelp.com/faq/html/publish.html#index-better Can you explain that in more detail there is usually a "Active X" pop up that enables the java-script, or if that's the issue how can I fix this. Sorry for the triple post earlier I didn't notice until I left to go to a meeting, my computer had froze when I submitted it This post has been edited by Themond: Jun 4 2015, 01:01 PM |
Christian J |
Jun 4 2015, 01:48 PM
Post
#4
|
. Group: WDG Moderators Posts: 9,661 Joined: 10-August 06 Member No.: 7 |
1. My website will not show up on google for some reason Getting a new site listed in a search engine may take some time (not sure how long nowadays). Have you submitted your site to Google? You should be able to do that here: http://www.google.com/webmasters/tools/submit-url but when I follow that link Google wants me to sign in with my email and password. Another way to be found might be to let other legitimate sites link to yours. QUOTE 2. When I went to test my contact form I would get a blank screen after submitting it no errors just a white empty screen. The HTML form fields contain no NAME attributes, these are needed for the PHP script to work. In particular, the PHP script looks for the field "contact_email" first thing, if it's missing the script won't even print out any error messages. |
Christian J |
Jun 4 2015, 01:59 PM
Post
#5
|
. Group: WDG Moderators Posts: 9,661 Joined: 10-August 06 Member No.: 7 |
Can you explain that in more detail there is usually a "Active X" pop up that enables the java-script, or if that's the issue how can I fix this. It appears the page does have real content (HTML and text), but it's hidden by CSS and is only unhidden if your visitors have javascript enabled. As the site owner you don't have to change anything in your own browser (except for testing). Search engine indexing bots (like Google's) should have no problem reading the HTML and text content (though they might frown upon javascript dependency, since it might be regarded as seach engine manipulation in some cases). Personally I think you just need to wait a while for Google to find your site, but you should still avoid javascript dependency for accessibility reasons. |
Darin McGrew |
Jun 4 2015, 02:15 PM
Post
#6
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
QUOTE Can you explain that in more detail there is usually a "Active X" pop up that enables the java-script, or if that's the issue how can I fix this. I use Firefox, so ActiveX is irrelevant.I use NoScript to disable JavaScript except for whitelisted sites. When I first bring up your site, there is nothing there except the spinning "busy downloading" background image. Search engines frown on sites providing content to them that humans don't see, including content that is hidden with CSS. I don't know how they evaluate that sort of think currently, as it's something of a trade secret, and is always changing. |
Themond |
Jun 4 2015, 02:38 PM
Post
#7
|
Newbie Group: Members Posts: 10 Joined: 5-May 15 Member No.: 22,561 |
1. My website will not show up on google for some reason Getting a new site listed in a search engine may take some time (not sure how long nowadays). Have you submitted your site to Google? You should be able to do that here: http://www.google.com/webmasters/tools/submit-url but when I follow that link Google wants me to sign in with my email and password. Another way to be found might be to let other legitimate sites link to yours. QUOTE 2. When I went to test my contact form I would get a blank screen after submitting it no errors just a white empty screen. The HTML form fields contain no NAME attributes, these are needed for the PHP script to work. In particular, the PHP script looks for the field "contact_email" first thing, if it's missing the script won't even print out any error messages. Oh okay maybe it was because I forgot to un-comment my label tags, Let me un-comment those label tags and see if that fixes it. I also submitted my website to google I'll wait to see what happens with that also. This post has been edited by Themond: Jun 4 2015, 02:40 PM |
Christian J |
Jun 4 2015, 04:21 PM
Post
#8
|
. Group: WDG Moderators Posts: 9,661 Joined: 10-August 06 Member No.: 7 |
Oh okay maybe it was because I forgot to un-comment my label tags, Let me un-comment those label tags and see if that fixes it. No, LABEL elements don't matter to the PHP script. It's the NAME attributes you need: CODE <input type="text" name="contact_name" id="contact_name" class="form-control" placeholder="Name" /> ... <input type="text" name="contact_email" id="contact_email" class="form-control" placeholder="Email Address" /> ... <textarea name="contact_message" id="contact_message" class="form-control" rows="7" placeholder="Write a message"></textarea> (there might be other issues too, but start with the above). |
Themond |
Jun 4 2015, 08:33 PM
Post
#9
|
Newbie Group: Members Posts: 10 Joined: 5-May 15 Member No.: 22,561 |
Oh okay maybe it was because I forgot to un-comment my label tags, Let me un-comment those label tags and see if that fixes it. No, LABEL elements don't matter to the PHP script. It's the NAME attributes you need: CODE <input type="text" name="contact_name" id="contact_name" class="form-control" placeholder="Name" /> ... <input type="text" name="contact_email" id="contact_email" class="form-control" placeholder="Email Address" /> ... <textarea name="contact_message" id="contact_message" class="form-control" rows="7" placeholder="Write a message"></textarea> (there might be other issues too, but start with the above). Thank you Christian that seemed to do the trick now I get back to setting up the email |
Lo-Fi Version | Time is now: 28th April 2024 - 09:26 AM |