Wednesday 15 February 2012

php - how to pass variables inside one page -


I want to know how to pass the variable from a form to a php page.

Thank you.

Edit:

I have some input and a submit button. I want to find my php page database and click on submit button and want to display a relevant table. And here all the actions are in one page.

So I want to know how to move the variable from one page to a php script on one page. I apologize for leaving too few details.

Can you understand my question now? Thanks again.

Edit: In this way you enter a user-entered value from a form on the PHP page can do.

Here's a general form:

   

For PHP codes now:

  & lt; Php $ name = $ _POST ["name"]; ? & Gt;  

Note: You can change the post type between POST and GET and change the ARP option to send form input on a different PHP page.


Are you talking about passing a variable in the function?

  $ name = 'Robert'; PrintName ($ name); Function printName ($ n) {echo $ n; }  

No comments:

Post a Comment