Web Design Forum  
 
Go Back   Web Design Forum > Web Software > Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 06-24-2011, 06:01 PM   #1
New Member
 
Join Date: Jun 2011
Posts: 1
Default no separate contact page

Hi, I am new to PHP and Javascript. The navlinks on my site do not point to individual pages, but rather when you click on "contact", for example, javascript makes the "contact" div expand.

Is this going to make it impossible for me to create a contact form in PHP since I don't have a separate "contact" page? I need someone to point me in the right direction. Thanks!
nhmaggiej is offline   Reply With Quote


Old 06-24-2011, 06:48 PM   #2
Gold Member
 
Join Date: Feb 2011
Location: Australia
Posts: 369
Default

It shouldn't stop you at all. It'll be trick.. and bit more troublesome if you try and have more than one form on the same page.

setup PHP to examine the page if $_POST is set. If not display page as normal, if so skip to the form processing.

HERE is a very simple example of what i'm getting at :-) Of course this example has the form processing in a seperate page but you can easily keep it in the same file.

I hope that helps.
__________________
Jason H.
DHDdirect.com
Domains - Hosting - Design
DHDdirect is offline   Reply With Quote
Old 06-25-2011, 06:52 PM   #3
Bronze Member
 
Join Date: Mar 2011
Posts: 29
Default

also, I know it's just a tutorial, but always make sure you sanitize any user input.
__________________
naFirici
REO Properties | MN Real Estate
nafirici is offline   Reply With Quote
Reply

Tags
contact form, javascript, php

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:22 PM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.