PDA

View Full Version : Need help with form in HTML


Jaynesh
24 Jan 2006, 16:11
Im lerning php and just experimenting and messing around with a few stuff.

Ive written this code in dreamweaver ( Thanx for you tutorial MindTrix, http://www.vbulletin.org/forum/showthread.php?t=59914&page=1&highlight=elseif ) :)

Heres the code:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



How can i make it so i can select a name from a form instead of manually putting it in the php file.

e.g Imagine there is a form on a page, and when the user types the name Mark it will say Yes, My name is mark And if a user types a name which is not coded in the form it will say No, My name is Jaynesh.

harmor19
24 Jan 2006, 16:38
let's say you had a form with the field
<input type="text" name="username" />


Use this code



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Jaynesh
24 Jan 2006, 17:12
Cheers :) worked great :)

Cole2026
26 Jan 2006, 03:11
Im lerning php and just experimenting and messing around with a few stuff.

Ive written this code in dreamweaver ( Thanx for you tutorial MindTrix, http://www.vbulletin.org/forum/showthread.php?t=59914&page=1&highlight=elseif ) :)

Heres the code:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



How can i make it so i can select a name from a form instead of manually putting it in the php file.

e.g Imagine there is a form on a page, and when the user types the name Mark it will say Yes, My name is mark And if a user types a name which is not coded in the form it will say No, My name is Jaynesh.

I know this isn't what you asked, but for future reference you should use the case and switch commands in case of an if that long.


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Jaynesh
26 Jan 2006, 08:43
Okay thankyou :)

How will i use that with a form?