How do you pass on information from a simple form to a php page.?
-
Please type in the whole code: For example a form that only asks for the first name and once you enter that first name by clicking on submit you delete that first name from your database table of names. So there should be a .html page and a .php page that work together. I am very confused how to grab the info and use it to run the php code. Please know that I am not looking for typing a first name and get Hello "First name". This is not what I am looking for. Thanks,
-
Answer:
You do the lot in one Php script! index.php: <?php if ( $_POST [ ' name ' ] != " " ) // if this is set, you are RETURNING to the page after filling and submitting the form. The variable IS in $_POST { $name = $_POST [ ' name ' ]; // your code here to delete $name } else // First time in index: $_POST is not set, so you show the form! { echo ( " <form name='xyz' action = index.php method = POST >"); echo ( " <input name='name' ... >"); echo ( " <input type='submit' ... >"); echo ( " </form>"); } ?> But you should have tried first that "Hello firstname": it is the same principle.
farzd at Yahoo! Answers Visit the source
Related Q & A:
- How To Get All Components Based On A Schema And From A Particular Publication?Best solution by Tridion
- How can I pass global variables into a function?Best solution by Stack Overflow
- how to add a form with a unique id on jquery?Best solution by Stack Overflow
- How much does it cost to rent a snowboard and buy a lift ticket?Best solution by Yahoo! Answers
- How do I find out information on a person through their phone number?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.