[advanced search]
Results from the most recent live auction are here.
21 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming > CODE
User Name
Password

Old 09-18-2005, 03:09 PM   · #1
wc4life24
New Member
 
Trader Rating: (0)
Join Date: Aug 2005
Posts: 18
NP$: 19.00 (Donate)
wc4life24 is an unknown quantity at this point
input field

I want to put some type of input on my website where people can submit questions, reviews, and other things. I've seen some codes for it but i don't understand what it does. What does it do when they submit something? How do i get it? Thanks for your help!


Please register or log-in into NamePros to hide ads
__________________
www.geocities.com/home_page5 - Visit this site for Fitness Articles, Cheap Supplements, and Free Ebooks.
wc4life24 is offline   Reply With Quote
Old 09-18-2005, 03:13 PM   · #2
miseria
SQLdumpster.com
 
miseria's Avatar
 
Name: Unknown
Location: West Sussex, UK
Trader Rating: (7)
Join Date: Jun 2005
Posts: 543
NP$: 108.00 (Donate)
miseria will become famous soon enoughmiseria will become famous soon enough
You'll need a form itself :

HTML Code:
<form method="whatever" action="whatever.php"> <input name='whatever' type='input'> <input type='submit' name='Submit' value='Sign in'> </form>


Then whatever.php which processes the form
__________________
!!!!!!! see something you like? Accepting offers for great affiliate websites !!!!!!!
Free Databases for your Website | All Things Playstation 3
Website Design Books | Music While You Work? | Computer Gadgets
miseria is offline   Reply With Quote
Old 09-18-2005, 04:43 PM   · #3
wc4life24
New Member
 
Trader Rating: (0)
Join Date: Aug 2005
Posts: 18
NP$: 19.00 (Donate)
wc4life24 is an unknown quantity at this point
thanks for the reply but after i add that code, what do i do with it? I don't see what happens when somebody types something in and clicks on "submit". It would probably help if you could explain it to me like i was a 5 year old.
__________________
www.geocities.com/home_page5 - Visit this site for Fitness Articles, Cheap Supplements, and Free Ebooks.
wc4life24 is offline   Reply With Quote
Old 09-18-2005, 05:20 PM   · #4
nasaboy007
NamePros Regular
 
Location: mysitememberships.com
Trader Rating: (28)
Join Date: Jul 2005
Posts: 817
NP$: 4032.90 (Donate)
nasaboy007 is a name known to allnasaboy007 is a name known to allnasaboy007 is a name known to allnasaboy007 is a name known to allnasaboy007 is a name known to allnasaboy007 is a name known to all
sure no problem. here's the 911... er i mean 411.

the form (what miseria posted) is the script that should be in your html file. this is what the user sees when they view your website and it has the boxes where they can type in their info.

now in "whatever.php", you have to have the script that you want to execute using the information that was put into the form. and where it says method="whatever", use method="post".

for example, say you have a form that asks for their name. they type in their name and press submit. then whatever that is typed into the box is sent to the .php file to execute. now in this script, you can use the information. ill show you how to make the page say "Hello, (person name)". heres the code for the html page where they would type in their name.

HTML Code:
<form name="name" action="name.php" method="post"> <input type="text" name="name" value="Insert Name Here"> <br> <input type="submit" value="Submit"> </form>


here is the script that wud be in "name.php".

PHP Code:
<?php
$name
=$_POST['name']; //define the variable that was sent via the form
$write="Hello, ";
$write.=$name; //make a variable of what you want to say
echo($write); //display what you want written
?>


now theyll see a page saying "Hello, NAME"

you can also do a LOT more with forms, and once you learn MySQL, it becomes invaluable. hope i helped. if you have any more questions, just ask.

(If this helped, please add reputation)
__________________

PushToAuction.com | Post domains you'd like to push to auction at Sedo™! [NEW] - 9/7/08
MySiteMemberships.com - Keep track of your site registration information!
Cheapest Web Directory Submissions on NamePros! - Over 2000 Directories!
Like my post? Rep is appreciated!
nasaboy007 is online now   Reply With Quote
Old 09-18-2005, 05:27 PM   · #5
SecondVersion
while ($awake){ code(); }
 
SecondVersion's Avatar
 


Name: Eric
Location: Kentucky
Trader Rating: (140)
Join Date: Mar 2005
Posts: 4,199
NP$: 1501.00 (Donate)
SecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond repute
Member of the Month
MOTM September 2005 Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Cancer Alzheimer's Protect Our Planet
Originally Posted by nasaboy007
sure no problem. here's the 911... er i mean 411.

the form (what miseria posted) is the script that should be in your html file. this is what the user sees when they view your website and it has the boxes where they can type in their info.

now in "whatever.php", you have to have the script that you want to execute using the information that was put into the form. and where it says method="whatever", use method="post".

for example, say you have a form that asks for their name. they type in their name and press submit. then whatever that is typed into the box is sent to the .php file to execute. now in this script, you can use the information. ill show you how to make the page say "Hello, (person name)". heres the code for the html page where they would type in their name.

HTML Code:
<form name="name" action="name.php" method="post"> <input type="text" name="name" value="Insert Name Here"> <br> <input type="submit" value="Submit"> </form>


here is the script that wud be in "name.php".

PHP Code:
<?php
$name
=$_POST['name']; //define the variable that was sent via the form
$write="Hello, ";
$write.=$name; //make a variable of what you want to say
echo($write); //display what you want written
?>


now theyll see a page saying "Hello, NAME"

you can also do a LOT more with forms, and once you learn MySQL, it becomes invaluable. hope i helped. if you have any more questions, just ask.

(If this helped, please add reputation)


It's also a good idea to do:

PHP Code:
<?php
if($_POST['submit']) //Check to see if they actually hit submit :D
{
$name=$_POST['name']; //define the variable that was sent via the form
$write="Hello, ";
$write.=$name; //make a variable of what you want to say
echo($write); //display what you want written
}
else
{
//whoops, they reached this page without submitting the form
die("You are not supposed to see this page!");
}
?>

That way, no data is displayed etc unless the person has "Submitted" the form

-Eric
__________________

SecondVersion.com - The Personal Blog of SecondVersion
Domain Name Portfolio - Get your free copy. - Version 1.0.1 now available!!
MetaCreator.com - Free Meta Tag Creator
CodingPlanet.com - Coming soon...
SecondVersion is offline   Reply With Quote
Old 09-18-2005, 07:09 PM   · #6
wc4life24
New Member
 
Trader Rating: (0)
Join Date: Aug 2005
Posts: 18
NP$: 19.00 (Donate)
wc4life24 is an unknown quantity at this point
I tried the code that was posted and it didnt really work...i dont think that my host supports php. Is there any way to do it without using php, perl ect? All i want to do is let people type in reviews of a product and send them to me somehow. Thanks for the help
__________________
www.geocities.com/home_page5 - Visit this site for Fitness Articles, Cheap Supplements, and Free Ebooks.
wc4life24 is offline   Reply With Quote
Old 09-19-2005, 03:19 AM   · #7
nasaboy007
NamePros Regular
 
Location: mysitememberships.com
Trader Rating: (28)
Join Date: Jul 2005
Posts: 817
NP$: 4032.90 (Donate)
nasaboy007 is a name known to allnasaboy007 is a name known to allnasaboy007 is a name known to allnasaboy007 is a name known to allnasaboy007 is a name known to allnasaboy007 is a name known to all
well if ur host doesnt support PHP, you can always make a file called test.php and put this in it:

PHP Code:
<? phpinfo(); ?>


itll tell u if php is supported or not. i dont think you can do that without a server side script. javascript MIGHT be able to do it, but i dont think so (dont know javascript). i suggest a better host
__________________

PushToAuction.com | Post domains you'd like to push to auction at Sedo™! [NEW] - 9/7/08
MySiteMemberships.com - Keep track of your site registration information!
Cheapest Web Directory Submissions on NamePros! - Over 2000 Directories!
Like my post? Rep is appreciated!
nasaboy007 is online now   Reply With Quote
Old 09-19-2005, 03:31 AM   · #8
legend2
DNOA Member
 
legend2's Avatar
 
Trader Rating: (75)
Join Date: Sep 2005
Posts: 1,099
NP$: 113.35 (Donate)
legend2 has much to be proud oflegend2 has much to be proud oflegend2 has much to be proud oflegend2 has much to be proud oflegend2 has much to be proud oflegend2 has much to be proud oflegend2 has much to be proud oflegend2 has much to be proud oflegend2 has much to be proud of
try cgi
legend2 is offline  
  Reply With Quote
Old 09-19-2005, 12:56 PM   · #9
nasaboy007
NamePros Regular
 
Location: mysitememberships.com
Trader Rating: (28)
Join Date: Jul 2005
Posts: 817
NP$: 4032.90 (Donate)
nasaboy007 is a name known to allnasaboy007 is a name known to allnasaboy007 is a name known to allnasaboy007 is a name known to allnasaboy007 is a name known to allnasaboy007 is a name known to all
well if the host dont support php, chances r it dont support cgi or asp or anything else lol
__________________

PushToAuction.com | Post domains you'd like to push to auction at Sedo™! [NEW] - 9/7/08
MySiteMemberships.com - Keep track of your site registration information!
Cheapest Web Directory Submissions on NamePros! - Over 2000 Directories!
Like my post? Rep is appreciated!
nasaboy007 is online now   Reply With Quote
Old 09-19-2005, 07:02 PM   · #10
SecondVersion
while ($awake){ code(); }
 
SecondVersion's Avatar
 


Name: Eric
Location: Kentucky
Trader Rating: (140)
Join Date: Mar 2005
Posts: 4,199
NP$: 1501.00 (Donate)
SecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond repute
Member of the Month
MOTM September 2005 Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Cancer Alzheimer's Protect Our Planet
Yeah my expirence is that hosts who do not support PHP do not support CGI.

wc4life, Do as nasa was saying. That should tell you whether they support PHP or not.
__________________

SecondVersion.com - The Personal Blog of SecondVersion
Domain Name Portfolio - Get your free copy. - Version 1.0.1 now available!!
MetaCreator.com - Free Meta Tag Creator
CodingPlanet.com - Coming soon...
SecondVersion is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Text editor input field RichardAFCB Programming 1 08-12-2005 04:01 AM
HTML input field RichardAFCB Web Design Discussion 0 08-12-2005 02:27 AM
CGI/Perl FormMail...Won't Work! CGYFlames03 CODE 4 06-29-2005 01:30 AM
Chinese Censors Scold Internet Users Who Input Taboo Words, Like 'Freedom' and 'Human traderone The Break Room 0 06-14-2005 08:27 AM
character count in access db field dzigner Programming 0 05-26-2005 01:20 PM

Site Sponsors
Get Your Site Linked at LinkedKeywords.com http://www.mobisitetrader.com/ Grow your forum!
Advertise your business at NamePros
All times are GMT -7. The time now is 07:18 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0