| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Regular | 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 :P if that makes a difference. Thanks Again |
| |
| | #2 (permalink) |
| NamePros Member | 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> 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: heres a small script that just shows the data the user submitted PHP Code: 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"> PHP Code:
__________________ I wonder... |
| |
| | #3 (permalink) |
| DNOA Member | You forgot to put semicolons at the end of the lines in your $_POST code!!
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #6 (permalink) |
| DNOA Member | Cannot find what?
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #8 (permalink) |
| DNOA Member | Would help if you could copy+paste the error Make sure your form action is the same as the PHP script filename.
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #10 (permalink) |
| DNOA Member | You mean that was the problem? *lol* okay
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #12 (permalink) |
| DNOA Member | Oh, you didn't solve it? :P 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!
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #13 (permalink) |
| NamePros Regular | 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 Games and Songs || eBloggy.net Zubair.info || Mixcat Interactive |
| |
![]() |
| 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 11:35 AM |
| Googlism - What does google think of you? | deadserious | The Break Room | 55 | 12-15-2005 09:09 AM |
| Beware of PHP! | PolurNET | The Break Room | 25 | 03-29-2005 03:04 PM |