Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 04-23-2006, 08:10 AM html form submission
Novice Talker

Posts: 7
Trades: 0
I have problem when trying to process a html from with php. php is running fine on apache server. i could get results when assigning values to the variables and print it. the problem is when trying to send the values from a html form. the code is as follows.

<HTML>
<TITLE>HTML Form</TITLE>
<BODY>
<FORM ACTION="handleform.php" METHOD=GET>
FirstName<INPUT TYPE=TEXT NAME="firstname"><BR>
<INPUT TYPE=SUBMIT NAME="SUBMIT" value="Submit">
</FORM>
</BODY>
<HTML>

the php file is as follows.

<HTML>
<TITLE>
Form Results
</TITLE>
<BODY>
<?php
print "The name you have entered is $firstname<br>";
?>
</BODY>
</HTML>

the url shows http://localhost/handleform.php?f=chris&SUBMIT=Submit

the out put is just

The name you have entered is


can smone help with this. I'm very new to PHP
arakkathara is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-23-2006, 02:02 PM Re: html form submission
Super Talker

Posts: 116
Trades: 0
ok first of all, try changing the <form method="get"> to <form method="post">.

then use the variable $_POST['firstname'] to get the info from the html form into the php.

if u want, u can add $firstname = $_POST['firstname']; on the first line of the php code so that u can use $firstname as ur variable.
__________________


Please login or register to view this content. Registration is FREE

nasaboy007 is offline
Reply With Quote
View Public Profile Visit nasaboy007's homepage!
 
Old 04-24-2006, 07:38 AM Re: html form submission
Novice Talker

Posts: 7
Trades: 0
Thanx...That works..
arakkathara is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to html form submission
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21826 seconds with 12 queries