NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page PHP Help Please....

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 08-08-2005, 11:08 PM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: U.S.A.
Posts: 655
Coolprogram has a spectacular aura aboutCoolprogram has a spectacular aura about
 



Awful PHP Help Please....


I need some PHP help.I need to know how to submit forms.cause i know how to make forms.But for some reason it willnot let me submit forms. So really nee someones help on this.I need to have a form because it will make my site a lot better.Thank you very very very very much
-Coolprogram
P.S I am using a webhosting server for the php stuff i know for a fact it works
????: NamePros.com http://www.namepros.com/programming/113966-php-help-please.html
if that makes a difference.
Thanks Again
Coolprogram is offline  
Old 08-08-2005, 11:44 PM   #2 (permalink)
NamePros Member
Join Date: Jan 2005
Location: Texas USA
Posts: 71
Outer is an unknown quantity at this point
 



It's very simple

form:
Code:
<form method="post" action="scriptname.php">
<input type="text" name="variable1"><br />
<input type="text" name="variable2"><br />
<input type="Submit" name="Submit" value="Submit">
</form>
ok, so you got your form, you know that already

when the form is submitted via the submit button, the values from the fields in the form will be translated in PHP to this:
PHP Code:
$_POST['variable1']
$_POST['variable2']
$_POST['Submit'
The submit button also submits a value to PHP. This will be an easy method for checking if a user hit the submit button.

heres a small script that just shows the data the user submitted
PHP Code:
<?php

// This checks if the user submitted.
// The word in parentheses must equal the value that you assigned the Submit button
if ($_POST['Submit'] == "Submit")
????: NamePros.com http://www.namepros.com/showthread.php?t=113966
{
    
// anything in here you do if the user submitted the form
    
echo "Variable 1 is: ".$_POST['variable1']."<br />";
????: NamePros.com http://www.namepros.com/showthread.php?t=113966
    echo 
"Variable 2 is: ".$_POST['variable2']."<br />";
}
else
{
    
// This area is for if the user didn't submit. The else statement IS optional. It isn't needed.
    // You could just as easily leave it out and just have the form show no matter what.
}
?>

Hope this helps

Also, one more thing. the words inside the $_POST are the names that you assign the fields in the form. So if you had this:
Code:
<input type="text" name="trees">
then the PHP code would be
PHP Code:
$_POST['trees'
__________________
I wonder...
Outer is offline  
Old 08-09-2005, 05:46 AM   #3 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
You forgot to put semicolons at the end of the lines in your $_POST code!!
mholt is offline  
Old 08-09-2005, 10:14 AM   #4 (permalink)
NamePros Member
Join Date: Jan 2005
Location: Texas USA
Posts: 71
Outer is an unknown quantity at this point
 



I know, they were just to show the format (when there were only the $_POST[] variables inside the PHP tags...)
__________________
I wonder...
Outer is offline  
Old 08-09-2005, 07:03 PM THREAD STARTER               #5 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: U.S.A.
Posts: 655
Coolprogram has a spectacular aura aboutCoolprogram has a spectacular aura about
 



Okay that helps.But i dont think it works on webhosting things because i havew a web hosting thing i use it for but it doesnt work when i put the codes there it gives a cannot find thing.So what does that mean .Thanks for the help.
Coolprogram
Coolprogram is offline  
Old 08-09-2005, 07:29 PM   #6 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
Cannot find what?
mholt is offline  
Old 08-09-2005, 07:52 PM THREAD STARTER               #7 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: U.S.A.
Posts: 655
Coolprogram has a spectacular aura aboutCoolprogram has a spectacular aura about
 



Cannot find the Page it's on even though it's on the same page and everything or it cant find the PHP files.........What does it mean
Thanks again for the help coolprogram
Coolprogram is offline  
Old 08-09-2005, 08:01 PM   #8 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
Would help if you could copy+paste the error Make sure your form action is the same as the PHP script filename.
mholt is offline  
Old 08-09-2005, 08:11 PM THREAD STARTER               #9 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: U.S.A.
Posts: 655
Coolprogram has a spectacular aura aboutCoolprogram has a spectacular aura about
 



been there tryed that it is ecactly right
Coolprogram is offline  
Old 08-09-2005, 08:13 PM   #10 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
You mean that was the problem? *lol* okay
mholt is offline  
Old 08-09-2005, 08:42 PM THREAD STARTER               #11 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: U.S.A.
Posts: 655
Coolprogram has a spectacular aura aboutCoolprogram has a spectacular aura about
 



heh lol but what is my problem is what i am trying to figure out!!!!!!!!!
Coolprogram is offline  
Old 08-09-2005, 08:46 PM   #12 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
Oh, you didn't solve it? um.... please! Do the following:

When the error appears, highlight it. Press Ctrl+C. When you come to reply, press Ctrl+V to paste the error.

Then we can help you more!
mholt is offline  
Old 08-20-2005, 04:20 AM   #13 (permalink)
NamePros Regular
 
Zubair1's Avatar
Join Date: Mar 2005
Posts: 912
Zubair1 is just really niceZubair1 is just really niceZubair1 is just really niceZubair1 is just really niceZubair1 is just really nice
 


AIDS/HIV
Hi ppl,

I just wanted to know it's not necessary to put the $_POST['submit'];
on the receiveing end is it?

coolprogram, I think you might be using an earlier version of php which takes
in commands like HTTP_POST_VARS['name']; or you might be looking in the
wrong directory.these are just guesses sorry If Im wrong I kinda new to php
programming but have experience In other languages.
__________________
Live Support : Zubair11 [at] hotmail.com
Free SEO Directory! || Free Online TV || Tech Blog
Web Design & Web Development Services || Reliable Web Hosting
Zubair1 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial: Getting started with PHP (The Basics) deadserious Webmaster Tutorials 60 11-17-2007 12:35 PM
Googlism - What does google think of you? deadserious The Break Room 55 12-15-2005 10:09 AM
Beware of PHP! PolurNET The Break Room 25 03-29-2005 04:04 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 01:06 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger